Galene.AI CLI
Galene.AI CLI is a terminal-based interface that integrates LLMs directly into your local development environment. It bridges the gap between natural language intent and file system execution, allowing you to generate scripts, refactor code, and manage system tasks using conversational prompts.
Prerequisites
Before installing the CLI, ensure you have Node.js and npm installed on your system:
| OS | Installation |
|---|---|
| macOS | brew install node or download from nodejs.org |
| Linux (Debian/Ubuntu) | sudo apt update && sudo apt install nodejs npm |
| Windows | Download and run the installer from nodejs.org |
Verify the installation:
node --version
npm --version
Installation
Install the CLI globally via npm:
npm install -g galeneai-cli
First-Time Setup
On the first launch, the CLI prompts you to enter two values:
- API Key — Generate one from the Galene.AI web interface: Settings → Galene.AI CLI → create a new API key
- API Endpoint — The platform endpoint URL, shown on the same settings page
API keys are displayed only once at creation. Copy the key immediately or you will need to generate a new one.
After configuration, launch the interactive TUI with:
galeneai-cli
Usage Modes
The CLI can run in different modes depending on your workflow:
| Mode | Command | Description |
|---|---|---|
| Interactive TUI | galeneai-cli | Full terminal UI for conversational interaction |
| Single message | galeneai-cli run "your message" | Send a message and get a response without the TUI |
| Headless server | galeneai-cli serve | Start a headless server for automation/integration |
| Attach to server | galeneai-cli attach <url> | Connect to a running headless server |
Model Selection
By default the CLI uses the platform's configured model. You can list available models and switch between them.
List available models:
galeneai-cli models
Use --verbose to include metadata such as costs, or filter by provider:
galeneai-cli models --verbose
galeneai-cli models openai
Specify a model for a command:
Use the -m (or --model) flag with the provider/model format:
galeneai-cli run -m openai/gpt-4 "explain this function"
Commands Reference
Core Commands
| Command | Description |
|---|---|
galeneai-cli | Start the interactive TUI |
galeneai-cli run [message] | Run a single message (non-interactive) |
galeneai-cli models | List available models |
galeneai-cli stats | Show token usage and cost statistics |
Session Management
Sessions allow you to continue previous conversations and export/import them.
| Command | Description |
|---|---|
galeneai-cli session list | List all sessions |
galeneai-cli run -c | Continue the last session |
galeneai-cli run -s <session-id> | Continue a specific session |
galeneai-cli export [sessionID] | Export a session as JSON |
galeneai-cli import <file> | Import a session from a JSON file |
Agent Management
| Command | Description |
|---|---|
galeneai-cli agent create | Create a new agent |
galeneai-cli agent list | List available agents |
GitHub Integration
| Command | Description |
|---|---|
galeneai-cli github install | Install the GitHub agent |
galeneai-cli github run | Run the GitHub agent |
galeneai-cli pr <number> | Fetch a GitHub PR and run the CLI in context |
Authentication
| Command | Description |
|---|---|
galeneai-cli auth login [url] | Log in to a provider |
galeneai-cli auth logout | Log out from a configured provider |
galeneai-cli auth list | List configured providers |
Utility
| Command | Description |
|---|---|
galeneai-cli upgrade | Upgrade CLI to latest version |
galeneai-cli upgrade <version> | Upgrade to a specific version |
Run Command Options
The run command supports several flags for fine-grained control:
| Flag | Description |
|---|---|
-m, --model | Model to use (provider/model format) |
-c, --continue | Continue the last session |
-s, --session | Continue a specific session by ID |
-f, --file | Attach files to the message (repeatable) |
-p, --prompt | Prompt to use |
--agent | Agent to use |
--format | Output format: default or json |
--title | Set a session title |
--share | Share the session |
Example — attach multiple files:
galeneai-cli run "analyze these files" -f src/main.py -f src/utils.py
Global Options
These options are available on all commands:
| Flag | Description |
|---|---|
-h, --help | Show help |
-v, --version | Show version number |
--print-logs | Print logs to stderr |
--log-level | Set log level: DEBUG, INFO, WARN, ERROR |
Statistics
Track token usage and costs:
galeneai-cli stats
galeneai-cli stats --days 7
galeneai-cli stats --tools 10
galeneai-cli stats --project my-project
| Flag | Description |
|---|---|
--days | Show stats for the last N days |
--tools | Show the top N tools used |
--project | Filter stats by project name |