VVakatime

CLI Reference

Every vakatime command, plus how the hook pipeline behaves offline.

Commands

CommandDescription
vakatime login --endpoint <url> --api-key <key>Save the server base URL and API key to ~/.vakatime/config.json.
vakatime setup [agent]Install hooks. Without an argument: interactive picker (pre-checks configured agents).
vakatime remove <agent>Remove only the hooks Vakatime registered.
vakatime statusOne-shot overview: config, per-agent hook state, activity heatmap (--weeks N widens it).
vakatime flushRetry heartbeats queued during network loss.
vakatime heartbeat --entity <path> […]Upload a single heartbeat manually — handy for testing the server.
vakatime hook --source <agent>Internal: read one hook payload from stdin and upload it.

--source accepts claude-code, codex, cursor, opencode, gemini-cli, zcode (claude aliases claude-code).

Heartbeat options

vakatime heartbeat --entity src/index.ts --project my-project \
  --language TypeScript --editor nvim --branch main --write
FlagDefault
--entity <path>required
--project <name>—
--branch <name>—
--language <name>—
--editor <name>—
--machine <name>hostname
--type <type>file
--category <name>coding
--time <iso>now
--writefalse (flag)

Offline behavior

Upload failures are not fatal: the heartbeat is appended to ~/.vakatime/queue.jsonl and retried by vakatime flush or the next successful upload. The server deduplicates by a per-user dedupe key, so retries never create duplicate entries.

Debugging

Everything the hook pipeline does is logged to ~/.vakatime/hook.log with phases:

hook-start → stdin → adapt → upload (ok | queued)

If an agent isn't showing up on the dashboard, check hook.log first: a missing hook-start line means the hook isn't wired (re-run vakatime setup <agent>); adapt ignored means the event was filtered out; queued means the server was unreachable.

The hook path spawns node <cli.js> hook --source <agent> directly — it never loads the interactive UI code, keeping cold starts fast inside agents.

On this page