Settings Generator

Configure ~/.afk/ without reading the docs.

Pick what you need. Copy the output. Paste it once.

Your input never leaves your browser. No analytics, no telemetry, and zero third-party scripts — the generator runs entirely client-side and makes no network requests. Verify it yourself: open DevTools → Network and reload.

Quick setup — covers 80% of installs

I want to run AFK with using .My ANTHROPIC_API_KEY:

Add what you need

Show all 74 optionsEvery env var + JSON field, by category — skip anything you don't need
Model & Sampling
→ afk.env

Default model for agent turns. Accepts short aliases (opus, sonnet, haiku, sonnet_1m, opus_1m) or full model IDs like claude-opus-4-5.

→ afk.env

Cap on total tokens per turn (input + output). Default 4096.

→ afk.env

Numeric temperature override for model sampling. Leave blank to use provider default.

→ afk.env

Extended-thinking mode. Accepts adaptive | disabled | enabled:<N> | enabled:max. Defaults to the model-appropriate mode (adaptive on current models) when unset.

→ afk.env

Per-turn USD budget ceiling. Aborts when projected spend would exceed this. Default $5.00.

Advanced options
→ afk.env

Per-task token budget ceiling. Aborts when cumulative usage would exceed it. Default 100 000.

→ afk.env

Cap on output tokens per turn only (not input). Falls back to provider default when unset.

→ afk.env

Override the default model used when a subagent is dispatched without an explicit model.

→ afk.env

Override the model used by the /compact summarizer. Falls back to a cheap haiku-class model when unset.

→ afk.env

Number of recent turns the compactor keeps verbatim during /compact.

→ afk.env

Per-turn timeout in milliseconds. Provider/SDK default when unset.

→ afk.env

TTL for Anthropic prompt-cache blocks. Accepts 5m or 1h.

→ afk.env

Disable Anthropic prompt caching when set to 1/true/yes/on. Unset = caching enabled (default).

Provider & Endpoints
→ afk.env

Force provider selection. Overrides the model-name heuristic. The --provider CLI flag wins when both are set.

→ afk.env

Effort hint guiding adaptive-thinking depth, forwarded as Anthropic output_config.effort (model-gated; ignored where unsupported). Accepts low | medium | high | xhigh | max.

→ afk.env

Base URL for a self-hosted Anthropic-compatible server (e.g. vllm-mlx). When set, traffic is routed away from api.anthropic.com.

→ afk.envsecret

Placeholder API key for local Anthropic-compatible servers. Set when AFK_LOCAL_BASE_URL is configured. Default "local".

→ afk.env

Base URL override for the OpenAI-compatible provider. Used for local shims (Ollama, vLLM, LM Studio, mlx_lm.server). Do not include a trailing /chat/completions — the SDK appends it automatically.

API Keys
→ afk.envsecret

Anthropic API key. Tier-1 credential — overrides keychain OAuth and CLAUDE_CODE_OAUTH_TOKEN.

→ afk.envsecret

OpenAI API key for the openai-compatible provider (gpt-*, o1*, o3*, o4* models).

→ afk.envsecret

Fallback OpenAI API key for the openai-compatible provider, read after OPENAI_API_KEY. Legacy name from the removed @openai/codex-sdk integration — prefer OPENAI_API_KEY.

→ afk.envsecret

Brave Search API subscription token, enabling web_scrape search mode. Free tier at https://brave.com/search/api/. When unset, search mode returns an actionable error; markdown and raw modes are unaffected.

System Prompt
→ afk.env

Raw system-prompt string. Tier-1 source — highest priority over afk.config.json and AFK.md. Note: newlines are not valid in afk.env; if you need a multi-line prompt, use the JSON config systemPrompt field instead.

→ afk.config.json

System prompt stored in afk.config.json. Tier-2 source (lower priority than AFK_SYSTEM_PROMPT env var). Supports multi-line content. Env var equivalent: AFK_SYSTEM_PROMPT.

Telegram
→ afk.envsecret

Telegram bot token from @BotFather. Required to run the Telegram bot surface (afk telegram start).

→ afk.env

Comma-separated list of Telegram chat IDs allowed to interact with the bot. Required when the bot is running. Get your chat ID by messaging @userinfobot.

Advanced options
→ afk.env

Set to 1 to log per-message details from the Telegram bot — chat IDs, message text, latency.

→ afk.env

Override the working directory used by the Telegram bot when spawning agent sessions.

→ afk.env

Override the directory where Telegram bot state is stored. Defaults to ~/.afk/state/telegram/.

Daemon
→ afk.config.json

Default task description for the daemon. The daemon runs this when started with no explicit task. Env override: AFK_DAEMON_TASK.

→ afk.config.json

Task identifier the daemon uses to scope its state directory and telemetry. Env override: AFK_DAEMON_TASK_ID.

→ afk.env

Working directory used by the daemon process for spawned agent sessions.

Advanced options
→ afk.env

Cooldown in milliseconds between SessionStart trigger fires. Prevents thundering-herd on rapid restarts.

→ afk.config.json

Enable the scheduled worktree-prune job in daemon mode. Default: on.

→ afk.config.json

Cron expression for the worktree-prune schedule. Default: 4 AM daily.

→ afk.config.json

Max age in days before a clean (no uncommitted changes) worktree is auto-pruned. Env override: AFK_WORKTREE_MAX_AGE_CLEAN.

→ afk.config.json

Max age in days before a dirty (uncommitted changes) worktree is auto-pruned. Env override: AFK_WORKTREE_MAX_AGE_DIRTY.

