Skip to content

Configuration

Krait works with zero config for single-language projects. For monorepos or custom setups, krait.toml gives you full control.

Terminal window
krait init # auto-detect and write krait.toml
krait init --dry-run # preview without writing
krait init --force # overwrite existing config

Krait looks for config in this order:

  1. krait.toml in the project root
  2. .krait/config.toml in the project root
  3. Auto-detection (fallback)
# krait.toml — generated by `krait init`
# Optional: override the project root
# root = "."
# Workspaces to index. Each gets its own LSP server.
[[workspace]]
path = "packages/api"
language = "typescript"
[[workspace]]
path = "packages/web"
language = "typescript"
[[workspace]]
path = "backend"
language = "go"
# Optional: server overrides
# [servers.typescript]
# binary = "vtsls"
# args = ["--stdio"]
FieldTypeRequiredDescription
pathstringYesRelative path to workspace root
languagestringYesLanguage: typescript, javascript, go, rust, cpp
serverstringNoLSP server binary override for this workspace
FieldTypeDescription
binarystringServer binary name (must be in PATH or managed dir)
argsstring[]Arguments (default: ["--stdio"])

When config is loaded, krait status shows:

daemon: pid=12345 uptime=5m
config: krait.toml (5 workspaces)
lsp: 5 sessions

When auto-detected:

daemon: pid=12345 uptime=5m
lsp: 5 sessions

It’s recommended to commit krait.toml to your repository. This ensures the whole team uses the same workspace configuration:

Terminal window
git add krait.toml
git commit -m "chore: add krait config"