Skip to content
This repository was archived by the owner on Jun 24, 2026. It is now read-only.

buzinas/opencode-cachebro

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

opencode-cachebro

OpenCode plugin for cachebro -- file cache with diff tracking that saves tokens.

What it does

Drop-in replacement for file reads with intelligent caching. First read returns full content. Subsequent reads return only what changed (or a short "unchanged" confirmation), saving significant tokens.

Tool Purpose
cachebro_read_file Read a file with caching -- returns diff on changes, confirmation if unchanged
cachebro_read_files Batch read multiple files with caching
cachebro_cache_status Show files tracked and tokens saved
cachebro_cache_clear Reset the cache

Install

Add to your global OpenCode config (~/.config/opencode/opencode.json):

{
  "plugin": ["opencode-cachebro"]
}

That's it. OpenCode auto-installs the plugin at startup.

How it works

  • Global database -- cache is stored at ~/.config/cachebro/projects/<project>/cache.db, keyed by git remote URL. Multiple worktrees of the same repo share the same database.
  • File watching -- the plugin watches the project directory for changes and invalidates cache entries automatically.
  • Diff tracking -- when a file changes between reads, only the diff is returned instead of the full content.
  • Partial reads -- supports offset and limit for reading specific line ranges, also cached.

Requirements

License

MIT

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors