Synoema

sno code — Command Reference

All subcommands, flags, and usage examples

Contents

Main Agent Invocation

sno code [FLAGS] [-p PROMPT]

Without -p, starts an interactive REPL session. With -p, runs a single-turn batch prompt.

Flags

FlagDefaultDescription
-p, --prompt TEXTSingle-turn prompt (batch mode). Omit for REPL
-m, --model MODELclaude-sonnet-4-6Model: alias, provider/model, or bare name
--profile NAMEfrom configActive profile name
--project-type TYPEautoauto | synoema | mixed | rust | python | js | ts | go | generic
--mode MODEaskask | auto-edits | plan | autonomous
--planShortcut for --mode plan
--autonomousShortcut for --mode autonomous
--worktreeRun in an isolated git worktree
--allow-dirtyBypass clean-tree check
--max-turns N25Maximum conversation turns
--output-format FMTtexttext | json | stream-json
--base-url URLOverride provider base URL (OpenAI-compatible)
--api-key-env VARANTHROPIC_API_KEYEnv var name for API key
--system-prompt-file PATHCustom system prompt file
--quietSuppress status line (also SNO_QUIET=1)

Examples

# Interactive session
sno code

# Batch prompt
sno code -p "explain the error handling in this codebase"

# Autonomous refactor in isolated worktree
sno code --worktree --autonomous -p "update all deps, fix breakage"

# Use a different model
sno code -m claude-opus-4-7 -p "review this PR for security issues"

# Use OpenAI-compatible provider inline
sno code --base-url https://api.deepseek.com/v1 \
  --api-key-env DEEPSEEK_API_KEY \
  -m deepseek-coder \
  -p "optimize the hot loop in src/engine.rs"

# JSON output for scripts
sno code -p "list all TODO comments" --output-format json

# Pipe from stdin
echo "add input validation to signup" | sno code

Environment variables

VariableEffect
ANTHROPIC_API_KEYDefault API key (when no profile configured)
SNO_PROFILEOverride active profile
SNO_MODELOverride model
SNO_QUIETSuppress status line
SNO_AUTONOMOUSEnable autonomous mode
SNO_AUTONOMOUS_CONFIRMED=1Bypass TTY confirmation for autonomous
SNO_TRACE=1Enable tracing
SNO_TRACE_OUT=pathCustom trace output path

sno code init

Interactive setup wizard. Creates a profile with provider, model, and API key.

sno code init [OPTIONS]

Flags

FlagDescription
--name NAMEProfile name
--provider IDanthropic | openai | deepseek | gemini | xai | openrouter | ollama | llamacpp | custom
--model IDModel identifier
--base-url URLFor OpenAI-compatible providers
--api-key-env VARStore as env reference (no key in config)
--api-key-literal KEYStore literal key (or in keychain)
--globalWrite to ~/.sno/config.toml (default)
--localWrite to ./.sno/config.toml
--no-keychainSkip OS keychain
--no-verifySkip API validation call
--headlessRequire all flags, no interactive prompts

Examples

# Interactive
sno code init

# Headless (CI/scripts)
sno code init --headless \
  --name ci \
  --provider anthropic \
  --model claude-sonnet-4-6 \
  --api-key-env ANTHROPIC_API_KEY

# Local project config
sno code init --local --name project --provider ollama --model qwen2.5-coder:32b

sno code list / use / current

sno code list [--json]

Show all configured profiles. Active profile marked with *.

sno code list
# * default    anthropic   claude-sonnet-4-6
#   cheap      deepseek    deepseek-coder
#   local      ollama      qwen2.5-coder:32b

sno code list --json

sno code use [PROFILE] [--local]

Set the active profile. Without arguments, shows an interactive picker.

sno code use cheap          # Switch to "cheap" profile
sno code use                # Interactive picker (TTY only)
sno code use work --local   # Set for this project only

sno code current [--json]

Print the active profile name (script-friendly). With --json, prints the full resolved profile including provider details, model, and role targets.

sno code current        # → default
sno code current --json # → { "provider": {...}, "model": "...", ... }

sno code config

sno code config show [--resolved]

Display config file paths and contents. --resolved prints the merged TOML after cascade resolution.

sno code config validate

Validate both user and project config files. Reports parse errors and schema violations.

sno code config edit [--local]

Open config in $EDITOR / $VISUAL / vi. Creates a skeleton if the file does not exist.

sno code config edit          # Edit ~/.sno/config.toml
sno code config edit --local  # Edit ./.sno/config.toml

sno code config detect

Show project type detection results: markers found, languages detected, primary language, resolved mode, available tools.

sno code config detect
# Mode:       rust
# Primary:    Rust (87% of source files)
# Markers:    Cargo.toml, .git
# Languages:  Rust (45), Shell (3), TOML (2)

sno code config templates [ID] [--all] [--json] [--commented]

Browse the 30 built-in provider config templates. Output a ready-to-paste TOML block.

sno code config templates              # List all 30 providers
sno code config templates anthropic    # Show Anthropic block
sno code config templates deepseek >> ~/.sno/config.toml  # Append

Config file locations

FileScope
~/.sno/config.tomlUser global
./.sno/config.tomlProject local (searched upward to root markers: .git, Cargo.toml, package.json, pyproject.toml, go.mod, sno.toml)

sno code login / logout

sno code login --provider ID [--browser] [--no-verify]

Store an API key in the OS keychain. In an interactive terminal, prompts for masked key entry.

sno code login --provider anthropic
# Enter API key: ****...

sno code login --provider openai --no-verify

Provider IDs: anthropic, openai, deepseek, gemini, xai, openrouter, ollama, llamacpp, custom

sno code logout --provider ID

Remove the keychain entry for a provider.

sno code logout --provider anthropic

