Run a second, isolated Kilo Code without touching your main setup

Run a second, isolated Kilo Code without touching your main setup 图片 1
Run a second, isolated Kilo Code without touching your main setup 图片 2
Run a second, isolated Kilo Code without touching your main setup 图片 3
Run a second, isolated Kilo Code without touching your main setup 图片 4

TL;DR

  • TL;DR
    • Every Kilo surface uses the same global configuration. The CLI, the VS Code extension, and JetBrains all load providers and credentials from one place in your home directory, so a provider added anywhere shows up everywhere.
    • To run a second isolated setup, relocate both XDG_CONFIG_HOME and XDG_DATA_HOME. Moving only the config still shares your keys, because credentials live in the data directory.
    • Separate VS Code installs don’t isolate providers, not even Insiders with its own --user-data-dir.
    • For per-repo behavior rather than separate accounts, use project config in .kilo/kilo.jsonc.
    • Switching accounts inside Kilo isn’t a built-in feature. The last section covers why.
    Five ways to get separation, in rough order of how often they’re the right answer.

    How Kilo stores providers and keys

    Two directories matter, and they’re separate on purpose.
    • Config lives at ~/.config/kilo/. The kilo.jsonc file holds providers, models, and permissions. It honors XDG_CONFIG_HOME, and there’s a direct override, KILO_CONFIG_DIR.
    • Credentials live in auth.json under the data directory, ~/.local/share/kilo/, written with 0600 permissions. It honors XDG_DATA_HOME.
    The split is the part people miss. KILO_CONFIG_DIR moves the config but not the credentials. Override only the config directory and your second instance still shares your main auth.json, so real isolation has to move both.To check where any instance is reading from:
kilo debug paths

Option 1: Relocate the config and data directories

Point Kilo at a separate config and data home:

XDG_CONFIG_HOME=~/kilo-alt/config \
XDG_DATA_HOME=~/kilo-alt/data \
XDG_CACHE_HOME=~/kilo-alt/cache \
kilo

The first run there starts empty, with no providers and no credentials. Run /connect inside it to set things up, and everything writes under ~/kilo-alt/ instead of your real config.

Wrap it in an alias so it’s one word:

# ~/.zshrc
alias kilo-alt='XDG_CONFIG_HOME=~/kilo-alt/config XDG_DATA_HOME=~/kilo-alt/data XDG_CACHE_HOME=~/kilo-alt/cache kilo'

Now kilo is…

添加评论
点赞收藏
点踩分享查看原文
评论
?
参与讨论