Skip to content

axif0/cli-cbrain

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CBRAIN Command Line Interface (CLI)

Overview

CBRAIN CLI is a command-line interface for interacting with the CBRAIN platform, providing easy access to user management and authentication functions.

Features

  • User authentication (login/logout)
  • User management (create, list, show users)
  • Session status checking

Prerequisites

  • Python 3.10+
  • pip package manager

Installation

  1. Clone the repository:
git clone https://github.com/aces/cbrain-cli.git
cd cbrain-cli
  1. Create a virtual environment :
python3 -m venv venv
source venv/bin/activate  # On Windows, use `venv\Scripts\activate`
  1. Install the package:
pip install -r requirements.txt
pip install .

Usage

Authentication

Login

cbrain login
  • Prompts for username and password
  • Stores session token for subsequent commands

Logout

cbrain logout
  • Clears the current session

Check Status

cbrain status
  • Shows current login status and user ID

User Management

List Users

cbrain users list
  • Lists all users
  • Use -d or --detailed flag for more information
cbrain users list -d

Create User

cbrain users create
  • Interactively creates a new user
  • Requires admin authentication
  • Prompts for user details like username, password, email, etc.

Show User Details

cbrain users show USER_ID
  • Displays detailed information for a specific user

Demo use :

cbrain

Configuration

  • Session token is stored in ~/.cbrain/session.json
  • Base URL defaults to http://localhost:3000 (configurable in future versions)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages