opencode-wakatime plugin

An OpenCode plugin that reports to WakaTime the time and lines an agent produced, covering edit, write and patch operations.

  • 205 ★ on the repository
  • Last commit
  • MIT
Plugin

Extended access

Why this level

  • File and project names with edit metrics are sent to the WakaTime service.
  • The installer changes the global OpenCode config.
All reasons and checks

angristan/opencode-wakatime

Install

Works in

Manual install

npm i -g opencode-wakatime

Then `opencode-wakatime --install` registers the plugin in the global OpenCode config.

Access and checks

How we review

Extended accessThe tool runs code or makes network calls and only reads external data.

  • File and project names with edit metrics are sent to the WakaTime service.
  • The installer changes the global OpenCode config.

This is third-party code. Review the repository files before installing.

What it does

The plugin connects OpenCode (versions 1 and 2) to WakaTime. It watches file reads and changes, including `edit`, `write`, `patch`, `multiedit` and batch calls, and sends heartbeats with the `--ai-line-changes` metric for AI coding analytics. Frequency is capped at one heartbeat per minute per project, and a final one goes out at idle or session end. The plugin downloads and updates the WakaTime CLI itself when it is not installed. The API key is read from `~/.wakatime.cfg`. The author drew on claude-code-wakatime and maintains codex-wakatime separately for Codex CLI.

Who it is for. OpenCode users who track time in WakaTime and want agent work to show up in their stats.

Good fit when

  • You work in OpenCode and want agent hours to land in WakaTime.
  • You want stats on AI-changed lines by project and language.
  • One setup must work in both OpenCode v1 and v2.
  • Your team logs time in WakaTime and wants agent tasks counted too.

Not a fit when

  • You use Claude Code: it has its own claude-code-wakatime plugin.
  • WakaTime is unacceptable for privacy: project and file names go to the service.
  • You want local tracking with no outside service.

Example request

Hook the WakaTime plugin into my OpenCode and check that the API key is found in `~/.wakatime.cfg`.

Limitations

A WakaTime API key is required in `~/.wakatime.cfg` or the directory from `WAKATIME_HOME`. The plugin sends file names, project names and edit statistics to the service. OpenCode v2 support targets the `@opencode/plugin` 2.0.18 API and v2 is still changing, so older previews may behave differently. The installer edits the global OpenCode config and leaves project configs alone, so a duplicate project install must be removed by hand. The last commit dates to September 2026.

How to disable. Run `opencode-wakatime --uninstall` to drop the registration and old bundles, then optionally `npm uninstall -g opencode-wakatime`.

FAQ

How do I install the plugin?

Add `"plugin": ["opencode-wakatime"]` to `opencode.json`, or run `npm i -g opencode-wakatime` and `opencode-wakatime --install`, then restart OpenCode.

What is needed up front?

A WakaTime API key in `~/.wakatime.cfg`. Installing the WakaTime CLI is optional because the plugin downloads it.

Does it work in OpenCode v2?

Yes, the same package and command support v1 and v2. For the config key, v2 accepts both `plugins` and the legacy `plugin`.

How often is data sent?

At most one heartbeat a minute per project. A final heartbeat goes out on idle or session end.

How do I remove it?

`opencode-wakatime --uninstall` removes the global registration and leaves other plugins and settings intact.

Discussion

No questions or reviews yet.

Plugins
Official

WakaTime plugin for Claude Code tracks time spent working with AI and lines the agent wrote, and shows them on the dashboard

PluginExtended access98Repository stars
Russian stack

A Claude Code and Codex plugin for WEEEK: 12 curated, not auto-generated tools, with the token in the OS keychain

PluginExtended access

A Warp plugin for Claude Code that sends native notifications when a task ends, a permission is requested or Claude waits for you

PluginExtended access238Repository stars

An OpenCode plugin with a /quota command: subscription limits, tokens and cost for many providers, kept out of context.

PluginExtended access1.1KRepository stars
Russian stack

Claude Code plugin for the WEEEK tracker: tasks and boards via MCP, skills for starting a task, standups and status moves

PluginBroad access3Repository stars

A local CLI that shows where tokens go in Claude Code, Codex and opencode and holds back expensive messages

CLIExtended access223Repository stars

README in short

The README lists features, prerequisites and two install routes, config entry or npm installer. Building from source and notes on behavior across OpenCode versions follow.

README badge

Report a problem