Skip to content

docs: clarify plugin cache path#9580

Open
lambertjosh wants to merge 1 commit intomainfrom
docs/plugin-cache-path
Open

docs: clarify plugin cache path#9580
lambertjosh wants to merge 1 commit intomainfrom
docs/plugin-cache-path

Conversation

@lambertjosh
Copy link
Copy Markdown
Contributor

Summary

  • Clarifies that npm-installed plugins are cached under packages/ in Kilo's XDG cache directory.
  • Removes platform-specific cache examples that do not match the xdg-basedir implementation.

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 27, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs (docs-staging) Ready Ready Preview, Comment Apr 27, 2026 9:04pm

Request Review

### 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).
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@kilo-code-bot
Copy link
Copy Markdown
Contributor

kilo-code-bot Bot commented Apr 27, 2026

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (1 files)
  • packages/kilo-docs/pages/automate/extending/plugins.md

Reviewed by gpt-5.5-20260423 · 462,709 tokens

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant