OpenCode WakaTime Tracker
Record AI coding activity, file changes, and time from OpenCode in WakaTime.
- Source repo
- angristan/opencode-wakatime
- Stars
- ★ 204
- Last updated
- 21d ago
- License
- MIT
- Primary language
- TypeScript
- FA score
- 64/100 · Some gaps
At a glance
- How it runs
- Works with
- Platform-specific
- Setup effort
- Medium · a few setup steps
- You'll need
- Typical use
- OpenCode v1 or v2 developers who want AI coding time included in WakaTime.
- Not a fit if
- Developers who do not use OpenCode
- Teams that do not want activity data sent to WakaTime
- Source review
- 64/100 · Some gaps
What does this agent do, and when should you use it?
This WakaTime plugin supports OpenCode v1 and v2 through their respective plugin interfaces. It tracks file reads and operations such as edit, write, patch, multiedit, and batch, then passes file paths, the project directory, and available line counts through a shared heartbeat queue. The plugin invokes wakatime-cli to send heartbeats to the WakaTime API, rate-limits them to one per project per minute, and flushes the queue when a session goes idle or ends. Heartbeats include the “ai coding” category and AI line-change data for WakaTime analytics. Install it through OpenCode config or the npm installer; a WakaTime API key is required, and the installer edits global OpenCode config only.
The plugin collects activity from OpenCode v1 message.part.updated, chat.message, and session events, or from v2 ctx.tool.hook, ctx.session.hook, and ctx.event.subscribe. It extracts file paths and available additions and deletions; writes do not estimate line counts. Activity enters a heartbeat queue, which sends at most once per project per minute and flushes pending heartbeats on idle/end. wakatime-cli sends the entity path, project working directory, net AI line changes, and “ai coding” category to the WakaTime API. A WakaTime API key is required; the plugin can download the CLI when it is missing.
- OpenCode v1 or v2 developers who want AI coding time included in WakaTime.
- Developers who want file-level records of OpenCode reads and modifications.
- Team members who want available added and removed line counts reported as AI coding metrics.
- OpenCode users who run file operations through batch and want supported child operations tracked.
How do you install or deploy this agent?
First configure a WakaTime API key in ~/.wakatime.cfg; when WAKATIME_HOME is set, use $WAKATIME_HOME/.wakatime.cfg. Then register the plugin in OpenCode config:
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["opencode-wakatime"]
}Alternatively, register it with the global npm installer:
npm i -g opencode-wakatime
opencode-wakatime --installRestart OpenCode after installation. The installer edits global OpenCode config and does not change project config.
How do you use this agent?
After setting the API key and restarting OpenCode, use OpenCode as usual. The plugin automatically tracks supported file-tool activity and sends rate-limited heartbeats; it flushes the queue when a session goes idle or ends. To remove the global registration:
opencode-wakatime --uninstallThe plugin can download wakatime-cli automatically. macOS users can also install it manually:
brew install wakatime-cliWhat are this agent's strengths and limitations?
- Supports both OpenCode v1 and v2, with shared config registration and an npm installer.
- Tracks read, edit, write, patch, multiedit, and supported child operations from batch.
- Rate-limits heartbeats per project and flushes them when sessions go idle or end.
- Can automatically download and update wakatime-cli and reports AI line-change metrics.
- It is for OpenCode and requires a WakaTime API key and the WakaTime service.
- Heartbeats depend on wakatime-cli; automatic download needs network access and write access to the WakaTime files directory.
- Writes do not include estimated line counts, and v2 has no built-in multiedit tool.
- The README says the v2 plugin API is still changing and targets @opencode/plugin 2.0.18.
How does this agent compare with similar options?
The README names claude-code-wakatime as its inspiration and points OpenAI Codex CLI users to codex-wakatime; this plugin targets OpenCode.
Key facts side by side with the most closely related agents.
| Agent | Source review | Form / cost | Stars | Updated | Language | Full support on |
|---|---|---|---|---|---|---|
| OpenCode WakaTime Tracker This agent | 64 · Some gaps | Agent plugin / skill | ★ 204 | 21d ago | TypeScript | — |
| cc-router Multi-Model Gateway | 77 · Good | Desktop appFree + model costs | ★ 283 | 2d ago | Rust | Codex · Claude Code · OpenAI API · Claude API |
| UmaDev | 73 · Some gaps | CLIFree + model costs | ★ 265 | 20d ago | Rust | Codex · Claude Code |
| Autoprompt Skill | 69 · Some gaps | CLIFree + model costs | ★ 1.2k | 15d ago | JavaScript | Codex · Claude Code |
How does FollowAgents rate this agent?
Why each dimension lost points
The plugin is scoped to OpenCode activity, project file paths, and heartbeats. The README lists the entity, project directory, AI line changes, category, and plugin identifier sent to WakaTime, and says the API key belongs in WakaTime configuration. It does not explain whether heartbeats include other sensitive metadata or offer data minimization controls. Tracking and CLI download occur after configuration without per-action confirmation, so these criteria are not fully satisfied. The installer documents uninstall and preserving other settings. The README and package metadata identify the repository and package, but the author field is empty and publisher identity is unverified, limiting attribution.
The README describes v1/v2 entrypoints, hooks, rate limiting, queue flushing, and some cleanup behavior, and notes limits such as no line counts for writes and a changing v2 API. The package pins jsonc-parser and sets a minimum tar override, but the auto-downloaded CLI and upstream OpenCode/WakaTime services remain external dependencies. Troubleshooting lists config, log, API key, network, and permission checks. Static documentation is not evidence of successful execution.
The intended audience is OpenCode v1 or v2 users who want AI coding activity recorded in WakaTime. The README details hooks and tool coverage for each version, and notes the target v2 API version, possible differences in older previews, and lack of built-in v2 multiedit. Installation covers npm configuration, the global installer, XDG paths, and differences from project-level configuration; support for nonstandard environments remains limited.
The README is organized around features, prerequisites, installation, operation, files, development, and troubleshooting. Installation, upgrade paths, uninstall, and handling multiple config files are detailed. The MIT license file matches package metadata. Naming and entrypoints are explained, but version history is represented mainly by the package version and CI/semantic-release configuration; the supplied material has no per-version changelog. Maintainer responsibility and a support channel are also unclear, so points are deducted.
The plugin claims to record file activity, AI line changes, and time, with per-project rate limiting and session-end flushing, providing potentially useful WakaTime dashboard data. The README describes heartbeat fields and differences among read/write tools, but writes do not estimate line counts and v1/v2 coverage differs. The everyday value is clear, while tracking accuracy, resource cost, and benefit are not quantified.
The main feature claims are traceable in the README to specific tools, hooks, heartbeat fields, and installation behavior. Package metadata, the license, and CI configuration provide additional support for package identity, licensing, and project workflow claims. Some behavior has corroboration across files, but the supplied material does not include test contents or independent execution results. The README distinguishes some limits and the target API version, while several feature claims remain README-only.
- The plugin sends file paths and AI coding activity heartbeats to WakaTime; confirm that this fits your data-recording requirements.
- The CLI may be downloaded and updated automatically, requiring network access and write permission to ~/.wakatime/ or WAKATIME_HOME; the v2 API may continue to change.
Recent releases
Latest entries from the project's GitHub Releases. Notes are quoted from upstream as written, not rewritten or tested by FollowAgents.
-
Release notes excerpt
[1.4.0](https://github.com/angristan/opencode-wakatime/compare/v1.3.9...v1.4.0) (2026-09-27) Features * support OpenCode v1 and v2 in one package ([#87](https://github.com/angristan/opencode-wakatime/issues/87)) ([e771a3c](https://github.com/angristan/opencode-wakatime/commit/e771a3c84f4d5379a04d85eb46f58ef76680ecf9))View on GitHub ↗ -
Release notes excerpt
[1.3.9](https://github.com/angristan/opencode-wakatime/compare/v1.3.8...v1.3.9) (2026-07-14) Bug Fixes * batch wakatime heartbeats ([cdc1520](https://github.com/angristan/opencode-wakatime/commit/cdc15208fb85b409aba06f77bad9fcaef53cf904)) * flush pending heartbeats on idle ([4231886](https://github.com/angristan/opencode-wakatime/commit/4231886ab781d372c185d8d9b9727023644fe02f)) * kill heartbeats when opencode exits ([1840e5c](https://github.com/angristan/opencode-wakatime/commit/1840e5c04d45bc272b120ee35700aa762c25ea62)) …View on GitHub ↗ -
Release notes excerpt
[1.3.8](https://github.com/angristan/opencode-wakatime/compare/v1.3.7...v1.3.8) (2026-05-13) Bug Fixes * update vulnerable dev dependencies ([b068880](https://github.com/angristan/opencode-wakatime/commit/b068880b9939136412124c5083f31130f9776b06))View on GitHub ↗