Skip to main content
Version: 3.1

Running Locally

Install the binary, write a config.toml with your provider keys, and run operaide-code inside an Operaide app folder. No Studio workspace required.

Install

Tagged releases publish pre-built binaries on GitHub Releases. The filename pattern is operaide-code_<version>_<os>_<arch>[.exe]. Five builds ship per tag:

  • darwin_amd64, darwin_arm64
  • linux_amd64, linux_arm64
  • windows_amd64.exe

After downloading, rename to operaide-code (or operaide-code.exe) and place it on your PATH.

macOS binaries are unsigned. Gatekeeper refuses to run them until you strip the quarantine attribute:

xattr -d com.apple.quarantine /path/to/operaide-code

Verify the install:

operaide-code --version

Where the config file lives

On first run operaide-code writes a commented template at ~/.operaide-code/config.toml. Three locations are searched in order; the first one found wins:

OrderLocationWhen to use
1$OPERAIDE_CODE_CONFIGPinning a config from a script or CI job.
2./.operaide-code/config.tomlPer-workspace or per-app config.
3~/.operaide-code/config.tomlPersonal default for all apps.

Sessions live at ~/.operaide-code/sessions/. There is one directory per session.

Minimal config

A config.toml needs one provider block and (optionally) defaults:

default_provider = "openai"
default_model = "gpt-4o"

[providers.openai]
api_key = "sk-..."
models = ["gpt-4o", "gpt-4o-mini"]

Run operaide-code in your app folder. It picks up the workspace-local config first.

Provider types

Each [providers.<name>] block has a type field that selects the wire protocol. For the well-known names anthropic, openai, and ollama, the type is inferred when omitted. Everywhere else it is required.

typeRequired fieldsOptionalNotes
anthropicapi_key, modelsNative Anthropic Messages API.
openaiapi_key, modelsbase_urlEmpty base_url hits api.openai.com. Set to a Studio proxy URL for workspace use.
ollamaendpoint, modelsendpoint defaults to http://localhost:11434.
azureapi_key, base_url, api_version, modelsAzure OpenAI Service. models holds deployment names, not raw model ids.
azureAIapi_key, base_url, modelsAzure AI Foundry. base_url ends in /models.
mistralapi_key, modelsbase_urlEmpty base_url hits https://api.mistral.ai/v1.

A laptop config that mixes providers:

[providers.anthropic]
type = "anthropic"
api_key = "sk-ant-..."
models = ["claude-sonnet-4-6", "claude-opus-4-7"]

[providers.openai]
api_key = "sk-..."
models = ["gpt-4o"]

[providers.ollama]
endpoint = "http://localhost:11434"
models = ["llama3.3", "qwen2.5-coder"]

Azure OpenAI Service

[providers.devAzure]
type = "azure"
api_key = "<AZURE_OPENAI_KEY>"
base_url = "https://my-resource.openai.azure.com"
api_version = "2024-10-01-preview"
models = ["gpt-4o-mini", "gpt-4-turbo"]

For Azure OpenAI, models holds your deployment names. Azure routes by deployment, not by raw model id. The api_version is required.

Azure AI Foundry

[providers.azureAI]
type = "azureAI"
api_key = "<AZURE_AI_KEY>"
base_url = "https://my-resource.services.ai.azure.com/models"
models = ["llama-3.3-70b-instruct"]

Mistral

[providers.mistral]
type = "mistral"
api_key = "<MISTRAL_KEY>"
models = ["mistral-large-latest", "codestral-latest"]

Environment overrides

Environment variables override fields in config.toml. An empty variable is ignored, so they do not clobber TOML values when unset.

VariableOverrides
OPERAIDE_CODE_CONFIGConfig file path.
OPERAIDE_CODE_PROVIDERdefault_provider.
OPERAIDE_CODE_MODELdefault_model.
ANTHROPIC_API_KEY[providers.anthropic] api_key.
OPENAI_API_KEY[providers.openai] api_key. Also accepts a workspace PAK.
OPERAIDE_LLM_BASE_URL[providers.openai] base_url.
OLLAMA_ENDPOINT[providers.ollama] endpoint.
AZURE_OPENAI_API_KEY[providers.azure] api_key.
AZURE_OPENAI_ENDPOINT[providers.azure] base_url.
AZURE_OPENAI_API_VERSION[providers.azure] api_version.
AZURE_AI_API_KEY[providers.azureAI] api_key.
AZURE_AI_ENDPOINT[providers.azureAI] base_url.
MISTRAL_API_KEY[providers.mistral] api_key.
MISTRAL_BASE_URL[providers.mistral] base_url.

Pointing at a local Studio dev server

If you run Studio locally and want operaide-code to use its proxy, you can do it without editing the file:

export OPERAIDE_CODE_PROVIDER=openai
export OPERAIDE_LLM_BASE_URL=http://localhost:3000/api/v1/llm/v1
export OPENAI_API_KEY=operaide_pak_dev_xxx
operaide-code

If base_url (or OPERAIDE_LLM_BASE_URL) is empty, the OpenAI provider hits api.openai.com.

Common mistakes

  • Forgetting type on a non-standard provider name. A block named [providers.litellm] needs an explicit type = "openai". Type inference only kicks in for the names openai, anthropic, and ollama.
  • Putting raw model ids in an Azure block. Azure routes by deployment, not model. models = ["gpt-4o"] fails unless your deployment is literally named gpt-4o.
  • Running outside an Operaide app folder. The agent still works, but the system prompt has no app context. The startup banner prints a warning. Either cd into an app or accept that framework-aware suggestions will be thinner.
  • Leaving a real provider key in a shared config. If you use a workspace-local .operaide-code/config.toml checked into git, scrub it. Use the user-level ~/.operaide-code/config.toml for personal keys, or read them from environment variables.