Home / Docs / Configuration

Configuration reference

All options available in ~/.shellway/config.toml.

Default config

Running sw init creates this file with sensible defaults. Edit it with any text editor.

[ai] model = "claude-3-5-sonnet" context_tokens = 8192 auto_approve = false [context] include_cwd = true include_recent_output = true recent_output_lines = 100 exclude_paths = ["~/.ssh", "~/.aws", "**/.env"] [audit] enabled = false path = "~/.shellway/audit.log" [relay] url = "https://mcp.getshellway.com"

[ai] options

model — The AI model to use. On Free and Pro plans, this is always claude-3-5-sonnet. Enterprise customers with their own API key can specify any compatible model.

context_tokens — Maximum tokens to include in each AI request. Free plan: 8192. Pro plan: 32768. Setting this lower reduces latency slightly.

auto_approve — If true, proposed commands run immediately without confirmation. Not recommended for production use. You can temporarily set this per-session with sw --auto.

[context] options

include_cwd — Whether to include the current working directory path in context. Default true.

include_recent_output — Whether to include recent terminal output in the AI's context. Default true. Disable for high-throughput sessions where output is very noisy.

recent_output_lines — How many lines of recent terminal output to include. Default 100. Increase for debugging complex issues; decrease to save context tokens.

exclude_paths — Glob patterns of paths that Shellway will never include in context, even if you use @include. Defaults include common credential locations. Add your own sensitive paths here.

[audit] options

enabled — Enable the local audit log. Available on Pro and Team plans. Default false.

path — Where to write the audit log. Each entry records the timestamp, your question, the proposed command, and whether it was approved, edited, or rejected. Log format is newline-delimited JSON.

[relay] options

url — The relay endpoint. Change this only if you are running a self-hosted relay (Team plan). Format: https://your-relay.internal.

Security note: ~/.shellway/credentials is separate from config.toml and is never included in context. Keep your config under version control if you like — just don't commit credentials.