CLI Reference
Complete reference for everysvantic command, organized by category.
Quick Start
Install the Svantic CLI globally:Command Summary
Chat
| Command | Description |
|---|---|
svantic | Start an interactive chat session with AI agents |
svantic chat | Explicit chat command (same as default) |
Forge
| Command | Description |
|---|---|
svantic forge tool | Generate tool specs from OpenAPI, source code, or natural language |
svantic forge agent | Scaffold a complete agent service from tool specs |
Admin
| Command | Description |
|---|---|
svantic status | Show platform health and connectivity |
svantic tenants list | List all tenants |
svantic tenants get | Get details for a specific tenant |
svantic agents list | List registered agents |
svantic sessions list | List recent sessions |
svantic config show | Display current CLI configuration |
Chat Commands
svantic (default)
Start an interactive chat session with AI agents on the Svantic mesh. This is the default action when no command is specified.| Argument | Description |
|---|---|
message | Optional message to send (for headless mode) |
| Option | Description |
|---|---|
--svantic-url <url> | Svantic platform URL (default: https://api.svantic.com, or SVANTIC_URL) |
--model <name> | LLM model name (e.g., gemini-2.5-flash, gemini-2.5-pro) |
--session <id> | Reuse an existing session ID |
--client-id <id> | Client ID for authentication (or SVANTIC_CLIENT_ID) |
--client-secret <sec> | Client secret for authentication (or SVANTIC_CLIENT_SECRET) |
--headless | Send a single message and exit (no interactive UI) |
--message <text> | Message to send (alternative to positional arg) |
--verbose | Show full tool call/result JSON |
svantic chat
Explicit chat command. Identical to runningsvantic with no command.
Forge Commands
AI-powered tool and agent generation. Forge commands run locally and do not require mesh credentials.svantic forge tool
Generate tool specifications from OpenAPI specs, TypeScript source files, or natural language prompts.| Option | Description |
|---|---|
--spec <file> | OpenAPI v3 spec (YAML/JSON) or existing Tool Spec YAML |
--list <file> | List all operations in the spec (no generation) |
--prompt <text> | AI-powered generation from natural language |
--docs <url> | Documentation URL for context (use with --prompt) |
--pick <names> | Comma-separated path prefixes or function names to include |
--domain <name> | Override domain name (default: derived from spec title) |
--out <dir> | Output directory (default: current directory) |
GOOGLE_API_KEY):
svantic forge agent
Scaffold a complete agent service from one or more tool specs.| Option | Description |
|---|---|
--name <name> | Agent service name (required) |
--spec <file> | Tool Spec YAML or OpenAPI spec file |
--tools <files> | Comma-separated spec files for multi-domain compose |
--standalone | Generate full project scaffolding (package.json, Dockerfile, tsconfig.json) |
--description <text> | Agent description override |
--port <number> | Port override (default: 9100) |
--out <dir> | Output directory (default: ./<name>/) |
Admin Commands
Platform administration commands. Require a valid JWT token (SVANTIC_TOKEN) or super-admin credentials.
svantic status
Show platform health and connectivity status.- Platform edge health status
- Mesh connection status
- Service version
- Uptime
svantic tenants list
List all tenants on the platform.- Tenant ID
- Name
- Status
- Created date
svantic tenants get
Get detailed information about a specific tenant.| Argument | Description |
|---|---|
tenant_id | The tenant ID to retrieve |
svantic agents list
List all registered agents.- Agent ID
- Agent Type
- Name
- Status
- Tenant ID
svantic sessions list
List recent sessions.- Session ID
- Tenant ID
- Agent Type
- Status
- Created date
- Message count
svantic config show
Display the current CLI configuration.- Svantic platform URL
- Token status (set/not set, masked)
- Config file location and status
Exit Codes
| Code | Meaning |
|---|---|
0 | Success |
1 | Failure — invalid arguments, command error, authentication failure, or network error |
Environment Variables
| Variable | Description | Default |
|---|---|---|
SVANTIC_CLIENT_ID | Client ID for mesh authentication | (none) |
SVANTIC_CLIENT_SECRET | Client secret for mesh authentication | (none) |
SVANTIC_URL | Svantic platform URL | https://api.svantic.com |
SVANTIC_TOKEN | JWT token for admin commands | (none) |
GOOGLE_API_KEY | Google API key for AI-powered forge generation | (none) |
.env file in the working directory or in ~/.svantic/config.json.
Configuration File
The CLI reads configuration from~/.svantic/config.json:
Authentication
Chat commands
Chat commands (interactive and headless) require client credentials:Admin commands
Admin commands require a JWT token:~/.svantic/config.json.
Interactive Mode Features
When running in interactive mode, the terminal provides:Slash Commands
| Command | Description |
|---|---|
/help | Show all available commands |
/clear | Clear conversation history |
/verbose | Toggle verbose mode |
/session | Show current session ID |
/load | Load a previous session |
/attach | Attach file to next message |
/upload | Upload a file as an artifact |
/mcp | Manage MCP servers |
/approvals | List tool approvals |
/routes | Show active instance routes |
/reset | Start a new session |
/quit | Exit the terminal |
Tool Approvals
When an agent requests to execute a sensitive tool, you’ll be prompted to:- Approve — allow this single invocation
- Approve for session — allow all future calls in this session
- Approve permanently — allow across all sessions
- Deny — reject the invocation
File Attachments
Attach files using/attach <path> or type @ to open a file picker.
Headless Mode
Headless mode is designed for scripting and CI/CD pipelines.Output Streams
- stdout — response text only
- stderr — diagnostics (tool calls, thinking, errors)
