Synoema

sno code — Universal Mode

AI coding agent for any language, any codebase

Why Use sno code for Non-Synoema Projects?

sno code is not just a Synoema tool. It is a full-featured AI coding agent with capabilities that apply to any codebase:

  • 30+ LLM providers — Anthropic, OpenAI, DeepSeek, Gemini, xAI, OpenRouter, Ollama, llama.cpp, and more
  • Profile system — switch between providers and models instantly
  • Role-based routing — use different models for reasoning vs. embedding vs. classification
  • Session persistence — every conversation is stored as JSONL with event lineage
  • Worktree isolation — agent works in a dedicated git worktree
  • OpenTelemetry — structured observability with privacy controls
  • Budget limits — multi-dimensional caps on tokens, cost, time, and tool calls
  • Pipeline execution — define multi-stage workflows in TOML
  • OS keychain — secure API key storage

Supported Languages

The agent detects project type from filesystem markers and adjusts its context accordingly:

LanguageMarkersCLI alias
RustCargo.toml, .rs files--project-type rust
Pythonpyproject.toml, requirements.txt, .py files--project-type python
TypeScripttsconfig.json, .ts/.tsx files--project-type ts
JavaScriptpackage.json, .js/.jsx files--project-type js
Gogo.mod, .go files--project-type go
Javapom.xml, build.gradle, .java files(auto-detected)
Kotlinbuild.gradle.kts, .kt files(auto-detected)
GenericNo dominant language--project-type generic

Detection uses a threshold: if ≥70% of source files belong to one language, that language’s mode is selected. Otherwise, the primary language is used or the agent falls back to Generic.

Getting Started

1. Install

curl -fsSL https://synoema.tech/install.sh | sh

2. Configure a provider

# Interactive setup
sno code init

# Or use the quick headless setup
sno code init --headless \
  --name work \
  --provider anthropic \
  --model claude-sonnet-4-6 \
  --api-key-env ANTHROPIC_API_KEY

3. Use in your project

cd my-rust-project/
sno code -p "explain the error handling strategy"
sno code -p "add tests for the auth module" --mode auto-edits
sno code --worktree -p "refactor the database layer"

Provider Configuration

sno code ships with 30 provider templates. View them all:

sno code config templates          # List all 30 providers
sno code config templates openai   # Show OpenAI config block
sno code config templates deepseek # Show DeepSeek config block

Anthropic (native)

[providers.anthropic]
env_key = "ANTHROPIC_API_KEY"

[profiles.claude]
provider = "anthropic"
model = "claude-sonnet-4-6"

OpenAI

[providers.openai]
base_url = "https://api.openai.com/v1"
env_key = "OPENAI_API_KEY"
api_kind = "openai_chat"

[profiles.gpt]
provider = "openai"
model = "gpt-4o"

DeepSeek

[providers.deepseek]
base_url = "https://api.deepseek.com/v1"
env_key = "DEEPSEEK_API_KEY"
api_kind = "openai_compat"

[profiles.deep]
provider = "deepseek"
model = "deepseek-coder"

Ollama (local)

[providers.ollama]
base_url = "http://localhost:11434/v1"
api_kind = "openai_compat"

[profiles.local]
provider = "ollama"
model = "qwen2.5-coder:32b"

API kind reference

api_kindProtocolAuth header
anthropicAnthropic Messages APIx-api-key
openai_chatOpenAI Chat CompletionsAuthorization: Bearer
openai_responsesOpenAI Responses APIAuthorization: Bearer
openai_compatOpenAI-compatible (DeepSeek, Grok, etc.)Authorization: Bearer

AGENTS.md — Project Context

Provide project-specific instructions to the agent via AGENTS.md files. These work identically to CLAUDE.md / CURSOR.md — plain Markdown injected into the system prompt.

Hierarchy

~/.sno/AGENTS.md              # User-global (loaded first)
myproject/AGENTS.md           # Repository root
myproject/src/AGENTS.md       # Subdirectory
myproject/src/api/AGENTS.md   # Deeper subdirectory (loaded last)

Files are loaded root-first, depth-ordered. Each gets a # Context: <relative-path> header injected.

What to put in AGENTS.md

  • Architecture overview and design decisions
  • Coding conventions (formatting, naming, error handling)
  • Testing strategy (what to test, how to run tests)
  • Deployment constraints
  • Module ownership and boundaries

Example

# myproject/AGENTS.md

## Architecture
REST API (Axum) + PostgreSQL. Auth via JWT.

## Conventions
- All handlers return Result<Json<T>, AppError>
- Database queries in src/db/ modules, not in handlers
- Tests use testcontainers for Postgres

## Commands
- cargo test -- runs all tests
- cargo clippy -- lint check (must pass in CI)

Secure API Key Storage

sno code stores API keys in the OS keychain by default (macOS Keychain, Linux Secret Service, Windows Credential Manager):

# Store a key in the keychain
sno code login --provider anthropic
# Prompts for masked key entry

# Remove from keychain
sno code logout --provider anthropic

Alternative: environment variables

[providers.anthropic]
env_key = "ANTHROPIC_API_KEY"   # Read from $ANTHROPIC_API_KEY at runtime

Alternative: literal in config

[providers.anthropic]
api_key = "${MY_CUSTOM_VAR}"    # Expand env var at runtime
# or
api_key = "sk-ant-..."          # Not recommended — use keychain or env

Resolution order

  1. OS keychain entry for the provider
  2. api_key field in config (literal or ${VAR} expansion)
  3. env_key field → reads the named env var
  4. CLI flag --api-key-env VAR

Project-Local Configuration

Override settings per-project with .sno/config.toml in the repository root:

# Initialize project-local config
sno code init --local

# Edit project config
sno code config edit --local

# Set active profile for this project
sno code use work --local

Project config is automatically added to .gitignore. It takes precedence over ~/.sno/config.toml but is overridden by CLI flags and env vars.

Typical project config

# .sno/config.toml

[profiles.project]
provider = "anthropic"
model = "claude-sonnet-4-6"
weak_model = "anthropic/claude-haiku-4-5"

[profiles.project.git]
require_clean_tree = "stash"   # Auto-stash instead of erroring

[agent]
active = "project"

Clean Tree Enforcement

By default, sno code refuses to run if there are uncommitted changes (to prevent conflicts with agent edits). Control this behavior:

OptionBehavior
error (default)Exit with error, show up to 10 changed files
stashAuto-stash, run agent, auto-restore on exit
ignoreSkip the check entirely
# Override per-run
sno code --allow-dirty -p "quick question"

# Configure in profile
# [profiles.X.git]
# require_clean_tree = "stash"

The agent always errors on: detached HEAD, merge in progress, rebase in progress.

Common Use Cases

Code review

sno code --plan -p "review the changes in the last 3 commits for security issues"

Refactoring

sno code --worktree --mode auto-edits \
  -p "extract the validation logic into a separate module"

Documentation

sno code -p "add docstrings to all public functions in src/api/"

Test generation

sno code --mode auto-edits \
  -p "write unit tests for src/auth/jwt.rs, target edge cases"

CI integration

# In a CI script
SNO_AUTONOMOUS_CONFIRMED=1 sno code --autonomous \
  --output-format json \
  --max-turns 10 \
  -p "fix all clippy warnings" | jq .summary

Pipeline

sno code pipeline --from .sno/ci-review.toml --json

Agent Overview →

Installation, quick start, how it works.

Synoema Mode →

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

Command Reference →

All subcommands with flags and examples.