Skip to content

CLI Quickstart

Get started with the Orion command-line interface for managing the platform from your terminal.


Installation

The CLI is built with Go and managed with uv for the Python integration layer. Install it from the project root:

cd cli
uv sync

Verify the installation:

uv run orion --help

Authentication

Log in to the Orion Gateway:

orion auth login
Email: admin@orion.local
Password: ****
Logged in successfully. Token: eyJhbGciOi...

Verify your session:

orion auth whoami
User:  admin
Email: admin@orion.local
Role:  admin

Session Persistence

Your auth token is stored in ~/.orion/token and persists between terminal sessions. You only need to log in again when the token expires or the gateway URL changes.


Common Commands

Command Description
orion scout trigger Trigger a trend scan
orion scout list-trends List all detected trends
orion scout configure <niche> Configure active niche (tech, gaming, finance)
Command Description
orion content list List all content items
orion content view <id> View content details
orion content approve <id> Approve content for publishing
orion content reject <id> Reject content
orion content regenerate <id> Regenerate content
Command Description
orion publish send <id> --platform twitter Publish to a platform
orion publish accounts List connected social accounts
orion publish history View publishing history
Command Description
orion system health Check service health
orion system status Show status of all services
Command Description
orion admin seed Seed the database with sample data
orion admin cleanup Run data cleanup
orion admin seed-demo Generate demo fixtures

Output Formats

Most commands support multiple output formats via the --format flag:

orion scout list-trends --format table   # Default: human-readable table
orion scout list-trends --format json    # Machine-readable JSON
orion scout list-trends --format plain   # Plain text, one item per line

Scripting with JSON Output

Use --format json combined with jq for powerful scripting. For example: orion content list --format json | jq '.[].id' to extract content IDs.


Configuration

The CLI reads configuration from these sources (in order of priority):

  1. Command-line flags (--gateway-url, --format)
  2. Environment variables (ORION_GATEWAY_URL, ORION_FORMAT)
  3. Config file (~/.orion/config.yaml)

Setting the Gateway URL

# Via environment variable
export ORION_GATEWAY_URL=http://localhost:8000

The gateway URL can also be set in the config file at ~/.orion/config.toml.


Next Steps