sno code sessions

sno code sessions list [--json]

List all sessions with status, profile, and prompt summary.

sno code sessions list
# ULID        PID    STATUS     PROFILE   PROMPT
# ...7n2q     42315  running    default   fix the auth bug
# ...3kmp     —      completed  cheap     add tests for utils

sno code sessions list --json

Session statuses: running, completed, failed, stale (heartbeat > 30 sec).

sno code sessions show ULID

Pretty-print the full session JSON. Supports ULID suffix matching.

sno code sessions show 7n2q   # Suffix match

Session storage

Sessions are stored as append-only JSONL at:

~/.sno/projects/<project-hash>/<session-uuid>.jsonl

Project hash is SHA-256(canonical cwd)[0..16] — stable per project directory.

sno code pipeline

sno code pipeline --from FILE [--dry-run] [--json]

Execute a multi-stage pipeline defined in a TOML file.

Flags

FlagDescription
--from FILE (required)Path to the TOML pipeline definition
--dry-runValidate and print structure without executing
--jsonJSON output
--resumeResume from saved state (planned)

Examples

# Validate pipeline structure
sno code pipeline --from ci-review.toml --dry-run
# Pipeline: ci-review
#   Stages: 3
#   Tasks:  7
#   Stage 1: lint (sequential, 2 tasks)
#   Stage 2: test (parallel, 3 tasks)
#   Stage 3: review (sequential, 2 tasks)

# Execute
sno code pipeline --from ci-review.toml

# JSON report for CI
sno code pipeline --from ci-review.toml --json

Execution report

Fields: ulid, completed, failed, skipped, total_cost_usd.

sno code doctor

sno code doctor [--full] [--json] [--check NAME]

Run health checks on the agent installation.

Flags

FlagDescription
--fullRun extended checks
--jsonJSON output
--check NAMERun only the named check

Example output

sno code doctor
# [core]
#   ✓ binary         sno-code 0.1.0-beta.1
#   ✓ config         ~/.sno/config.toml valid
#   ✓ keychain       macOS Keychain available
# [agent]
#   ✓ agent_profile  "default" → anthropic/claude-sonnet-4-6
#   ✓ agent_api_key  ANTHROPIC_API_KEY set
#   ⚠ agent_rag      RAG pack not installed
#
# Summary: 5 pass, 1 warn, 0 fail

Exit code: 0 if all pass, 1 if any fail.

sno code version

sno code version [--json] [--brief]

Default output

sno-code 0.1.0-beta.1 (synoema-agent)
  License:   BUSL-1.1  →  https://synoema.tech/license
  build:     2026-04-28T10:30:00Z
  commit:    a1b2c3d
  target:    aarch64-apple-darwin
  rust:      1.83.0

Run `sno code doctor` for full health check.

JSON output

sno code version --json
# { "sno_code": { "version": "...", "license": "BUSL-1.1", ... } }

Brief output

sno code version --brief
# sno-code 0.1.0-beta.1

sno code stats / catalog

sno code stats [--json] [--by-model | --by-session | --by-profile]

Usage statistics aggregated from trace files.

sno code stats
# KEY        CALLS  TOKENS_IN  TOKENS_OUT  COST_USD   AVG_LAT_MS
# default    42     125,000    18,500      $1.23      1,450

sno code stats --by-model
sno code stats --json

sno code catalog status

Model catalog cache status: location, model count, age, staleness warning (> 90 days).

sno code catalog show [MODEL_ID]

List all known models or show details for one: pricing per Mtok, context window, provider.

sno code catalog show
sno code catalog show claude-sonnet-4-6

sno code catalog refresh [--source URL] [--offline]

Fetch an updated model catalog. --offline clears the cache.

sno code catalog clear

Remove the catalog cache.

sno code otel

Manage OpenTelemetry observability configuration.

sno code otel status

Display current observability config: exporters, endpoints, sample rate.

sno code otel test

Emit a test span to verify collector connectivity.

sno code otel init

Print a suggested configuration block for your config file.

sno code otel disable

Instructions to disable: set enabled = false in config.

Configuration

# In ~/.sno/config.toml

[agent.observability]
enabled = true
exporters = ["file", "otlp"]
sample_rate = 1.0
include_body = false           # Privacy: exclude prompt/response content

[agent.observability.file]
path = ".sno/traces/${session_id}.jsonl"
format = "otlp_json"

[agent.observability.otlp]
endpoint = "http://localhost:4318/v1/traces"
protocol = "http/protobuf"
timeout_ms = 5000

[agent.observability.stdout]
format = "pretty"
level = "warn"

Environment variables

VariableEffect
SNO_TRACE=1Enable tracing for a single run
SNO_TRACE_OUT=pathCustom trace output path
OTEL_EXPORTER_OTLP_ENDPOINTOTel collector endpoint
OTEL_EXPORTER_OTLP_HEADERSOTel collector headers
OTEL_SDK_DISABLEDDisable OTel SDK entirely

Key File Paths

PathPurpose
~/.sno/bin/sno-codeAgent binary
~/.sno/config.tomlUser-global config
./.sno/config.tomlProject-local config
~/.sno/AGENTS.mdUser-global agent context
AGENTS.mdPer-directory agent context (hierarchy)
SNO.mdPer-directory Synoema overlay (hierarchy)
~/.sno/skills/User-global skills
.sno/skills/Project-local skills
~/.sno/projects/Session storage
~/.sno/sessions/Multi-session registry
~/.sno/worktrees/Git worktree base
~/.sno/cache/Model catalog cache

Agent Overview →

Installation, quick start, profiles, sessions.

Synoema Mode →

Type-aware tools, MCP, RAG, contract verification.

Universal Mode →

Rust, Python, TypeScript, Go — any codebase.