docs: clarify plugin cache path#9580
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
| ### How plugins are installed | ||
|
|
||
| - **npm plugins** are installed automatically at startup using Bun. Packages and their dependencies are cached in Kilo's XDG cache directory (`~/.cache/kilo/` on Linux, `~/Library/Caches/kilo/` on macOS, `%LOCALAPPDATA%\kilo\` on Windows). | ||
| - **npm plugins** are installed automatically at startup using Bun. Packages and their dependencies are cached under `packages/` in Kilo's XDG cache directory (`~/.cache/kilo/packages/` by default, or `$XDG_CACHE_HOME/kilo/packages/` when `XDG_CACHE_HOME` is set). |
There was a problem hiding this comment.
WARNING: Documented npm plugin cache path does not match the installer
Npm.add() builds this cache path from @opencode-ai/shared/global, where the app directory is opencode, so npm plugins currently install under ~/.cache/opencode/packages/ (or $XDG_CACHE_HOME/opencode/packages/). Pointing users to ~/.cache/kilo/packages/ will make cache reset/debugging steps miss the files unless the implementation is changed to use Kilo's global path.
| - **Local plugin can't find an npm import** — add a `package.json` in the config directory so `bun install` picks up the dependency (see [Dependencies](#dependencies)). | ||
| - **Plugin loads in dev but not in CI** — verify `KILO_PURE` is not set, and that npm-installed plugins are cached (Kilo's XDG cache directory — `~/.cache/kilo/` on Linux, `~/Library/Caches/kilo/` on macOS, `%LOCALAPPDATA%\kilo\` on Windows). Run with `--log-level DEBUG` to see install output. | ||
| - **Reset the plugin cache** — delete the `node_modules/` under Kilo's cache directory (or the `node_modules` cache under your config directory) and restart Kilo. | ||
| - **Plugin loads in dev but not in CI** — verify `KILO_PURE` is not set, and that npm-installed plugins are cached under `packages/` in Kilo's XDG cache directory (`~/.cache/kilo/packages/` by default, or `$XDG_CACHE_HOME/kilo/packages/` when `XDG_CACHE_HOME` is set). Run with `--log-level DEBUG` to see install output. |
There was a problem hiding this comment.
WARNING: Troubleshooting cache path points at the wrong directory
This repeats the kilo/packages path, but npm-installed plugins are resolved through @opencode-ai/shared/global and are cached under opencode/packages. Users following this CI/debugging advice will inspect the wrong cache directory unless the implementation is changed to use Kilo's cache root.
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (1 files)
Reviewed by gpt-5.5-20260423 · 462,709 tokens |
ab704cc to
3a9c0a5
Compare
Summary
packages/in Kilo's XDG cache directory.xdg-basedirimplementation.