All pages

Docs · AI features

trmnly-code CLI

Availability: macOS. Ships inside the app bundle; the Linux/Windows equivalent is the portable core, not this CLI.

trmnly-code is TRMNLY's coding agent as a headless CLI — the same engine, tool surface, approval rules, and audit log as the in-app Agent, invoked from any shell. With no flags it runs fully local against Ollama (qwen3-coder:30b), so it works offline and costs nothing.

Install

Settings → AI Agent → trmnly-code CLI → Install symlinks the CLI into /usr/local/bin (or ~/bin if that's not writable) — no sudo, ever. From a shell, trmnly-code --install / --uninstall do the same.

Modes

trmnly-code "fix the failing test in auth_test.go"   # one-shot
trmnly-code                                          # interactive REPL
trmnly-code review 128                               # review a PR
trmnly-code batch prompts.txt                        # one turn per prompt

Useful flags:

Flag Does
--model / --provider / --reasoning-effort Pick the model. A vendor/model slug implies OpenRouter
--continue, --resume <id> Pick a previous session back up
--prompt-file <path> Read the prompt from a file
--auto-approve <patterns> Pre-approve matching tool calls (e.g. write_file:tests/**)
--tools-only No prose — run tools, print results
--scope <dir>, --workspace <name> Confine the run to a subtree or a project worktree (the flag keeps its old name)
--branch-guard Refuse write-shaped tools while HEAD is on main / master / prod / release/*
--no-telemetry Disable usage recording for this session
--mcp Print MCP server status and exit

The REPL

Inside the interactive loop, slash commands cover the common moves: /model (/m) and /provider to switch models, /api-key to store a provider key, /new for a fresh session, /diff and /review for the working tree, /allow to manage auto-approvals, /stats and /cost for usage, /mcp for server status, /clear, /help, /exit. The line editor has history search and tab completion.

Per-repo config

Commit a .trmnly/code.toml to pin defaults for everyone who runs the CLI in that repo:

model            = "claude-sonnet-4-6"
provider         = "anthropic"
reasoning_effort = "medium"
allowed_tools    = ["read_file", "grep", "bash"]
ignore_globs     = ["dist/**", "node_modules/**"]
auto_approve     = ["write_file:tests/**"]
scope            = "packages/web"

Flags override the file; the file overrides the app's defaults.

Safety

Everything the in-app agent enforces applies here: WRITE tools prompt for approval (in the terminal), the audit log records every call, and the branch guard layers on top of the agent's existing protections. See Agent safety.

When a tool's output carries credentials, they are scrubbed before anything is printed, and that result gets a ✂ N secrets redacted from output line — so you know something was taken out, rather than wondering why a token you expected isn't there. The notice belongs to the readable transcript, so --quiet and --json leave it out.