By JianyueLab
CodeTime plugin for Claude Code - track your AI coding activity on codetime.dev
Track your AI coding activity from Claude Code on your CodeTime dashboard — projects, languages, files, and git branches, the same way the CodeTime editor extensions do.
This is a Claude Code plugin modeled on
wakatime/claude-code-wakatime,
but it talks to the CodeTime API directly (CodeTime has no companion CLI, so the
plugin does the transcript parsing, git detection, throttling, and upload itself in
pure Node — zero runtime dependencies).
claude plugin marketplace add https://github.com/jianyuelab/claude-code-codetime.git
claude plugin i claude-code-codetime@codetime
Update later with:
claude plugin marketplace update codetime
Get your upload token from CodeTime → Settings at https://codetime.dev, then set it one of two ways:
Environment variable (takes precedence):
export CODETIME_TOKEN="your-token"
Config file ~/.codetime/config.json:
{ "token": "your-token" }
Without a token the plugin does nothing (it never blocks Claude Code).
The plugin registers hooks for PreToolUse, PostToolUse, UserPromptSubmit,
PreCompact, and SessionEnd. On each event it:
Edit/Write/Read tool input), git branch/origin, platform, and a
read/write operation type.POSTs it to https://api.codetime.dev/v3/users/event-log with
Authorization: Bearer <token>.| Variable | Purpose |
|---|---|
CODETIME_TOKEN | Upload token (overrides the config file). |
CODETIME_API_URL | Override the API base URL (default https://api.codetime.dev). |
CODETIME_DEBUG | Set to true for verbose logging. |
CODETIME_HOME | Override the base dir for config/state/log (default $HOME). |
~/.codetime/codetime.logclaude --debug, or claude doctor401 in the log means the token is wrong or missing.bun install
bun run build # bundles src/ → dist/index.js with esbuild
echo '{"hook_event_name":"PostToolUse","cwd":"'$PWD'","tool_name":"Write","tool_input":{"file_path":"'$PWD'/src/index.ts"}}' \
| CODETIME_DEBUG=true CODETIME_API_URL=http://localhost:8080 CODETIME_TOKEN=test node dist/index.js
MIT
Matches all tools
Hooks run on every tool call, not just specific ones
Own this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimBased on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
npx claudepluginhub jianyuelab/claude-code-codetime --plugin claude-code-codetimeHarness-native ECC operator layer - 67 agents, 271 skills, 92 legacy command shims, reusable hooks, rules, selective install profiles, and production-ready workflows for Claude Code, Codex, OpenCode, Cursor, and related agent harnesses
Reliable automation, in-depth debugging, and performance analysis in Chrome using Chrome DevTools and Puppeteer
Comprehensive feature development workflow with specialized agents for codebase exploration, architecture design, and quality review
Core skills library for Claude Code: TDD, debugging, collaboration patterns, and proven techniques
Continuous self-referential AI loops for interactive iterative development, implementing the Ralph Wiggum technique. Run Claude in a while-true loop with the same prompt until task completion.
Feature development with code-architect/explorer/reviewer agents, CLAUDE.md audit and session learnings, and Agent Skills creation with eval benchmarking from Anthropic.