→ afk.config.json

Scope of worktrees targeted by the prune job. Default: all.

Auto-routing
→ afk.config.json

Auto-route bare slash inputs to matching skills in interactive (REPL) mode.

→ afk.config.json

Auto-route bare slash inputs to matching skills in chat (afk chat) mode.

→ afk.config.json

Auto-route bare slash inputs to matching skills in Telegram mode.

→ afk.config.json

Auto-route bare slash inputs to matching skills in daemon mode.

Advanced options
→ afk.env

Tier gate. Set to exactly 1 to unlock — surfaces internal skills (e.g. /forge, /audit-fit, harvest/distill) in the slash-command list, --help, and tab-complete. Default unset = public tier. Gates surfacing only, not access.

Interactive & Worktree
→ afk.config.json

Auto-rename worktree branches based on the first user message. Default: on. Env override: AFK_WORKTREE_AUTONAME=0 to disable.

→ afk.config.json

Branch namespace for AFK-managed worktrees. Default "afk/". Set to empty string to drop the prefix. Env override: AFK_WORKTREE_BRANCH_PREFIX.

→ afk.config.json

Master toggle for REPL ghost-text suggestions (Tier-1 history + optional Tier-2 LLM). Default: on when unset. Env override: AFK_SUGGEST_GHOST=0.

Advanced options
→ afk.config.json

Override the base git ref for worktrees created with --worktree. Defaults to the remote default branch, fetched fresh. Set to HEAD to base on the local checkout. Env override: AFK_WORKTREE_BASE; CLI: --worktree-base.

→ afk.env

Enable REPL ghost-text inline suggestions (history dropdown + optional LLM). 1 = on (default), 0 = off. Disables all ghost text when off. Tier-2 LLM is separately gated by AFK_SUGGEST_ENABLED.

→ afk.env

Enable the LLM-backed ghost-text suggestion tier in the interactive REPL. Set to 1/true/yes/on to activate. Off by default.

→ afk.env

Override the small model used for REPL ghost-text suggestions. Falls back to AFK_COMPACT_MODEL or a haiku-class model.

→ afk.env

Auto-rename worktree branches based on the first user message. 1 = on (default), 0 = off. JSON equivalent: interactive.worktreeAutoname.

→ afk.env

Branch-name prefix for AFK-managed worktrees. Default afk/. Set to empty string to drop the prefix. JSON equivalent: interactive.worktreeBranchPrefix.

→ afk.env

Override the base git ref for worktrees. Overridden per-session by --worktree-base. JSON equivalent: interactive.worktreeBase.

→ afk.env

Maximum age (in days) before a clean worktree is auto-pruned. Default 14.

→ afk.env

Maximum age (in days) before a dirty (uncommitted changes) worktree is auto-pruned. Default 30.

Browser Control
Advanced options
→ afk.env

Override default headless mode for native browser-control tools. 1/true forces headless; 0/false forces headed. When unset: headless for daemon/subagent surfaces, headed for repl/interactive.

→ afk.env

Comma-separated allowlist of URL host globs. When set, navigation to hosts outside the list returns blocked_by_policy. Unset = permissive. Combines with the blocklist — block wins.

→ afk.env

Comma-separated blocklist of URL host globs. Browser navigation matching any entry returns blocked_by_policy regardless of the allowlist.

Session Behavior
Advanced options
→ afk.config.json

When on (the default), the CLI auto-waits for the OAuth subscription reset and replays the failed turn rather than surfacing a raw 429 error.

→ afk.config.json

Show background subagent job summaries in /bgsub:list. DATA EGRESS: sends redacted transcript tails (~4 KB) to claude-haiku-4-5 via the Anthropic API. Do NOT enable in air-gapped or secret-sensitive environments. Default: off.

→ afk.config.json

Session-wide budget for background-summarizer LLM calls. Further refreshes are skipped silently after this count. Default 200, max 500.

Paths
→ afk.env

Override the AFK home directory. All config, state, and traces live here. Default ~/.afk.

Advanced options
→ afk.env

Override the AFK state directory (sessions, todos, daemon state). Default: $AFK_HOME/state/.

Updates
→ afk.config.json

Update-checker policy. "notify" shows a banner on startup; "auto" installs automatically; "off" disables the check entirely.

Debug & UI
→ afk.env

Show inline diffs in the tool-lane output for edit/write tool calls.

→ afk.env

Suppress the ANSI-colored banner at REPL startup. Useful for non-TTY captures and CI logs.

→ afk.env

Enable verbose debug logging across the codebase.

Advanced options
→ afk.env

Show rotating tips in the loading spinner during long calls. 1 = on, 0 = off.

→ afk.env

Enable the REPL !cmd / !&cmd shell-passthrough feature. On by default. Set 0/false/off/no to disable, so inputs beginning with ! are sent to the model as literal text. Equivalent to --no-shell-passthrough.

→ afk.env

Maximum number of diff lines shown in the inline diff render during write_file tool calls. Set to 0 for no cap.

→ afk.env

Maximum visual rows emitted by the user info card before collapsing the remainder into a "…(N lines collapsed)" row. Default 24.

→ afk.env

Comma-separated list of additional path globs that the write_file tool refuses to write to.

→ afk.env

Allow loading MCP configuration from <cwd>/.mcp.json. Disabled by default — opt-in to mitigate config-injection risks.

→ afk.env

Disable the agent trace subsystem entirely. Set to skip trace file writes under ~/.afk/.