ashlr

Environment variables reference

Complete reference for all ASHLR_* environment variables — defaults, purpose, and which component reads each one.

All runtime behavior in ashlr-plugin can be tuned through environment variables. Set them in your shell profile, .env, or directly before the MCP entrypoint command. None are required for basic operation.

Core behavior

VariableDefaultDescription
ASHLR_HOOK_MODEredirectPreToolUse hook behavior. redirect — intercept native Read/Grep/Edit and deny with "use ashlr__* instead". nudge — print a suggestion but allow the native call. off — hooks fire but do nothing.
ASHLR_ROUTER_DISABLEunsetSet to 1 to revert to legacy per-server mode (kill-switch, one release cycle only).
ASHLR_MCP_HOSTclaude-codeMCP host identifier. Set to codex-cli, cline, claude-desktop, or generic for multi-host mode. Affects host-specific side effects.
ASHLR_CODEX_HOOK_MODEnudgeCodex hook behavior. nudge injects additionalContext, off disables Codex nudges, and redirect is reserved for proven redirect-compatible hooks.
ASHLR_ALLOW_PROJECT_PATHSunsetExtra workspace roots the MCP server may access when launched outside the project cwd. Use absolute paths, separated by : on Unix or ; on Windows.
ASHLR_DEBUGunsetSet to 1 to enable verbose logging from all servers to stderr.
ASHLR_VERSION(from plugin.json)Override the reported version string.

Storage paths

VariableDefaultDescription
ASHLR_HOME~/.ashlrRoot directory for all ashlr runtime state: stats.json, session-log.jsonl, caches, genome pull cache.
ASHLR_HOME_OVERRIDEunsetSame as ASHLR_HOME — older alias, still honored.
ASHLR_SESSION_LOG~/.ashlr/session-log.jsonlPath to the JSONL session log. Override to redirect logging.
ASHLR_STATS_BACKENDjsonStats storage backend. json uses ~/.ashlr/stats.json. sqlite uses ~/.ashlr/stats.db (SQLite, lower contention under heavy parallel load).
ASHLR_STATS_DB_PATH~/.ashlr/stats.dbPath to the SQLite DB when ASHLR_STATS_BACKEND=sqlite.
ASHLR_CONTEXT_DB_DISABLEunsetSet to 1 to disable the SQLite context tracking DB.

Session accounting

VariableDefaultDescription
ASHLR_SESSION_ID(from CLAUDE_SESSION_ID)Session bucket key. Inherited from the Claude Code harness. Override to isolate test sessions.
ASHLR_PRICING_MODELsonnet-4.5Model used to compute cost savings. Options: sonnet-4.5 ($3/MTok), opus-4, haiku-4.5. If you run on Opus, set this or the dollar figure will be ~5× too low.
ASHLR_SESSION_BUDGET_TOKENSunsetSoft token budget for the session. When exceeded, /ashlr-status shows a warning.
ASHLR_SESSION_BUDGET_USDunsetSoft cost budget for the session in USD.
ASHLR_ECOunsetSet to 1 to enable eco mode — reduces hook frequency and disables background prefetch.
ASHLR_CALIBRATEunsetSet to 1 to re-run tokenizer calibration against ANTHROPIC_API_KEY on startup.
ASHLR_STATS_UPLOADunsetSet to 1 to push session stats to api.ashlr.ai/v1/stats on session end (Pro feature).
ASHLR_STATS_SYNCunsetSet to 1 to sync stats on startup (pull lifetime totals from cloud).
ASHLR_DISABLE_DIGESTunsetSet to 1 to suppress the end-of-session savings digest.

Summarization and LLM

VariableDefaultDescription
ASHLR_LLM_PROVIDERlocalLLM provider for summarization. local uses ASHLR_LLM_URL. anthropic uses ANTHROPIC_API_KEY. ollama uses the Ollama API.
ASHLR_LLM_URLhttp://localhost:1234/v1Endpoint for the local LLM summarizer (LM Studio / Ollama).
ASHLR_LLM_KEYunsetAPI key for the LLM endpoint (if required).
ASHLR_LLM_MODELunsetModel name to pass to the LLM endpoint.
ANTHROPIC_API_KEYunsetWhen set, enables API-measured token counting (fire-and-forget measureTokens() calls). Also used when ASHLR_LLM_PROVIDER=anthropic.

