An OpenCode plugin that records snapshots of your codebase after each AI interaction.
The plugin intercepts AI responses and invokes the Tracy tracking system to create hidden Git commits that preserve the state of your code before and after each agent interaction.
If you are using Tracybot normally, install the VS Code extension first. It can prompt to install this plugin globally or for the current project. Manual installation methods are also provided below.
- Automatic snapshots after each AI interaction
- Captures working tree state via
tracy.py - Creates hidden commits in
refs/tracy-local/*namespace - Seamless integration with OpenCode CLI
- After each AI response, the plugin calls
tracy.pyfrom the tracking component tracy.pycreates a hidden commit using Git's ref namespace (refs/tracy-local/*)- These commits are never visible in normal Git history but can be queried by the VS Code extension
After installing the Tracybot VS Code extension, open a workspace and accept the prompt to install the OpenCode plugin.
The extension can install the plugin either:
- Globally at
~/.config/opencode/plugin/tracybot-oc.js - Per project at
.opencode/plugin/tracybot-oc.js
curl -fsSL https://raw.githubusercontent.com/TracyTeam/tracybot/main/opencode-plugin/install.sh | bashirm https://raw.githubusercontent.com/TracyTeam/tracybot/main/opencode-plugin/install.ps1 | iexOnce installed, the plugin runs inside OpenCode and calls tracy.py automatically for tracked AI interactions. The plugin does not require any additional interactions.
bun installbun run buildbun run deployThis builds the plugin and installs dist/tracybot-oc.js into the global OpenCode plugin directory ~/.config/opencode/plugin.
If you wish to install the plugin to only be active in a repository instead of globally, it can be installed into a project's .opencode directory.
bun run build
mkdir -p /path/to/repo/.opencode/plugin
cp dist/tracybot-oc.js /path/to/repo/.opencode/plugin/To view the plugin logs from the latest OpenCode run:
bun run logs- Verify the plugin file exists at
~/.config/opencode/plugin/tracybot-oc.js - If you installed per project, verify it exists at
.opencode/plugin/tracybot-oc.js - Check OpenCode logs:
bun run logs. On successful plugin startup, there will be a "Plugin Initialized" message - Ensure the repository was initialized with
init.py
- Check that
.git/tracybot/configexists in the target repository and points to a validtracy.py - Verify Git hooks are installed in the target repository
- Check for errors in the plugin logs
- Ensure write permissions on
~/.config/opencode/ - On Linux, you may need to create the config directory first
- OpenCode CLI installed
- A repository initialized with the repo-root
init.py - Python available to run
tracy.pyinside the target repository
You only need Bun when building or deploying the plugin from source.