Configuration
Kompile separates user-level configuration under ~/.kompile/ (and ~/.kompile/config/) from project-scoped overrides under <project>/.kompile/ and <project>/.mcp.json. CLI wizards, / commands, the web UI, and REST endpoints all read and write these same JSON files.
Precedence rule: CLI flags / environment variables → per-session snapshot (where supported) → project config (<project>/.kompile/ or <project>/config/) → user config (~/.kompile/ or ~/.kompile/config/) → built-in defaults.
Interactive CLI Wizards
Running bare kompile configure opens a unified numbered menu covering every subsystem, or invoke any wizard directly:
kompile onboard # First-run: detect/install harnesses, auth, import chats, peers
kompile explain [section] # Inspect everything installed and configured
kompile configure --status # Print configuration summary and exit
kompile configure init # Initialize ~/.kompile/ and project .kompile/ defaults
kompile configure app # 9-section server/pipeline wizard (vector store, embeddings, flags)
kompile configure chat # Chat session mode, LLM provider, model, and agent defaults
kompile configure ui # Chat display layout, sidebar, and inline content routing
kompile configure passthrough # Inspect external harnesses and MCP/tool injection setup
kompile configure enforcer # Per-project policy rules, banned tools, judge mode, semantic rules
kompile configure judge # Judge backend, direction checks, and quality scoring
kompile configure code-index # Configure and index source trees for local code search
kompile configure mcp # MCP profile, schema level, and custom MCP servers
kompile configure gateway # LLM-based tool gateway evaluation rules
kompile configure agent-defaults # Default model and per-model thinking for Codex/Claude/OpenCodeCLI & Harness User Configuration (~/.kompile/)
| File | Managed via | What it controls |
|---|---|---|
~/.kompile/chat-config.json | kompile configure chat, /config, /model | Default chat mode (local/server), LLM provider, model, system prompt, auto-compaction |
~/.kompile/chat-profiles.json | Chat launch profiles | Named, credential-free chat launch presets |
~/.kompile/harness-config.json | kompile configure judge, /judge | Judge backend/model, performance harness, build/script/lane/draft enforcer switches |
~/.kompile/auth.json | kompile auth, /auth | Stored provider credentials, OAuth tokens, and blob-store secrets (never echoed) |
~/.kompile/config/update.json | kompile update channel | Active release channel (prerelease default or stable), checkOnStartup, checkIntervalHours |
~/.kompile/config/subagent-config.json | /subagent-config | Subagent concurrency cap, model glob bans, token/time budgets, failover routes, auto-resume, tool preloads |
~/.kompile/config/agent-flags.json | Agent overrides | Per-agent CLI flag overrides |
~/.kompile/config/judge-defaults.json | /judge | Default judge provider/model preferences |
~/.kompile/config/model-prices.json | /cost | User overrides/additions to the built-in model token pricing catalog |
~/.kompile/config/gc-config.json | /gc | Store retention defaults (chatMaxAgeDays, chatMaxTotalMb, chatMaxPerSource, trashGraceDays) |
~/.kompile/config/resume.json | /resume, /resume-all | Session resume and crash-recovery defaults |
~/.kompile/config/terminal.json | Terminal integration | Persistent terminal emulator preferences for /resume-all |
~/.kompile/config/mcp-servers.json | kompile mcp add --scope user | User-scoped custom MCP servers (overridden by project .mcp.json by name) |
~/.kompile/config/a2a-agents.json | A2A integration | Remote Agent-to-Agent (A2A) peer endpoints |
~/.kompile/config/subprocess-backend-config.json | Distribution / ND4J | Backend jar resolution rules (extraJarRoots, jarNamePatterns, mavenSearchGroupPaths) |
~/.kompile/process-limits.json | /process-config global | Global background process timeouts (maxRuntimeMinutes, testTimeoutMinutes, idleTimeoutMinutes, maxConcurrent) |
~/.kompile/resource-policy.json | /resources global | Global command classification (low / high) for resource-lane admission |
~/.kompile/hooks.json | /hooks | Global Claude-style tool hooks |
~/.kompile/lsp-servers.json | lsp tool | Custom language-server binaries, fallback alternatives, or disabled languages |
~/.kompile/config/tool-gateway-config.json | kompile configure gateway | Tool gateway model source, fail-open mode, timeout, and judge scoring |
~/.kompile/config/tool-gateway-rules.json | kompile config tool-gateway | Custom allow/deny/judge tool gateway rules |
Project-Scoped Configuration (<project>/.kompile/)
| File | Managed via | What it controls |
|---|---|---|
.kompile/enforcer-config.json | kompile configure enforcer, /judge | Project judge rules, workflow mode (off/advisory/enforced), required skills/memories, memory mandate |
.kompile/enforcer-diff-patterns.json | kompile enforcer | Bootstrapped diff-pattern rules for enforced turns |
.kompile/resource-policy.json | /resources | Project-specific low/high command admission rules (overrides ~/.kompile/resource-policy.json) |
.kompile/resource-monitor.json | /resource-monitor | Project CPU/RAM/GPU pressure thresholds and subprocess monitoring settings |
.kompile/chat-continue.json | /continue, /continue-trigger | Project-global auto-continue switch, reply text, and trigger keywords |
.kompile/hooks.json | /hooks | Project-scoped pre/post tool hooks |
.kompile/lsp-check.json | lsp action=check | C/C++/CUDA compileDatabases map and defaultBackends for fail-closed clangd checks |
.mcp.json | kompile project open, kompile mcp add | Project MCP servers (Kompile stdio/SSE + project custom MCP servers) |
kompile.project.json | kompile project init | Project root marker, metadata, and generated-project settings |
Server, Crawl & Pipeline Configuration (~/.kompile/config/ or <project>/config/)
| File | What it controls |
|---|---|
app-index-config.json | Vector store type (Anserini/pgvector/Chroma/Vespa), index paths, subprocess settings, batch sizes |
pipeline-config.json | Batch sizes, thread counts (embedding, chunking, indexing), chunking strategy and parameters |
subprocess-ingest-config.json | Subprocess JVM heap, timeout, parallel workers, queue capacity |
nd4j-environment-config.json | ND4J threads, BLAS settings, CUDA config, Triton compiler, SameDiff optimizer, memory limits |
feature-flags-config.json | Toggles: guardrails, query transformation, contextual RAG, tool gateway, KV cache, graph RAG, multi-modal |
model-roles-config.json | Dense/sparse retrieval models, reranking model, hybrid search weights |
llm-provider-config.json | Server LLM provider, model, API key reference, base URL |
backup-config.json | Backup schedule, retention, format |
Auto-configuration (Server)
Probe hardware (GPU count, VRAM, CPU cores, RAM) and apply recommended subprocess, ND4J, and pipeline settings simultaneously:
# Preview what would change
curl http://localhost:8080/api/auto-configure/detect
# Detect hardware and apply recommended settings
curl -X POST http://localhost:8080/api/auto-configure/applyConfig archives
Export and import all server configs as a portable .zip bundle via CLI (kompile config export / kompile config import), the web UI (Settings → Config Archive Manager), or the REST API:
curl -X POST http://localhost:8080/api/config-archives/export -o config-backup.zip
curl -X POST http://localhost:8080/api/config-archives/import -F file=@config-backup.zipEnvironment Variables
| Variable | Effect |
|---|---|
KOMPILE_UPDATE_CHANNEL (KOMPILE_CHANNEL) | Override release channel (prerelease or stable) for kompile update, startup checks, and installers |
KOMPILE_NO_UPDATE_CHECK | Set to 1 or true to disable automatic startup update pings (also disabled when CI=true) |
KOMPILE_INSTALL_DIR / KOMPILE_DIST_HOME | Override the active Kompile distribution install root (default ~/.kompile) |
KOMPILE_VERSION / KOMPILE_VARIANT / KOMPILE_BASE_URL | Override version, variant, or mirror URL in install.sh, install.ps1, and kompile update |
KOMPILE_HARNESS_TIER | Installer tier preference for cli-harness: native or jvm |
KOMPILE_MODIFY_PATH | Set to 0 to skip shell PATH profile edits during installation |
GITHUB_TOKEN / GH_TOKEN | Optional GitHub token used for authenticated api.github.com release lookups |
Quick lookup: when to configure what
| If you want to... | Use... |
|---|---|
| Switch update channel or disable startup update pings | kompile update channel stable / kompile update channel --startup-check off |
| Change chat provider, model, or thinking effort | /auth, /model, /thinking, or kompile configure chat |
| Cap subagent concurrency, tokens, or ban models | /subagent-config (~/.kompile/config/subagent-config.json) |
| Gate heavy builds/tests behind resource admission | /resources (.kompile/resource-policy.json) |
| Bound background process runtimes | /process-config (~/.kompile/process-limits.json) |
| Configure judge rules or workflow gates | /judge, kompile configure enforcer (.kompile/enforcer-config.json) |
| Install custom MCP servers | kompile mcp add ...; see Custom MCP servers |
| Change embedding/reranking models or batch sizes | model-roles-config.json, pipeline-config.json, or kompile configure app |
| Tune ND4J / CUDA / Triton settings | nd4j-environment-config.json or POST /api/auto-configure/apply |