Skip to content
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 .md to the URL or sending Accept: 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).


OptionDescription
--config, -c <path>Path to arete.toml (default: arete.toml)
--jsonOutput as JSON
--verboseEnable verbose output
--help, -hShow help
--version, -VShow version
--completions <SHELL>Generate shell completions (bash, zsh, fish, powershell, elvish)

CommandDescription
a4 create [name]Scaffold a new app from a template
a4 initInitialize a stack project
a4 up [stack]Deploy stack (push + build + deploy)
a4 push [stack]Push stack to remote (alias)
a4 statusShow project overview
a4 stack listList all stacks
a4 stack showShow stack details
a4 telemetry statusShow telemetry status
a4 exploreDiscover stacks and schemas

Scaffold a new Arete project from a template. This is the fastest way to get started.

Terminal window
# Interactive — prompts for name and template
npx @usearete/a4 create
# With project name
npx @usearete/a4 create my-app
# With specific template
npx @usearete/a4 create my-app --template react-ore

Available templates:

TemplateAliasesDescription
react-oreore-reactORE mining rounds viewer (React + Vite)
rust-oreore-rustORE mining rounds client (Rust + Tokio)
typescript-oreore-typescript, ts-ore, ore-tsORE mining rounds client (TypeScript CLI)

Options:

FlagDescription
--template <name>Skip interactive selection
--offlineUse cached templates only
--force-refreshClear template cache and re-download
--skip-installDon’t run npm install automatically

Templates are downloaded from GitHub releases and cached in ~/.arete/templates/.


Initialize a new Arete project.

Terminal window
a4 init