Genome

VariableDefaultDescription
ASHLR_GENOME_AUTO1Set to 0 to disable the auto-propose hook that runs after every Write/Edit. Genome still exists; it just won't auto-update.
ASHLR_GENOME_RETRIEVALonSet to off to disable genome-backed grep routing. ashlr__grep falls back to ripgrep. Useful when debugging or the genome is stale.
ASHLR_GENOME_LOCAL_SEQ_PATH(derived from cwd)Override the genome sequential-read path for testing.
ASHLR_EMBED_URLunsetEndpoint for the embedding model (ONNX server). Used by genome similarity search.
ASHLR_EMBED_THRESHOLD0.7Cosine similarity threshold for genome section retrieval. Lower = more results, higher = stricter matching.
ASHLR_EMBED_MODELunsetEmbedding model name override.
ASHLR_PREFETCH1Set to 0 to disable background prefetch warming on ashlr__read calls (Pro).

Pro / Cloud

VariableDefaultDescription
ASHLR_PRO_TOKENunsetBearer token for api.ashlr.ai. Set after running /ashlr-upgrade. Enables cloud genome sync, hosted summarization, and stats upload.
ASHLR_PRO_ASSUMEunsetSet to 1 to assume Pro tier without verifying the token (testing only).
ASHLR_API_URLhttps://api.ashlr.aiOverride the Pro backend URL. Use for self-hosted enterprise deployments.
ASHLR_CLIENT_IDunsetOAuth client ID for the Pro auth flow.
ASHLR_TEAM_GENOME_IDunsetTeam genome identifier. Set automatically by /ashlr-genome-team-init.

Telemetry

VariableDefaultDescription
ASHLR_TELEMETRYunsetSet to on to opt into anonymous usage telemetry. Telemetry is off by default. What's sent: opaque session hash, tool call counts, no paths or content. See docs/telemetry.md for the full contract.

UI / status line

VariableDefaultDescription
ASHLR_STATUS_ANIMATE1Set to 0 to disable status-line gradient animation. Useful in CI or terminals that don't support truecolor.

Access control

VariableDefaultDescription
ASHLR_ALLOW_PROJECT_PATHSunsetAdditional paths outside cwd that tools are allowed to access. Use absolute paths, separated by : on Unix or ; on Windows.
ASHLR_HTTP_ALLOW_PRIVATEunsetSet to 1 to allow ashlr__http to access private/LAN hosts (e.g. localhost, 192.168.*). Blocked by default for safety.
ASHLR_REQUIRE_GH_CONFIRMunsetSet to 1 to require explicit confirmation before any GitHub write operation (ashlr__issue_create, ashlr__pr_approve, etc.).

Experimental

VariableDefaultDescription
ASHLR_PIPE_ENABLEunsetSet to 1 to register the experimental ashlr__pipe tool. Not counted in the 40 public tools. See ashlr__pipe.
ASHLR_PIPE_ALLOW_BASHunsetSet to 1 to allow bash() calls inside ashlr__pipe expressions. Requires ASHLR_PIPE_ENABLE=1.
ASHLR_ORCHESTRATE_REAL_LLMunsetSet to 1 to use a real LLM for orchestration graph expansion (instead of the stub).

No-install

VariableDefaultDescription
ASHLR_NO_AUTO_INSTALLunsetSet to 1 to prevent the MCP entrypoint from running bun install automatically on first spawn.
  • Architecture — how env vars are consumed by each component
  • Settings — JSON-based settings that override some of these vars
  • ashlr__pipe — the experimental pipe tool
  • Savings mathASHLR_PRICING_MODEL and ANTHROPIC_API_KEY effects on the ledger

On this page