Skip to content
Documentation menu

Reference

Environment Variables Reference

VariableRequired byPurpose
OPENROUTER_API_KEYtrusty-search /chat, trusty-common chat helpers, trusty-analyze deep pass (OpenRouter path)LLM chat via OpenRouter. Pass as argument to library helpers; never read from env inside library crates. Required for POST /analyze/deep unless a bedrock/<model-id> model is selected.
TRUSTY_LLM_MODELtrusty-analyze deep passLLM model id for the deep-analysis narrative pass. Default: openai/gpt-4o-mini (OpenRouter). Set to bedrock/<bedrock-model-id> (e.g. bedrock/us.anthropic.claude-sonnet-4-6) to route through AWS Bedrock instead of OpenRouter. The bedrock/ prefix selects the Bedrock provider; anything else routes to OpenRouter. Claude Sonnet 4.6 uses the short form without date stamp or -v1:0 suffix.
TRUSTY_MANAGER_MODELtrusty-mpm L3 tm manager digest/chat (DOC-36 §3.3)LLM model slug for the portfolio-manager digest (GET /api/v1/manager/digest) and chat (POST /api/v1/manager/chat) calls. Resolution precedence: TRUSTY_MANAGER_MODEL > TRUSTY_LLM_MODEL > openai/gpt-4o-mini. The slug is routed through the shared trusty_common::inference two-stage provider resolver (an explicit <provider>/… prefix selects a family when its credential resolves, else falls back to OpenRouter). When no provider credential resolves, /digest degrades to a clearly-marked deterministic fallback (503) and /chat returns a typed 503 — never a panic.
TRUSTY_AWS_REGIONtrusty-analyze (Bedrock deep pass)AWS region for Bedrock Converse calls. Takes priority over AWS_REGION. Default: us-east-1.
AWS_REGIONtrusty-analyze (Bedrock deep pass)Fallback AWS region for Bedrock calls. Overridden by TRUSTY_AWS_REGION.
AWS_ACCESS_KEY_ID / AWS_SECRET_ACCESS_KEY / AWS_SESSION_TOKENtrusty-analyze (Bedrock deep pass)Standard AWS credentials for Bedrock access. The full AWS credential chain (env vars, ~/.aws/credentials profiles, IAM roles, SSO) is supported. No API key is needed when using a bedrock/ model.
RUST_LOGall daemonsTracing filter, e.g. RUST_LOG=debug or RUST_LOG=trusty_search=debug,warn.
TRUSTY_MEMORY_LIMIT_MBtrusty-searchSoft RSS ceiling for indexing pipeline. Auto-tuned from system RAM; override only when needed.
TRUSTY_MAX_CHUNKStrusty-searchHard cap on chunks per index. Auto-tuned; rarely set manually.
TRUSTY_MAX_BATCH_SIZEtrusty-searchONNX embedding batch size. Auto-tuned; set if OOM during reindex.
TRUSTY_EMBEDDING_CACHEtrusty-searchLRU embedding cache capacity (entries).
TRUSTY_COREML_TRIPWIRE_MBtrusty-search (Apple Silicon)RSS-delta ceiling per CoreML batch (default 4 GB). If exceeded, batch size is halved automatically. Override for hosts with different memory pressure characteristics.
TRUSTY_GPU_MEM_LIMIT_BYTEStrusty-search / trusty-embedderd (CUDA EP, issue #600)Exact CUDA gpu_mem_limit in bytes, applied alongside arena_extend_strategy=kSameAsRequested to stop ORT's BFCArena over-reserving VRAM and OOMing a 16 GB Tesla T4. Default 12 GiB (12884901888). Takes precedence over TRUSTY_GPU_MEM_LIMIT_MB; a malformed or 0 value is ignored. Removes the need for the old TRUSTY_MAX_BATCH_SIZE=32 workaround.
TRUSTY_GPU_MEM_LIMIT_MBtrusty-search / trusty-embedderd (CUDA EP, issue #600)CUDA gpu_mem_limit in megabytes (scaled by 1024²). Used only when TRUSTY_GPU_MEM_LIMIT_BYTES is unset/invalid. E.g. 6144 for an 8 GB card.
ORT_DYLIB_PATHtrusty-search (CUDA, glibc < 2.38)Path to libonnxruntime.so on hosts with glibc < 2.38 and CUDA builds. Not used by trusty-analyze — #5067 removed ONNX Runtime from that crate along with its unused neural embedder.
SKIP_UI_BUILDtrusty-search build.rsSet to 1 to skip the Svelte UI build step (CI publish flows).
TRUSTY_NO_KGtrusty-search daemonMachine-wide default for skip_kg. When set to 1, true, or yes, every new index created via POST /indexes (or trusty-search index) has skip_kg=true applied automatically unless the caller explicitly sets skip_kg: false. Useful for CI machines or resource-constrained hosts where KG is never needed.
TRUSTY_SHUTDOWN_FLUSH_TIMEOUT_SECStrusty-search daemon (issues #874, #2922)Explicit override for the graceful-shutdown per-index HNSW/corpus flush deadline, in seconds. When unset (the default), each index's deadline is instead scaled from its own on-disk HNSW snapshot size (30s floor + 1s per 20 MB, capped at 20 minutes) so a multi-hundred-MB index gets a workable budget instead of the old flat 10s — which was short enough to time out mid-write on large indexes before atomic tmp+rename hardening landed. Set this only to force an exact value (e.g. a constrained CI/test environment); any positive integer wins outright over size-based scaling for every index. 0 or unset falls back to size scaling.
TRUSTY_SHUTDOWN_FLUSH_CONCURRENCYtrusty-search daemon (issue #2922)Max number of indexes flushed concurrently during graceful shutdown. Default 4. Previously all indexes flushed strictly sequentially, so total shutdown time was N × per-index timeout; running a bounded number in parallel keeps a fleet of small/fast indexes from queuing behind one large one while still bounding peak concurrent disk I/O. Must be a positive integer; 0 or unparseable falls back to the default.
TRUSTY_MEMORY_PALACEtrusty-memory (issue #1217)Override for the default palace ID derived from project identity. When set to a non-empty value it is slugified and used verbatim as the default palace, beating every derivation source. Precedence for the default palace: (1) TRUSTY_MEMORY_PALACE; (2) a committed .trusty-tools/trusty-memory.yaml pin file (rename-stable, keeps existing palaces from being orphaned); (3) the git owner/repo slug from remote.origin.url (bobmatnyc/trusty-toolsbobmatnyc-trusty-tools); (4) the parent/dir slug of the project root (Projects/trusty-toolsprojects-trusty-tools). Per-command --palace flags still take precedence over the default at their call sites.
TRUSTY_MPM_ORPHAN_GCtrusty-mpm daemon (issue #1458, epic #1452)Toggle the orphan-GC that reaps leaked, untracked, idle managed (tm-/tmpm-/trusty-mpm-, issue #1955) tmux sessions. Default ON; set to 0, false, off, or no (case-insensitive) to disable entirely. The GC is conservative and fail-closed: it only reaps a session that carries a managed prefix, is absent from BOTH the in-memory DaemonState registry and the SessionManager store, AND is genuinely idle (pane command is a bare shell with no live agent child), and only after the session has been observed orphaned on two consecutive sweeps (debounce). An untracked-but-active managed session is logged at warn! and KEPT, never killed.
TRUSTY_MPM_ORPHAN_GC_INTERVAL_SECStrusty-mpm daemon (issue #1458)Override the orphan-GC sweep interval in seconds. Default 60. Must be a positive integer; 0, negative, or unparsable values fall back to the default. Because the debounce is expressed in passes, this interval also sets the effective grace window — a freshly-appeared orphan survives at least one full interval before it can be reaped.
TRUSTY_MPM_AUTO_RESUMEtrusty-mpm daemonWhen 1/true, the boot-time session-manager reconcile auto-resumes every Stopped session whose tmux is gone. Default off.
TM_DISABLE_SPAWN_DISCLAIMtrusty-mpm daemon/CLI, macOS only (issue #2997)Operational safety valve: when set to any value, forces every claude/tmux-spawning call site in core::spawn_disclaim (the tmux-hosted managed-session path, the tm run/tm login inherited-stdio path, and the daemon's default actor-managed StreamJsonBackend piped spawn) back onto a plain, non-disclaimed spawn — i.e. Command::output()/Command::status()/tokio::process::Command::spawn() exactly as before #2819/#2997. Has no effect on non-macOS (there is no TCC there, so these paths are already a pure pass-through). Set this only if the disclaim path itself is suspected of causing a regression (e.g. an unexpected spawn failure that disappears with the valve on) — flipping it back to disclaiming re-exposes the original App-Data/media-library TCC mis-attribution storm the surrounding code fixes, so treat it as a temporary diagnostic step, not a standing configuration.
TRUSTY_MPM_URLtm / trusty-mpm CLI (all subcommand families)Explicit override for the daemon base URL every tm subcommand talks to. Always wins outright when set to a non-empty value — bypassing the trusty-console gateway proxy, the daemon.lock file, and the compiled-in default (http://127.0.0.1:7880) unconditionally, even when the value you set happens to equal that default verbatim. Precedence: (1) --url flag / TRUSTY_MPM_URL env var, if actually supplied; (2) the trusty-console gateway (http://{console}/api/mpm) if the console is running and reachable — when trusty-console is up, it proxies ANY /api/mpm/{path} to the daemon so all tm traffic can flow through the unified web UI (audit logging, future auth); (3) ~/.trusty-mpm/daemon.lock (records the daemon's actual bound address, which may be an ephemeral port); (4) the compiled-in default. Set TRUSTY_MPM_URL explicitly to bypass the console proxy for a specific invocation. See #2487.

trusty-tools

One Cargo workspace for the trusty-* tooling ecosystem. MIT licensed.

© 2026 · MIT · github.com/bobmatnyc/trusty-tools