Advanced

05 / 05

Beyond the six environment variables in the Configuration table, three more knobs cover install-time host selection and operational toggles. They're rarely needed for an ordinary install against the public service, but they're what you reach for when self-hosting, mirroring artefacts, or debugging the agent integration.

VariableRead byWhat it does
SCIRIX_RELEASESinstall scriptsBase URL for release artefacts (the binary archives + checksums.txt). Default https://cli.scirix.fi/releases. Distinct from SCIRIX_API_BASE — this is where the binary is downloaded from, not the API it talks to.
SCIRIX_NO_UPDATE_CHECKthe binary, every invocationAny non-empty value disables the background "new version available" check. For CI runners and locked-down hosts.
SCIRIX_PREPROMPT_DEBUGthe binary, scirix prepromptAny non-empty value surfaces the agent preprompt-hook diagnostics to stderr. The hook normally fails silently (exit 0, empty stdout) so it never blocks a prompt; set this when a hook isn't returning context and you need to see why.

Installing from a non-default host

SCIRIX_RELEASES is read by install.sh / install.ps1, so export it in the same shell that runs the one-liner to pull the binary from a dev or mirrored deployment instead of the public CDN:

curl -fsSL https://cli.dev.scirix.fi/install.sh \
  | SCIRIX_RELEASES=https://cli.dev.scirix.fi/releases sh
$env:SCIRIX_RELEASES = "https://cli.dev.scirix.fi/releases"
irm https://cli.dev.scirix.fi/install.ps1 | iex

SCIRIX_RELEASES affects only the install scripts. The binary's own scirix update always targets the compiled-in public release host, so a CLI installed from a mirror will still self-update from cli.scirix.fi — pin versions manually (scirix update --version …), or set SCIRIX_NO_UPDATE_CHECK=1 to leave update management to whatever provisioned the host.

Pointing a self-hosted install at its own API

Artefact host and API host are independent. A complete dev / self-hosted setup pairs SCIRIX_RELEASES (install time) with SCIRIX_API_BASE + SCIRIX_UI_BASE (use time). The most durable way to pin the API target is a per-install config.json so every invocation resolves it without re-exporting (see API base resolution):

// ~/.scirix/config.json  (Windows: %USERPROFILE%\.scirix\config.json)
{ "apiBase": "https://api.dev.scirix.fi", "uiBase": "https://ui.dev.scirix.fi" }

With that file in place, scirix auth login mints its token against the dev realm and every later command follows. Prefer the env vars (SCIRIX_API_BASE / SCIRIX_UI_BASE) for one-off or ephemeral shells, and the per-tree .scirix-namespace apiBase when different folder trees on one machine need different hosts.

Agent hook locations

scirix hooks install writes the preprompt hook into each agent's own config surface. Where that lands, and anything the agent needs beyond the install itself:

AgentHook locationNotes
Claude Code~/.claude/settings.jsonMerged entry under hooks.UserPromptSubmit; other keys untouched.
Codex~/.codex/hooks.jsonSame merged shape as Claude Code.
Copilot~/.copilot/hooks/scirix.jsonscirix-owned file serving VS Code, Visual Studio, and the Copilot CLI. The CLI's prompt event is notification-only, so injection works in the IDEs but not the CLI.
Gemini CLI~/.gemini/settings.jsonUnder Gemini's BeforeAgent event; injected via a JSON envelope (--format gemini).
Qwen Code~/.qwen/settings.jsonUserPromptSubmit; JSON envelope (--format qwen).
Junie~/.junie/config.jsonHooks run in the Junie CLI; the IDE plugin loads the skill but not hooks. Flat JSON output (--format junie).
Kimi Code CLI~/.kimi-code/config.tomlA [[hooks]] entry edited in place — comments and other config are preserved byte-for-byte.
OpenCode~/.config/opencode/plugin/scirix.jsGenerated plugin registering chat.message; auto-loaded, nothing to enable.
OpenClaw~/.openclaw/extensions/scirix/Generated plugin. Enable once (openclaw plugins enable scirix + gateway restart) and usually pin a namespace: scirix hooks install --agent openclaw --namespace <id>.
Hermes Agent~/.hermes/plugins/scirix/Generated plugin. Enable once (hermes plugins enable scirix) and usually pin a namespace, as for OpenClaw.
Grok BuildNo hook — Grok's prompt event ignores hook output, so it gets the agent skill only.

Re-running scirix hooks install is always safe: installs are idempotent and self-healing (a stale binary path is rewritten in place), and scirix hooks uninstall removes exactly what scirix wrote, leaving foreign entries alone.