npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

wakatime-sync

v1.6.1

Published

WakaTime plugin for OpenCode and Claude Code, automatically tracking time spent coding.

Readme

wakatime-sync

npm version npm downloads CI

WakaTime integration for both OpenCode and Claude Code from a single codebase. It automatically records the time you spend coding with AI — tracking edited files, line changes, and project activity — and reports it to WakaTime via the official wakatime-cli.

Under-the-Hood Architecture

flowchart TD
    subgraph Entry [dist/index.js — dual-app entry]
        DETECT{argv contains<br/>"claude"?}
    end

    subgraph OpenCode [OpenCode — in-process plugin]
        OC_HOOKS[event / chat.message hooks]
        OC_TRACK[extractFileChanges +<br/>in-memory file buffer]
        OC_HB["sendHeartbeat (--entity file)"]
        OC_HOOKS --> OC_TRACK --> OC_HB
    end

    subgraph Claude [Claude Code — stdin hook process]
        CC_STDIN[parseInput from stdin]
        CC_RATE[per-transcript rate limit]
        CC_HB["syncAiActivity (--sync-ai-activity)"]
        CC_STDIN --> CC_RATE --> CC_HB
    end

    subgraph Shared [Shared core]
        DEPS[dependencies — wakatime-cli install]
        CLI[wakatime-cli spawner]
        OC_HB --> CLI
        CC_HB --> CLI
        DEPS --> CLI
    end

    DETECT -->|no| OpenCode
    DETECT -->|yes| Claude
    CLI -->|HTTPS| WAKATIME[(WakaTime API)]

Structure

  • src/
    • TypeScript source (OpenCode plugin + claude/ hook handler + commands.ts)
    • core/ — git submodule (intisy-ai/core): shared config, logging, app detection, and the cross-app command framework — bundled into dist/index.js by esbuild
  • dist/
    • dist/index.js — single dual-app entry, generated by esbuild; not committed

Installation

Via plugin-updater (recommended)

npx plugin-updater@latest init https://github.com/intisy-ai/wakatime-sync

Via npm

npm install wakatime-sync

API Key Setup

Add your WakaTime API key to ~/.wakatime.cfg:

[settings]
api_key = your-api-key-here

Get your key at https://wakatime.com/settings/api-key.

Configuration

Config file: <configDir>/config/wakatime-sync.json (edit via the loader or /wakatime-sync-config set).

{
  "logging": true,
  "heartbeat_interval_seconds": 60,
  "cli_update_interval_hours": 4,
  "api_key": "",
  "api_url": "https://api.wakatime.com/api/v1",
  "hide_filenames": false,
  "proxy": "",
  "hostname": "",
  "hide_project_names": false
}

| Key | Default | | --- | --- | | logging | true | | heartbeat_interval_seconds | 60 | | cli_update_interval_hours | 4 | | api_key | "" | | api_url | "https://api.wakatime.com/api/v1" | | hide_filenames | false | | proxy | "" | | hostname | "" | | hide_project_names | false |

Commands

| Command | Description | Arguments | | --- | --- | --- | | /wakatime-sync-config | View and change wakatime-sync configuration | list | get <key> | set <key> <value> | | /wakatime | Show today's WakaTime coding activity | |

Dependencies

  • core
  • wakatime-cli
  • @opencode-ai/plugin

Logging

Logs are written to <configDir>/logs/YYYY-MM-DD/wakatime-sync-HH-MM-SS.log and are toggled by this plugin's logging config (default on). Console mirroring is global, off by default, and controlled by the shared config/settings.json logConsole flag.

License

MIT.