Creates arete.toml with auto-discovered stacks from .arete/*.stack.json.

Validate your configuration.

Terminal window
a4 config validate

Arete is currently in closed beta. Contact us to receive an API key.

Save your API key to authenticate.

Terminal window
# Interactive — prompts for API key
a4 auth login
# Or pass directly
a4 auth login --key <your-api-key>

Options:

FlagDescription
--key, -kAPI key (prompts if not provided)

Remove stored credentials.

Terminal window
a4 auth logout

Check local authentication status.

Terminal window
a4 auth status

Verify authentication with server.

Terminal window
a4 auth whoami

Credentials location: ~/.arete/credentials.toml


Discover available stacks and explore their schemas. Works without authentication for public stacks.

Terminal window
# List all available stacks
a4 explore
# Show entities and views for a stack
a4 explore ore
# Show fields and types for a specific entity
a4 explore ore OreRound
# JSON output (for agents and scripts)
a4 explore --json
a4 explore ore --json
a4 explore ore OreRound --json

Arguments:

ArgumentDescription
[name]Stack name to explore
[entity]Entity name to show field details

Output varies by specificity:

CommandShows
a4 exploreAll 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.


Deploy a stack: push, build, and deploy in one command.

Terminal window
# Deploy all stacks
a4 up
# Deploy specific stack
a4 up my-stack
# Deploy to branch
a4 up my-stack --branch staging
# Creates: my-stack-staging.stack.arete.run
# Preview deployment
a4 up my-stack --preview
# Preview what would be deployed (no actual deployment)
a4 up my-stack --dry-run

Options:

FlagDescription
--branch, -b <name>Deploy to named branch
--previewCreate preview deployment
--dry-runShow what would be deployed without deploying

Show overview of all stacks, builds, and deployments.

Terminal window
a4 status
a4 status --json

List all stacks with their deployment status.

Terminal window
a4 stack list
a4 stack list --json

Output:

STACK STATUS VERSION URL
settlement-game active v3 wss://settlement-game.stack.arete.run
token-tracker active v1 wss://token-tracker.stack.arete.run

Push local stacks to remote.

Terminal window
# Push all stacks
a4 stack push
# Push specific stack
a4 stack push my-stack

Show detailed stack information including deployment status and versions.

Terminal window
a4 stack show my-stack
a4 stack show my-stack --version 3
a4 stack show my-stack -v 3

Options:

FlagDescription
--version, -v <n>Show specific version details

Output includes:

  • Entity information
  • Deployment status and URL
  • Latest version details
  • Recent builds

Show version history.

Terminal window
a4 stack versions my-stack
a4 stack versions my-stack --limit 10
a4 stack versions my-stack -l 10

Options:

FlagDescription
--limit, -l <n>Maximum number of versions (default: 20)

Delete a stack from remote.

Terminal window
a4 stack delete my-stack
a4 stack delete my-stack --force # Skip confirmation
a4 stack delete my-stack -f

Options:

FlagDescription
--force, -fSkip confirmation prompt

Rollback to a previous deployment.

Terminal window
# Rollback to previous version
a4 stack rollback my-stack
# Rollback to specific version
a4 stack rollback my-stack --to 2
# Rollback to specific build
a4 stack rollback my-stack --build 123
# Rollback branch deployment
a4 stack rollback my-stack --branch staging

Options:

FlagDescription
--to <version>Target version
--build <id>Target build ID
--branch <name>Branch to rollback (default: production)
--rebuildForce full rebuild
--no-waitDon’t watch progress

Stop a deployment.

Terminal window
a4 stack stop my-stack
a4 stack stop my-stack --branch staging
a4 stack stop my-stack --force # Skip confirmation

Options:

FlagDescription
--branch <name>Branch deployment to stop
--force, -fSkip confirmation prompt

List stacks available for SDK generation.

Terminal window
a4 sdk list

Generate TypeScript SDK.

Terminal window
a4 sdk create typescript my-stack
a4 sdk create typescript my-stack --output ./src/generated/
a4 sdk create typescript my-stack --package-name @myorg/my-sdk
a4 sdk create typescript my-stack --url wss://my-stack.stack.arete.run

Options:

FlagDescription
--output, -o <path>Output file path (overrides config)
--package-name, -p <name>Package name for TypeScript
--url <url>WebSocket URL for the stack

Generate Rust SDK crate.

Terminal window
a4 sdk create rust my-stack
a4 sdk create rust my-stack --output ./crates/
a4 sdk create rust my-stack --crate-name my-stack-sdk
a4 sdk create rust my-stack --module # Generate as module instead of crate
a4 sdk create rust my-stack --url wss://my-stack.stack.arete.run

Options:

FlagDescription
--output, -o <path>Output directory path (overrides config)
--crate-name <name>Custom crate name for generated Rust crate
--moduleGenerate 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.


File: arete.toml

[project]
name = "my-project"
# SDK generation settings
[sdk]
output_dir = "./generated" # Default output for both languages
typescript_output_dir = "./frontend/src/generated" # Override for TypeScript only
rust_output_dir = "./crates/generated" # Override for Rust only
typescript_package = "@myorg/my-sdk" # Package name for TypeScript
rust_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.json
description = "Settlement game tracking"
typescript_output_file = "./src/generated/game.ts" # Per-stack TypeScript output path
rust_output_crate = "./crates/game-stack" # Per-stack Rust output path
rust_module = true # Per-stack: generate as module instead of crate
OptionScopeDescription
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.


pending → uploading → queued → building → pushing → deploying → completed
↘ failed
PhaseDescription
SUBMITTEDQueued for processing
PROVISIONINGStarting build environment
DOWNLOAD_SOURCEPreparing source
INSTALLInstalling dependencies
PRE_BUILDPreparing build
BUILDCompiling
POST_BUILDFinalizing
UPLOAD_ARTIFACTSPublishing image
FINALIZINGDeploying to runtime

Terminal window
# Initialize project
a4 init
# Login with your API key
a4 auth login
# Validate configuration
a4 config validate
Terminal window
# Make changes to stack, rebuild Rust crate
cargo build
# Deploy
a4 up my-stack
# Check status
a4 status
Terminal window
# Deploy feature branch
a4 up my-stack --branch feature-x
# URL: my-stack-feature-x.stack.arete.run
# Check deployment
a4 stack list
# Clean up when done
a4 stack stop my-stack --branch feature-x
Terminal window
# Quick rollback to previous version
a4 stack rollback my-stack
# Rollback to specific version
a4 stack rollback my-stack --to 2

Arete collects anonymous usage data to improve the CLI. No personal information or project details are sent.

Show current telemetry status.

Terminal window
a4 telemetry status

Enable telemetry collection.

Terminal window
a4 telemetry enable

Disable telemetry collection.

Terminal window
a4 telemetry disable

VariableDescription
ARETE_API_URLOverride API endpoint
DO_NOT_TRACK=1Disable telemetry (standard)
ARETE_TELEMETRY_DISABLED=1Disable telemetry (Arete-specific)

ErrorSolution
Not authenticatedRun a4 auth login
Stack not foundCheck a4 stack list for available stacks
Stack file not foundRun cargo build to generate stack spec
Build failedTry again
Config invalidRun a4 config validate

After successful deployment:

TypePattern
Productionwss://{stack-name}.stack.arete.run
Branchwss://{stack-name}-{branch}.stack.arete.run
Localws://localhost:8080

Get the URL with:

Terminal window
a4 stack show <stack-name>