Skip to content

Configuration

Cosine CLI can be configured through three methods:

  1. Command-line flags — Per-session overrides
  2. TOML configuration files — User and project settings
  3. Environment variables — Auth and file-location overrides

Press Ctrl+S on Home or in the main conversation, or open the Command Centre and search save setup. Save current setup as default saves your current main/review models, reasoning, mode, system prompt and auto-accept choice to the active personal profile. Your settings and shortcut edits already save automatically. The CLI confirms when saving succeeds. See Save your current setup for the Settings action and custom shortcuts.

Your personal settings. Never commit this file.

Authentication tokens are stored separately in ~/.cosine/auth.json (managed automatically by cos login / cos logout) and never appear in config.toml. Standalone inference credentials are also stored separately; see Standalone inference.

[inference]
model = "gpt-5.5"
model_selection_id = "cosine:gpt-5.5"
[config]
system_prompt_id = "lumen"
reasoning_level = "medium"
shell = "/bin/zsh"
agent_commits = true
ghost_text_enabled = true
agent_browser_enabled = false
agent_desktop_enabled = false
[computer.browser]
cdp_url = "http://localhost:9222"
launch_mode = "auto"

Repository automation config (.cosine.toml or cosine.toml)

Section titled “Repository automation config (.cosine.toml or cosine.toml)”

This deprecated repository config is retained only for current project automation compatibility. It supports hooks, LSP, extra context, and project skills/initialization. It does not configure profiles, authentication, inference, or models. It is safe to commit to version control when it contains no secrets.

is_topmost_config = true
[agent]
extra_context = "AGENTS.md"
[hooks]
[[hooks.on_save]]
matcher = "edit"
directories = ["apps/website"]
extensions = ["ts", "tsx"]
command = "pnpm exec eslint --fix --no-warn-ignored \"$COSINE_ON_SAVE_FILE\""
async = false
Terminal window
# Override model for one session
cos start --model gpt-5.5 --reasoning high
# One-shot automation
cos start --prompt "Review code" --auto-accept
# Use profile
cos start --profile work
# Debug mode
cos start --debug

Runtime flags have highest priority. Saved values in the selected personal profile come next, followed by build/code defaults. In particular, model selection is runtime override, then the profile’s model, then the build/code default; repository config no longer sets the model.

Some environment variables are selectors or runtime overrides rather than defaults. COSINE_CONFIG_FILE selects a different personal config file, and COSINE_AUTH_* variables override fields loaded from the platform-specific auth file.


FileLocationPurpose
config.tomlCosine config/home directoryDefault personal profile
config.<profile>.tomlCosine config/home directoryNamed personal profile
cosine.toml or .cosine.tomlRepository rootDeprecated project automation compatibility
mcp.jsonCosine config/home directoryMCP servers
inference.jsonCosine config/home directoryDefault-profile standalone inference credential
inference.<profile>.jsonCosine config/home directoryNamed-profile standalone inference credential

The Cosine config/home directory is platform-specific (typically ~/.cosine on macOS and Linux). Create different personal configurations for work and personal use:

Terminal window
# Use the default profile (config.toml)
cos
# Use the work profile (config.work.toml)
cos --profile work

Named repository profiles such as cosine.work.toml are unsupported. An explicitly selected profile must exist. If it is missing, the CLI exits with its expected path, available named profiles, cos --profile work configure remediation, and the command for returning to the default profile.

cos configure selects its target profile before asking configuration questions. Selection precedence is an explicit --profile flag, then the target profile value, then the product default.


OptionDefaultDescription
base_urlhttps://api.cosine.shOpenAI-compatible inference endpoint
modellumen-outpostMain agent model
model_selection_idderived from modelProvider-qualified model ID, such as cosine:gpt-5.5
review_modelgemini-3.1-proCode review tasks
service_tierstandardChatGPT subscription speed: fast, standard, or an advertised tier
max_context_tokens0Context limit (0=unlimited)
max_turns0Turn limit (0=unlimited)

[inference] service_tier — subscription speed

Section titled “[inference] service_tier — subscription speed”

ChatGPT subscription (Codex) models accept a speed choice. standard requests the normal tier, which is the default. fast requests priority processing, so responses arrive sooner and your ChatGPT plan limits and credits are used faster. The CLI reads the speeds Codex advertises for your account and lists only those in the Speed menu, so any additional tier your plan offers (for example ultrafast) appears there and can be set by id.

[inference]
service_tier = "standard"

Change it for the running session from Speed in the commands menu (/ → Speed). Press space when selecting a speed to save it as the default. Managed, Copilot, and Claude Max models ignore the setting; priority and default are accepted as aliases for fast and standard.

Suggested Tasks has its own model selection in Command Centre → Agents → Suggested Tasks. This selection applies to startup suggestions and on-demand suggestions, without changing your main agent model.

[agents]
suggested_tasks_model = "cosine:gpt-5.4-mini"
suggested_tasks_enabled = true

If you leave suggested_tasks_model unset, it uses gpt-5.4-mini for Cosine-managed inference or inherits your configured subscription model.

OptionDefaultDescription
system_prompt_idlumenlumen, judge, orchestrator
reasoning_levelmediumnone, low, medium, high, xhigh, adaptive, or max
modemanualStartup mode: manual, auto, plan, swarm
agent_commitstrueAuto-create Agent Commits after each turn
api_sessionstrueUse API-backed session persistence and resume
ghost_text_enabledtrueEnable inline autocomplete suggestions in the TUI
shell$SHELLTerminal shell
themedarkdark or light

Autocomplete shows inline suggestions while you type in the TUI. It is enabled by default.

To toggle it from the TUI:

  1. Type / in an empty chat input to open the commands menu.
  2. Search for autocomplete or select Autocomplete.
  3. Press Enter.

You can also run /autocomplete directly. The preference is saved to your CLI config as ghost_text_enabled.

When autocomplete is off, Cosine does not request background autocomplete suggestions.

[agent]
# Disable specific tools
disabled_tools = ["edit"]

In user config, [agent] supports disabled_tools. Deprecated repository config supports [agent].extra_context for project automation compatibility, but does not set the model.


Terminal window
# Override config file location
export COSINE_CONFIG_FILE=/path/to/config.toml
# MCP server API keys
export OPENAI_API_KEY=sk-...
export GITHUB_TOKEN=ghp_...

  1. Keep user config private — ~/.cosine/config.toml stores personal preferences, while auth tokens live in ~/.cosine/auth.json
  2. Use profiles — Separate work and personal settings
  3. Use is_topmost_config — In monorepo roots to stop parent config searches
  4. Override with flags — For temporary changes without editing files