OpenCode WakaTime Tracker

Record AI coding activity, file changes, and time from OpenCode in WakaTime.

Stars
★ 206
Last updated
2mo ago v1.4.0
FARS reviewed
Nov 08, 2026
License
MIT
Primary language
TypeScript

At a glance

How it runs
Agent plugin / skillCLI
Works with
Platform-specific
Setup effort
Medium · a few setup steps
You'll need
OpenCode v1 or v2Node.jsWakaTime API keywakatime-cliShell / CLINetwork accessLocal filesystem
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)

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.

  1. OpenCode v1 or v2 developers who want AI coding time included in WakaTime.
  2. Developers who want file-level records of OpenCode reads and modifications.
  3. Team members who want available added and removed line counts reported as AI coding metrics.
  4. 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-wakatime
  • brew 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 --install

Restart 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 --uninstall

The plugin can download wakatime-cli automatically. macOS users can also install it manually:

brew install wakatime-cli

Safety 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)

Local shell command execution

Can run terminal commands; pair with approval gates or container/OS sandboxing.

Local filesystem read/write

Modifies local files; work on a clean Git branch or dedicated worktree.

Outbound network access

Makes outbound requests; verify telemetry settings and model data routing on private repos.

What are this agent's strengths and limitations?

Pros
  • 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.
Limitations
  • 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?

FollowAgents source review · FARS-2.1
Major gaps
58/ 100 5-point scale 2.9 / 5
Trust 13/29
Reliability 9/14
Adaptability 12/18
Convention 12/18
Effectiveness 7/13
Verifiability 5/8
Why each dimension lost points
Trust13 / 29 · 2.2/5

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.

Reliability9 / 14 · 3.2/5

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.

Adaptability12 / 18 · 3.3/5

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.

Convention12 / 18 · 3.3/5

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.

Effectiveness7 / 13 · 2.7/5

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.

Verifiability5 / 8 · 3.1/5

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.

Risks and how to mitigate them
  • 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.
Evidence confidence: Low Reviewed Nov 08, 2026 Reviewed revision f6d20a18e46d
See the full review method →
Maintain this project? Add the FARS badge to your README

The badge shows the current review score and verdict and links back to this page. It refreshes about once an hour after a re-review.

FARS

[![FARS review](https://followagents.com/badge/opencode-wakatime.svg)](https://followagents.com/en/agents/opencode-wakatime)
<a href="https://followagents.com/en/agents/opencode-wakatime"><img src="https://followagents.com/badge/opencode-wakatime.svg" alt="FARS review"></a>

Recent releases

Latest entries from the project's GitHub Releases. Notes are quoted from upstream as written, not rewritten or tested by FollowAgents.

  1. v1.4.0
    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 ↗
  2. v1.3.9
    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 ↗
  3. v1.3.8
    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?
Configure a WakaTime API key so the plugin can send heartbeats to the WakaTime API.
Do I have to install wakatime-cli manually?
No. The plugin downloads it if it is missing. You can also install it manually, for example with brew install wakatime-cli on macOS.
What activity does the plugin track?
It tracks file reads and supported file modification tools, recording available paths and line changes; directory-listing reads are excluded.
Does the installer change project config?
The npm installer edits global OpenCode config only. It does not edit project config or files selected through OPENCODE_CONFIG or OPENCODE_CONFIG_DIR.
Was this page helpful?
View on GitHub ↗ Install ↓

Host ecosystems

Compare agents like this one

The same FARS review applied across the shortlist this agent qualifies for.

Related concepts