Skip to main content

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:

OSInstallation
macOSbrew install node or download from nodejs.org
Linux (Debian/Ubuntu)sudo apt update && sudo apt install nodejs npm
WindowsDownload 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:

  1. API Key — Generate one from the Galene.AI web interface: SettingsGalene.AI CLI → create a new API key
  2. API Endpoint — The platform endpoint URL, shown on the same settings page
warning

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:

ModeCommandDescription
Interactive TUIgaleneai-cliFull terminal UI for conversational interaction
Single messagegaleneai-cli run "your message"Send a message and get a response without the TUI
Headless servergaleneai-cli serveStart a headless server for automation/integration
Attach to servergaleneai-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

CommandDescription
galeneai-cliStart the interactive TUI
galeneai-cli run [message]Run a single message (non-interactive)
galeneai-cli modelsList available models
galeneai-cli statsShow token usage and cost statistics

Session Management

Sessions allow you to continue previous conversations and export/import them.

CommandDescription
galeneai-cli session listList all sessions
galeneai-cli run -cContinue 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

CommandDescription
galeneai-cli agent createCreate a new agent
galeneai-cli agent listList available agents

GitHub Integration

CommandDescription
galeneai-cli github installInstall the GitHub agent
galeneai-cli github runRun the GitHub agent
galeneai-cli pr <number>Fetch a GitHub PR and run the CLI in context

Authentication

CommandDescription
galeneai-cli auth login [url]Log in to a provider
galeneai-cli auth logoutLog out from a configured provider
galeneai-cli auth listList configured providers

Utility

CommandDescription
galeneai-cli upgradeUpgrade 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:

FlagDescription
-m, --modelModel to use (provider/model format)
-c, --continueContinue the last session
-s, --sessionContinue a specific session by ID
-f, --fileAttach files to the message (repeatable)
-p, --promptPrompt to use
--agentAgent to use
--formatOutput format: default or json
--titleSet a session title
--shareShare 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:

FlagDescription
-h, --helpShow help
-v, --versionShow version number
--print-logsPrint logs to stderr
--log-levelSet 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
FlagDescription
--daysShow stats for the last N days
--toolsShow the top N tools used
--projectFilter stats by project name