Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Environment variables

VariableDefaultPurpose
CASTELLAN_SOCKET~/.config/castellan/castellan.sockMultiplexer Unix socket path
CASTELLAN_ENVunsetSet to 1 in castellan-managed pane shells
RUST_LOGinfoTracing filter for castellan subcommands
CASTELLAN_DOCS_URLhttps://castellan-docs.pages.devllms.txt / sitemap base URL in CI scripts
OPENROUTER_API_KEYunsetOpenRouter auth when [models] provider = "openrouter" (never store in TOML)
OPENAI_API_KEYunsetOpenAI / compatible HTTP LLM auth
CASTELLAN_LLM_API_KEYunsetFallback LLM API key (any OpenAI-compatible provider)
CASTELLAN_LLM_BASE_URLprovider defaultOverride OpenAI-compatible base URL
CASTELLAN_LLM_MODELgpt-4o-miniDefault model id for env-based HTTP clients
OLLAMA_URLunsetOptional local LLM base (doctor/tests; Ollama provider appends /v1)
OLLAMA_MODELllama3.2Model name for Ollama chat API
GOVCRAFT_MODEin_tree_honest_equivalentMeeting-sched acceptance mode: upstream_meeting_sched, llm_scheduling_hook (historical env name)
GOVCRAFT_UPSTREAM_TRIALS5Trial count for --upstream-repro deterministic sweep
CASTELLAN_PERMISSION_MODEunsetOverride permissions.default_mode (allow / deny / prompt)
CASTELLAN_PERMISSION_PROMPTunset (non-TTY → deny)Headless Prompt resolution: allow or deny. TTY castellan run prompts interactively when unset. Legacy: FLOCK_PERMISSION_PROMPT

OpenRouter

export OPENROUTER_API_KEY=sk-or-...
# castellan.toml:
# [models]
# provider = "openrouter"
# default = "openai/gpt-4o-mini"
cargo run -p castellan-cli --features llm-http -- doctor
cargo test -p castellan-runtime --features llm-http openrouter_chat_completions_smoke -- --ignored

castellan doctor stage llm_provider reports key_present and TCP reachability — never the key value.

Upstream meeting-sched acceptance (Bet 1)

Optional LLM repro on the upstream meeting-sched fixture (govcraft_acceptance crate — historical name):

export OLLAMA_URL=http://127.0.0.1:11434
cargo test -p govcraft_acceptance --test llm_integration -- --ignored
cargo run -q -p govcraft_acceptance -- --upstream-repro

Without OLLAMA_URL, --upstream-repro emits deterministic baselines and an honest gap table (not the published 48.5% LLM band).

Session / remote

VariablePurpose
SSH_AUTH_SOCKUsed by castellan remote --ssh for agent forwarding

Hooks

See agent hooks for CASTELLAN_SOCKET in shell hook scripts.