Install the plugin, add your CacheLayer connect token, and restart Claude Code.
This repo is for managed keys only (cl_… as CACHELAYER_KEY).
Personal API keys: https://cachelayer.org/integrations/claude-code
/plugin marketplace add befugngr/cachelayer-claude-code-plugin
/plugin install cachelayer@cachelayer-claude-code-plugin
/reload-plugins
Use a connect token from https://cachelayer.org/ (starts with cl_).
export CACHELAYER_KEY="cl_<your-token>"
# Optional when Claude Code is launched outside the repository:
export CACHELAYER_WORKSPACE_ROOT="/absolute/path/to/repository"To persist, add the same line to ~/.zshrc or ~/.bashrc.
If you launch Claude Code from Dock or Spotlight on macOS:
launchctl setenv CACHELAYER_KEY 'cl_<your-token>'[Environment]::SetEnvironmentVariable("CACHELAYER_KEY", "cl_<your-token>", "User")Fully quit and reopen Claude Code.
This plugin ships CLAUDE.md (always loaded) and PreCompact / PostCompact hooks that call CacheLayer before/after compaction.