7141ccff62
* fix: resolve pre-commit check failures - Change RuntimeError to TypeError for type validation in report/writer.py - Update pyupgrade to v3.21.2 for Python 3.14 compatibility * chore: add pytest test infrastructure Mirror the layout introduced on feature/438-token_budget: pytest + pytest-asyncio dev deps, asyncio_mode auto, a tests.* mypy override, and pytest in the mypy pre-commit hook deps so the tests/ package type-checks. * feat: add --mount and large-target pre-flight for local repos (#492) Large local targets were copied into the sandbox file-by-file via the SDK LocalDir entry, which stalls on big repos and could leave /workspace empty. - --mount <path> bind-mounts a host directory read-only at /workspace/<subdir> instead of copying it, bypassing the per-file stream. - A size pre-flight (STRIX_MAX_LOCAL_COPY_MB, default 1024) fails fast with a clear message suggesting --mount when a non-mounted local target is too big. * fix: reject empty --mount paths An empty or whitespace-only --mount value resolves to the current working directory and would silently bind-mount it into the sandbox. Reject it. * fix: dedupe local targets so a dir is never both copied and mounted If the same directory is passed via --target and --mount (or as duplicate values), it previously produced two targets — copied AND bind-mounted, and the copied one could trip the size pre-flight. Dedupe by resolved path, preferring the bind mount. * fix: treat non-positive STRIX_MAX_LOCAL_COPY_MB as disabled Previously a value of 0 (or negative) made every local target count as oversized, aborting all local scans. Now <= 0 disables the pre-flight. * fix: log unreadable subtrees during size pre-flight os.walk silently swallowed directory-listing errors, so a permission-denied subtree could make a large repo under-count and slip past the pre-flight. Surface such omissions via an onerror warning. * docs: document --mount and STRIX_MAX_LOCAL_COPY_MB Add CLI reference + example for --mount, document the size pre-flight env var, note the read-only-is-not-a-hard-boundary caveat and that remote repos are not size-checked, and clarify the backends docstring on when bind mounts apply. * Update strix/interface/main.py * Update strix/runtime/docker_client.py ---------
131 lines
4.1 KiB
Plaintext
131 lines
4.1 KiB
Plaintext
---
|
|
title: "Configuration"
|
|
description: "Environment variables for Strix"
|
|
---
|
|
|
|
Configure Strix using environment variables or a config file.
|
|
|
|
## LLM Configuration
|
|
|
|
<ParamField path="STRIX_LLM" type="string" required>
|
|
Model name in LiteLLM format (e.g., `openai/gpt-5.4`, `anthropic/claude-sonnet-4-6`).
|
|
</ParamField>
|
|
|
|
<ParamField path="LLM_API_KEY" type="string">
|
|
API key for your LLM provider. Not required for local models or cloud provider auth (Vertex AI, AWS Bedrock).
|
|
</ParamField>
|
|
|
|
<ParamField path="LLM_API_BASE" type="string">
|
|
Custom API base URL. Also accepts `OPENAI_API_BASE`, `LITELLM_BASE_URL`, or `OLLAMA_API_BASE`.
|
|
</ParamField>
|
|
|
|
<ParamField path="LLM_TIMEOUT" default="300" type="integer">
|
|
Request timeout in seconds for LLM calls.
|
|
</ParamField>
|
|
|
|
<ParamField path="STRIX_LLM_MAX_RETRIES" default="5" type="integer">
|
|
Maximum number of retries for LLM API calls on transient failures.
|
|
</ParamField>
|
|
|
|
<ParamField path="STRIX_REASONING_EFFORT" default="high" type="string">
|
|
Control thinking effort for reasoning models. Valid values: `none`, `minimal`, `low`, `medium`, `high`, `xhigh`. Defaults to `medium` for quick scan mode.
|
|
</ParamField>
|
|
|
|
<ParamField path="STRIX_MEMORY_COMPRESSOR_TIMEOUT" default="30" type="integer">
|
|
Timeout in seconds for memory compression operations (context summarization).
|
|
</ParamField>
|
|
|
|
## Optional Features
|
|
|
|
<ParamField path="PERPLEXITY_API_KEY" type="string">
|
|
API key for Perplexity AI. Enables real-time web search during scans for OSINT and vulnerability research.
|
|
</ParamField>
|
|
|
|
<ParamField path="STRIX_TELEMETRY" default="1" type="string">
|
|
Telemetry toggle. Set to `0`, `false`, `no`, or `off` to disable telemetry (PostHog, Scarf, OTEL).
|
|
</ParamField>
|
|
|
|
<ParamField path="TRACELOOP_BASE_URL" type="string">
|
|
OTLP/Traceloop base URL for remote OpenTelemetry export. If unset, Strix keeps traces local only.
|
|
</ParamField>
|
|
|
|
<ParamField path="TRACELOOP_API_KEY" type="string">
|
|
API key used for remote trace export. Remote export is enabled only when both `TRACELOOP_BASE_URL` and `TRACELOOP_API_KEY` are set.
|
|
</ParamField>
|
|
|
|
<ParamField path="TRACELOOP_HEADERS" type="string">
|
|
Optional custom OTEL headers (JSON object or `key=value,key2=value2`). Useful for Langfuse or custom/self-hosted OTLP gateways.
|
|
</ParamField>
|
|
|
|
When remote OTEL vars are not set, Strix still writes complete run telemetry locally to:
|
|
|
|
```bash
|
|
strix_runs/<run_name>/events.jsonl
|
|
```
|
|
|
|
When remote vars are set, Strix dual-writes telemetry to both local JSONL and the remote OTEL endpoint.
|
|
|
|
## Docker Configuration
|
|
|
|
<ParamField path="STRIX_IMAGE" default="ghcr.io/usestrix/strix-sandbox:1.0.0" type="string">
|
|
Docker image to use for the sandbox container.
|
|
</ParamField>
|
|
|
|
<ParamField path="DOCKER_HOST" type="string">
|
|
Docker daemon socket path. Use for remote Docker hosts or custom configurations.
|
|
</ParamField>
|
|
|
|
<ParamField path="STRIX_RUNTIME_BACKEND" default="docker" type="string">
|
|
Runtime backend for the sandbox environment.
|
|
</ParamField>
|
|
|
|
<ParamField path="STRIX_MAX_LOCAL_COPY_MB" default="1024" type="integer">
|
|
Maximum size (in MB) of a local directory target that Strix will copy into the sandbox file-by-file. Larger targets exit early with a suggestion to use `--mount` instead. Set to `0` to disable the check.
|
|
</ParamField>
|
|
|
|
## Sandbox Configuration
|
|
|
|
<ParamField path="STRIX_SANDBOX_EXECUTION_TIMEOUT" default="120" type="integer">
|
|
Maximum execution time in seconds for sandbox operations.
|
|
</ParamField>
|
|
|
|
<ParamField path="STRIX_SANDBOX_CONNECT_TIMEOUT" default="10" type="integer">
|
|
Timeout in seconds for connecting to the sandbox container.
|
|
</ParamField>
|
|
|
|
## Config File
|
|
|
|
Strix stores configuration in `~/.strix/cli-config.json`. You can also specify a custom config file:
|
|
|
|
```bash
|
|
strix --target ./app --config /path/to/config.json
|
|
```
|
|
|
|
**Config file format:**
|
|
|
|
```json
|
|
{
|
|
"env": {
|
|
"STRIX_LLM": "openai/gpt-5.4",
|
|
"LLM_API_KEY": "sk-...",
|
|
"STRIX_REASONING_EFFORT": "high"
|
|
}
|
|
}
|
|
```
|
|
|
|
## Example Setup
|
|
|
|
```bash
|
|
# Required
|
|
export STRIX_LLM="openai/gpt-5.4"
|
|
export LLM_API_KEY="sk-..."
|
|
|
|
# Optional: Enable web search
|
|
export PERPLEXITY_API_KEY="pplx-..."
|
|
|
|
# Optional: Custom timeouts
|
|
export LLM_TIMEOUT="600"
|
|
export STRIX_SANDBOX_EXECUTION_TIMEOUT="300"
|
|
|
|
```
|