For the complete documentation index optimized for AI agents, see llms.txt or llms-full.txt. A markdown version of this page is available by appending.mdto the URL or sendingAccept: text/markdown.
CLI Command Reference
For AI agents: the documentation index is at llms.txt (full corpus: llms-full.txt). A markdown source for this page is /cli/commands.md.
Complete reference for the Arete CLI (a4).
Global Options
Section titled “Global Options”| Option | Description |
|---|---|
--config, -c <path> | Path to arete.toml (default: arete.toml) |
--json | Output as JSON |
--verbose | Enable verbose output |
--help, -h | Show help |
--version, -V | Show version |
--completions <SHELL> | Generate shell completions (bash, zsh, fish, powershell, elvish) |
Quick Reference
Section titled “Quick Reference”| Command | Description |
|---|---|
a4 create [name] | Scaffold a new app from a template |
a4 init | Initialize a stack project |
a4 up [stack] | Deploy stack (push + build + deploy) |
a4 push [stack] | Push stack to remote (alias) |
a4 status | Show project overview |
a4 stack list | List all stacks |
a4 stack show | Show stack details |
a4 telemetry status | Show telemetry status |
a4 explore | Discover stacks and schemas |
Create a New App
Section titled “Create a New App”a4 create [name]
Section titled “a4 create [name]”Scaffold a new Arete project from a template. This is the fastest way to get started.
# Interactive — prompts for name and templatenpx @usearete/a4 create
# With project namenpx @usearete/a4 create my-app
# With specific templatenpx @usearete/a4 create my-app --template react-oreAvailable templates:
| Template | Aliases | Description |
|---|---|---|
react-ore | ore-react | ORE mining rounds viewer (React + Vite) |
rust-ore | ore-rust | ORE mining rounds client (Rust + Tokio) |
typescript-ore | ore-typescript, ts-ore, ore-ts | ORE mining rounds client (TypeScript CLI) |
Options:
| Flag | Description |
|---|---|
--template <name> | Skip interactive selection |
--offline | Use cached templates only |
--force-refresh | Clear template cache and re-download |
--skip-install | Don’t run npm install automatically |
Templates are downloaded from GitHub releases and cached in ~/.arete/templates/.
Project Setup
Section titled “Project Setup”a4 init
Section titled “a4 init”Initialize a new Arete project.
a4 initCreates arete.toml with auto-discovered stacks from .arete/*.stack.json.
a4 config validate
Section titled “a4 config validate”Validate your configuration.
a4 config validateAuthentication
Section titled “Authentication”Arete is currently in closed beta. Contact us to receive an API key.
a4 auth login
Section titled “a4 auth login”Save your API key to authenticate.
# Interactive — prompts for API keya4 auth login
# Or pass directlya4 auth login --key <your-api-key>Options:
| Flag | Description |
|---|---|
--key, -k | API key (prompts if not provided) |
a4 auth logout
Section titled “a4 auth logout”Remove stored credentials.
a4 auth logouta4 auth status
Section titled “a4 auth status”Check local authentication status.
a4 auth statusa4 auth whoami
Section titled “a4 auth whoami”Verify authentication with server.
a4 auth whoamiCredentials location: ~/.arete/credentials.toml
Schema Discovery
Section titled “Schema Discovery”a4 explore
Section titled “a4 explore”Discover available stacks and explore their schemas. Works without authentication for public stacks.
# List all available stacksa4 explore
# Show entities and views for a stacka4 explore ore
# Show fields and types for a specific entitya4 explore ore OreRound
# JSON output (for agents and scripts)a4 explore --jsona4 explore ore --jsona4 explore ore OreRound --jsonArguments:
| Argument | Description |
|---|---|
[name] | Stack name to explore |
[entity] | Entity name to show field details |
Output varies by specificity:
| Command | Shows |
|---|---|
a4 explore | All available stacks with entity names |
a4 explore <stack> | Stack entities, views, and field counts |
a4 explore <stack> <entity> | Entity fields with types, sections, and views |
Public stacks are visible without authentication. Log in with a4 auth login to also see global stacks and your own deployed stacks.
Deployment
Section titled “Deployment”a4 up [stack-name]
Section titled “a4 up [stack-name]”Deploy a stack: push, build, and deploy in one command.
# Deploy all stacksa4 up
# Deploy specific stacka4 up my-stack
# Deploy to brancha4 up my-stack --branch staging# Creates: my-stack-staging.stack.arete.run
# Preview deploymenta4 up my-stack --preview
# Preview what would be deployed (no actual deployment)a4 up my-stack --dry-runOptions:
| Flag | Description |
|---|---|
--branch, -b <name> | Deploy to named branch |
--preview | Create preview deployment |
--dry-run | Show what would be deployed without deploying |
a4 status
Section titled “a4 status”Show overview of all stacks, builds, and deployments.
a4 statusa4 status --jsonStack Management
Section titled “Stack Management”a4 stack list
Section titled “a4 stack list”List all stacks with their deployment status.
a4 stack lista4 stack list --jsonOutput:
STACK STATUS VERSION URLsettlement-game active v3 wss://settlement-game.stack.arete.runtoken-tracker active v1 wss://token-tracker.stack.arete.runa4 stack push [stack-name]
Section titled “a4 stack push [stack-name]”Push local stacks to remote.
# Push all stacksa4 stack push
# Push specific stacka4 stack push my-stacka4 stack show <stack-name>
Section titled “a4 stack show <stack-name>”Show detailed stack information including deployment status and versions.
a4 stack show my-stacka4 stack show my-stack --version 3a4 stack show my-stack -v 3Options:
| Flag | Description |
|---|---|
--version, -v <n> | Show specific version details |
Output includes:
- Entity information
- Deployment status and URL
- Latest version details
- Recent builds
a4 stack versions <stack-name>
Section titled “a4 stack versions <stack-name>”Show version history.
a4 stack versions my-stacka4 stack versions my-stack --limit 10a4 stack versions my-stack -l 10Options:
| Flag | Description |
|---|---|
--limit, -l <n> | Maximum number of versions (default: 20) |
a4 stack delete <stack-name>
Section titled “a4 stack delete <stack-name>”Delete a stack from remote.
a4 stack delete my-stacka4 stack delete my-stack --force # Skip confirmationa4 stack delete my-stack -fOptions:
| Flag | Description |
|---|---|
--force, -f | Skip confirmation prompt |
a4 stack rollback <stack-name>
Section titled “a4 stack rollback <stack-name>”Rollback to a previous deployment.
# Rollback to previous versiona4 stack rollback my-stack
# Rollback to specific versiona4 stack rollback my-stack --to 2
# Rollback to specific builda4 stack rollback my-stack --build 123
# Rollback branch deploymenta4 stack rollback my-stack --branch stagingOptions:
| Flag | Description |
|---|---|
--to <version> | Target version |
--build <id> | Target build ID |
--branch <name> | Branch to rollback (default: production) |
--rebuild | Force full rebuild |
--no-wait | Don’t watch progress |
a4 stack stop <stack-name>
Section titled “a4 stack stop <stack-name>”Stop a deployment.
a4 stack stop my-stacka4 stack stop my-stack --branch staginga4 stack stop my-stack --force # Skip confirmationOptions:
| Flag | Description |
|---|---|
--branch <name> | Branch deployment to stop |
--force, -f | Skip confirmation prompt |
SDK Generation
Section titled “SDK Generation”a4 sdk list
Section titled “a4 sdk list”List stacks available for SDK generation.
a4 sdk lista4 sdk create typescript <stack-name>
Section titled “a4 sdk create typescript <stack-name>”Generate TypeScript SDK.
a4 sdk create typescript my-stacka4 sdk create typescript my-stack --output ./src/generated/a4 sdk create typescript my-stack --package-name @myorg/my-sdka4 sdk create typescript my-stack --url wss://my-stack.stack.arete.runOptions:
| Flag | Description |
|---|---|
--output, -o <path> | Output file path (overrides config) |
--package-name, -p <name> | Package name for TypeScript |
--url <url> | WebSocket URL for the stack |
a4 sdk create rust <stack-name>
Section titled “a4 sdk create rust <stack-name>”Generate Rust SDK crate.
a4 sdk create rust my-stacka4 sdk create rust my-stack --output ./crates/a4 sdk create rust my-stack --crate-name my-stack-sdka4 sdk create rust my-stack --module # Generate as module instead of cratea4 sdk create rust my-stack --url wss://my-stack.stack.arete.runOptions:
| Flag | Description |
|---|---|
--output, -o <path> | Output directory path (overrides config) |
--crate-name <name> | Custom crate name for generated Rust crate |
--module | Generate as a module (mod.rs) instead of a standalone crate |
--url <url> | WebSocket URL for the stack |
The --module flag generates the SDK as a Rust module (with mod.rs) that can be embedded directly into an existing crate, rather than creating a standalone crate with its own Cargo.toml. This is useful for monorepo setups or when you want to include generated code within your own crate.
Configuration File
Section titled “Configuration File”File: arete.toml
[project]name = "my-project"
# SDK generation settings[sdk]output_dir = "./generated" # Default output for both languagestypescript_output_dir = "./frontend/src/generated" # Override for TypeScript onlyrust_output_dir = "./crates/generated" # Override for Rust onlytypescript_package = "@myorg/my-sdk" # Package name for TypeScriptrust_module_mode = false # Generate Rust SDKs as modules by default
# Build preferences[build]watch_by_default = true
# Stack definitions# Auto-discovered from .arete/*.stack.json# Define explicitly for custom naming or per-stack overrides:[[stacks]]name = "my-game"stack = "SettlementGame" # Stack name or path to .stack.jsondescription = "Settlement game tracking"typescript_output_file = "./src/generated/game.ts" # Per-stack TypeScript output pathrust_output_crate = "./crates/game-stack" # Per-stack Rust output pathrust_module = true # Per-stack: generate as module instead of crateSDK Configuration Options
Section titled “SDK Configuration Options”| Option | Scope | Description |
|---|---|---|
output_dir | [sdk] | Default output directory for both languages |
typescript_output_dir | [sdk] | Override output directory for TypeScript SDKs |
rust_output_dir | [sdk] | Override output directory for Rust SDKs |
typescript_package | [sdk] | Package name for generated TypeScript code |
rust_module_mode | [sdk] | Generate Rust SDKs as modules by default |
typescript_output_file | [[stacks]] | Per-stack TypeScript output file path |
rust_output_crate | [[stacks]] | Per-stack Rust output crate/module directory |
rust_module | [[stacks]] | Per-stack override for module vs crate generation |
For most projects, you only need:
[project]name = "my-project"The CLI auto-discovers stacks from .arete/*.stack.json files.
Build Process
Section titled “Build Process”Status Flow
Section titled “Status Flow”pending → uploading → queued → building → pushing → deploying → completed ↘ failedBuild Phases
Section titled “Build Phases”| Phase | Description |
|---|---|
| SUBMITTED | Queued for processing |
| PROVISIONING | Starting build environment |
| DOWNLOAD_SOURCE | Preparing source |
| INSTALL | Installing dependencies |
| PRE_BUILD | Preparing build |
| BUILD | Compiling |
| POST_BUILD | Finalizing |
| UPLOAD_ARTIFACTS | Publishing image |
| FINALIZING | Deploying to runtime |
Typical Workflows
Section titled “Typical Workflows”First-Time Setup
Section titled “First-Time Setup”# Initialize projecta4 init
# Login with your API keya4 auth login
# Validate configurationa4 config validateDevelopment Cycle
Section titled “Development Cycle”# Make changes to stack, rebuild Rust cratecargo build
# Deploya4 up my-stack
# Check statusa4 statusBranch Deploys
Section titled “Branch Deploys”# Deploy feature brancha4 up my-stack --branch feature-x# URL: my-stack-feature-x.stack.arete.run
# Check deploymenta4 stack list
# Clean up when donea4 stack stop my-stack --branch feature-xRollback
Section titled “Rollback”# Quick rollback to previous versiona4 stack rollback my-stack
# Rollback to specific versiona4 stack rollback my-stack --to 2Telemetry
Section titled “Telemetry”Arete collects anonymous usage data to improve the CLI. No personal information or project details are sent.
a4 telemetry status
Section titled “a4 telemetry status”Show current telemetry status.
a4 telemetry statusa4 telemetry enable
Section titled “a4 telemetry enable”Enable telemetry collection.
a4 telemetry enablea4 telemetry disable
Section titled “a4 telemetry disable”Disable telemetry collection.
a4 telemetry disableEnvironment Variables
Section titled “Environment Variables”| Variable | Description |
|---|---|
ARETE_API_URL | Override API endpoint |
DO_NOT_TRACK=1 | Disable telemetry (standard) |
ARETE_TELEMETRY_DISABLED=1 | Disable telemetry (Arete-specific) |
Error Reference
Section titled “Error Reference”| Error | Solution |
|---|---|
Not authenticated | Run a4 auth login |
Stack not found | Check a4 stack list for available stacks |
Stack file not found | Run cargo build to generate stack spec |
Build failed | Try again |
Config invalid | Run a4 config validate |
WebSocket URL Patterns
Section titled “WebSocket URL Patterns”After successful deployment:
| Type | Pattern |
|---|---|
| Production | wss://{stack-name}.stack.arete.run |
| Branch | wss://{stack-name}-{branch}.stack.arete.run |
| Local | ws://localhost:8080 |
Get the URL with:
a4 stack show <stack-name>