Skip to content

CLI Reference

Complete reference for the @luna-agents/cli command-line tool.

Installation

bash
npm install -g @luna-agents/cli

Commands

luna init

Initialize LunaOS in your project.

bash
luna init                 # Interactive setup
luna init --cloud         # Cloud mode with LunaOS account
luna init --provider anthropic  # Skip provider selection

Creates: .luna/config.yaml and .luna/reports/

luna list

List all 28+ available agents.

bash
luna list                 # Show all agents
luna list --category build  # Filter by category
luna list --json          # JSON output

Categories: build, quality, ship, intelligence, design, meta

luna run <agent>

Execute a single agent.

bash
luna run code-review              # Local mode (uses your API key)
luna run code-review --cloud      # Cloud mode (uses LunaOS API)
luna run code-review -f src/     # Target specific files
luna run code-review -o report.md # Custom output path
luna run code-review --provider anthropic --model claude-sonnet-4-20250514

luna chain <preset>

Execute multi-agent chains.

bash
luna chain full-review            # Run full code review chain
luna chain new-feature            # New feature analysis
luna chain deploy                 # Deployment readiness check
luna chain security-audit         # Security audit chain
luna chain api-design             # API design review

luna index

Index your project for RAG-powered context.

bash
luna index                # Local indexing
luna index --cloud        # Upload to LunaOS cloud
luna index --dry-run      # Preview without indexing
luna index --max-files 100  # Limit file count

luna login

Authenticate with LunaOS cloud.

bash
luna login                # Interactive email/password
luna login --browser      # OAuth in browser
luna login --key <apiKey> # Direct API key
luna login --status       # Check auth status
luna login --logout       # Remove credentials

luna keys

Manage LLM provider API keys.

bash
luna keys list            # Show configured keys
luna keys add anthropic   # Add/update a key
luna keys remove openai   # Remove a key
luna keys test            # Validate all keys

luna config

View and manage configuration.

bash
luna config list          # Show all config
luna config get provider  # Get specific value
luna config set model gpt-4o  # Set globally
luna config set model gpt-4o -p  # Set per-project
luna config path          # Show config file locations

luna status

Show project status.

bash
luna status               # Full status display

luna create-agent <name>

Create a custom agent persona.

bash
luna create-agent my-reviewer -d "Reviews Python code" -c code-quality
luna create-agent my-reviewer --global  # Save globally

Configuration

Project Config (.luna/config.yaml)

yaml
version: '1.0'
project: my-app
provider: anthropic
model: claude-sonnet-4-20250514
output:
  dir: .luna/reports
  format: markdown

Global Config (~/.luna/config.yaml)

Same structure, applies to all projects.

Credentials (~/.luna/credentials.yaml)

yaml
ANTHROPIC_API_KEY: sk-ant-...
OPENAI_API_KEY: sk-proj-...
cloud_token: lnos_live_...

Supported Providers

ProviderEnv VariableDefault Model
AnthropicANTHROPIC_API_KEYclaude-sonnet-4-20250514
OpenAIOPENAI_API_KEYgpt-4o
DeepSeekDEEPSEEK_API_KEYdeepseek-chat
GoogleGOOGLE_AI_API_KEYgemini-pro
xAIXAI_API_KEYgrok-beta
GroqGROQ_API_KEYllama-3.1-70b
MistralMISTRAL_API_KEYmistral-large
CohereCOHERE_API_KEYcommand-r-plus
PerplexityPERPLEXITY_API_KEYllama-3.1-sonar
TogetherTOGETHER_API_KEYmeta-llama/Llama-3-70b
FireworksFIREWORKS_API_KEYllama-v3p1-70b
OpenRouterOPENROUTER_API_KEYauto

Built with ❤️ for developers