CBRAIN CLI is a command-line interface for interacting with the CBRAIN platform, providing easy access to user management and authentication functions.
- User authentication (login/logout)
- User management (create, list, show users)
- Session status checking
- Python 3.10+
- pip package manager
- Clone the repository:
git clone https://github.com/aces/cbrain-cli.git
cd cbrain-cli
- Create a virtual environment :
python3 -m venv venv
source venv/bin/activate # On Windows, use `venv\Scripts\activate`
- Install the package:
pip install -r requirements.txt
pip install .
cbrain login
- Prompts for username and password
- Stores session token for subsequent commands
cbrain logout
- Clears the current session
cbrain status
- Shows current login status and user ID
cbrain users list
- Lists all users
- Use
-d
or--detailed
flag for more information
cbrain users list -d
cbrain users create
- Interactively creates a new user
- Requires admin authentication
- Prompts for user details like username, password, email, etc.
cbrain users show USER_ID
- Displays detailed information for a specific user
- Session token is stored in
~/.cbrain/session.json
- Base URL defaults to
http://localhost:3000
(configurable in future versions)