OpenCode WakaTime Tracker
Record AI coding activity, file changes, and time from OpenCode in WakaTime.
- Source repo
- angristan/opencode-wakatime
- Stars
- ★ 206
- Last updated
- 2mo ago v1.4.0
- FARS reviewed
- Nov 08, 2026
- License
- MIT
- Primary language
- TypeScript
- FA score
- 58/100 · Major 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
- Maintenance
- Commits in the last 6 monthslast commit 2026-09-27latest release v1.4.0 (2026-09-27)
- Source review
- 58/100 · Major 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.
Key setup facts
Pulled from the install and usage notes below. The project README has the current values.
- Install / run
npm i -g opencode-wakatimebrew install wakatime-cli
- Config files
~/.wakatime- Install notes cover
- macOS
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-cliSafety boundaries, hardening & integrations
Operational blast radius, source-verified safety controls, and first-run hardening steps before connecting this agent to real workspaces.
Declared capability surface (blast radius)
Can run terminal commands; pair with approval gates or container/OS sandboxing.
Modifies local files; work on a clean Git branch or dedicated worktree.
Makes outbound requests; verify telemetry settings and model data routing on private repos.
What 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 | 58 · Major gaps | Agent plugin / skill | ★ 206 | 2mo ago | TypeScript | — |
| ccusage | 66 · Some gaps | — | ★ 20k | today | Rust | Codex · Claude Code |
| OpenCode Orchestrator | 45 · Major gaps | Agent plugin / skillFree + model costs | ★ 288 | 1mo ago | TypeScript | — |
| iPolloWork | 76 · Good | Desktop appFree + model costs | ★ 7.6k | 1d ago | TypeScript | — |
How does FollowAgents rate this agent?
Why each dimension lost points
The plugin sends file paths, project directories, and AI line-change data through a local wakatime-cli to WakaTime. The README describes side effects such as downloading the CLI, editing global OpenCode config, and writing local state, and provides an uninstall path, so scope and recovery are reasonably clear. Installation, removal, and tracking have no confirmation step; API-key storage is specified without safeguards for file permissions or log exposure. Dependency overrides pin jsonc-parser but set a broad tar range, with no security-audit evidence. The repository and inspiration are attributable, but package author is empty and publisher identity and maintenance responsibility are unclear, so these do not merit full marks.
The README gives concrete v1/v2 entrypoint, event, flush, and tracking details; the installer preserves config and avoids duplicate registration. CI is configured for lint, tests, type checking, and builds. The package and target v2 API versions are stated, but the README says that API is changing and that tests do not replace OpenCode smoke tests. Failure guidance includes log locations and troubleshooting steps, although the CLI itself only prints an error message and the evidence for comprehensive diagnostics is limited.
The audience and use case are clear: track coding activity in OpenCode v1 and v2. The docs distinguish their APIs and tool behavior and identify boundaries such as v2 filtering failed calls and writes lacking line counts. Trigger events and config locations are described, including XDG and WAKATIME_HOME. Platform guidance is limited, with concrete package-manager instructions mainly for macOS.
The README is organized into features, prerequisites, installation, operation, files, development, and troubleshooting. Installation and uninstall instructions are especially detailed and include config examples and troubleshooting. The MIT license is clear and naming is mostly consistent across the package and CLI. Package versioning and a release workflow are present, but the supplied material has no changelog or compatibility history. The author field is empty and no maintenance owner or support channel is identified, so those criteria are not fully supported.
The output is a WakaTime heartbeat containing the entity, project directory, AI line changes, and category, directly supporting time and AI coding metrics. Per-project rate limiting, session-end flushing, and batch-tool support add practical value. Automatic CLI download and ongoing activity uploads have costs, but the materials do not quantify resource use, data retention, or other costs, limiting the cost-benefit case.
README behavior claims are corroborated by package scripts, dependencies, installer behavior, and the CI workflow; the docs also state v2 API volatility and test coverage limits. The configured CI claims match the visible workflow, but this static review cannot establish that jobs passed. Product claims, stated limits, and inference are generally distinguishable. Publisher identity remains unknown and cannot be inferred as verified from repository metadata or badges.
- Before use, confirm that you are comfortable sending file paths, project directories, and AI line-change data to WakaTime. Follow the README’s API-key setup and check local config-file permissions.
- The installer edits global OpenCode config and may remove recognized legacy standalone bundles. Uninstall removes the global registration but leaves project config unchanged.
- The README says the v2 Promise plugin API is still changing. The supplied material contains no runtime evidence or verified publisher identity.
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 ↗
FAQ
Do I need a WakaTime account or API key?
Do I have to install wakatime-cli manually?
What activity does the plugin track?
Does the installer change project config?
Thanks — we use this to improve the page.
Subscribe to the FollowAgents RSS feed, or save this agent to your browser shortlist to compare on your next visit.