# WakaTime on boxd

> WakaTime offers automatic time tracking for developers, integrating with code editors and delivering dashboards on coding activity, project progress, and productivity.

- Page: https://boxd.sh/integrations/wakatime/
- CLI: `run wakatime` (17 commands, 5 marked common)
- SDK: `import { wakatime } from "@boxd/run"`; every parameter and response type is at `@boxd/run/wakatime`
- Triggers: none
- Connect: `run auth wakatime` (Sign in with WakaTime), or https://app.boxd.sh/integrations/detail/wakatime
- All integrations: https://boxd.sh/integrations/ (Markdown: https://boxd.sh/integrations/index.md)

## From the shell

```sh
run auth wakatime      # once: prints a link to connect your account
run wakatime           # list its commands
run wakatime get-user-stats --help
```

Parameters are flags (`--flag value`); object and array parameters take a JSON string. Output is YAML, or JSON with `--json`. Calls use your own connection; `--scope <name>` uses a connection shared with your team.

## From a script

```ts
import { every, wakatime } from "@boxd/run";

every("1 hour", async () => {
  const result = await wakatime.getUserStats({ user: "…" });
  console.log(result);
});
```

Run it with `run wakatime.run.ts`. WakaTime has no triggers; `every()` polls on a schedule, keeps the script running as a job, and wakes the machine when it is due.

## Commands

Required flags are listed; `run wakatime <command> --help` lists the optional ones. "common" marks what `run wakatime` shows without `--all`.

| Command | SDK method | Required flags | Optional | Description |
|---|---|---|---|---|
| `get-aggregate-stats` | `wakatime.getAggregateStats()` | `--range` | 0 | Retrieve aggregate coding statistics across all WakaTime users for a given time range |
| `get-current-user-status-bar-today` | `wakatime.getCurrentUserStatusBarToday()` | — | 5 | Get current user's coding activity today for displaying in IDE status bars |
| `get-editors` | `wakatime.getEditors()` | — | 1 | List WakaTime IDE plugins with metadata |
| `get-goals` | `wakatime.getGoals()` | — | 1 | List a user's goals with progress series and metadata |
| `get-insights` ·common | `wakatime.getInsights()` | `--insight-type` `--range` `--user` | 3 | Retrieve an insight for a user over a time range |
| `get-leaders` | `wakatime.getLeaders()` | — | 4 | List public leaders ranked by coding activity |
| `get-machine-names` | `wakatime.getMachineNames()` | — | 1 | List a user's machines including last seen time |
| `get-meta` | `wakatime.getMeta()` | — | 0 | Retrieve WakaTime API meta information, including public IP addresses used by WakaTime servers |
| `get-oauth-authorize` ·common | `wakatime.getOauthAuthorize()` | `--client-id` `--redirect-uri` `--response-type` | 3 | Generate OAuth 2.0 authorization URL |
| `get-user` | `wakatime.getUser()` | `--user` | 0 | Get detailed profile information for a WakaTime user by user ID or username |
| `get-user-stats` ·common | `wakatime.getUserStats()` | `--user` | 2 | Retrieve coding statistics for a user over the default time range |
| `get-user-stats-by-range` ·common | `wakatime.getUserStatsByRange()` | `--range` `--user` | 2 | Retrieve comprehensive coding statistics for a user over a specific time range |
| `get-user-summaries` ·common | `wakatime.getUserSummaries()` | `--user` | 8 | Get user's coding activity for a time range as daily summaries |
| `get-users-all-time-since-today` | `wakatime.getUsersAllTimeSinceToday()` | `--user` | 1 | Retrieve total coding time since account creation for a user |
| `list-program-languages` | `wakatime.listProgramLanguages()` | — | 1 | List all verified program languages supported by WakaTime |
| `list-user-projects` | `wakatime.listUserProjects()` | `--user` | 2 | List WakaTime projects for a specified user |
| `list-user-user-agents` | `wakatime.listUserUserAgents()` | — | 1 | List plugins and editors which have sent data for a specified user |

## Docs

- [run CLI](https://docs.boxd.sh/cli/run): Call connected integrations from the shell, connect new ones, and run automations.
- [Quickstart](https://docs.boxd.sh/guides/integrations/quickstart): Connect an integration, call it from the shell, and turn a script into an automation.
- [Connections](https://docs.boxd.sh/guides/integrations/connections): Connect an account once, for yourself or for your whole organization.
- [Scripts](https://docs.boxd.sh/guides/automations/scripts): Typed integrations, triggers, schedules and state in a .run.ts file.
- [Jobs](https://docs.boxd.sh/guides/automations/jobs): How a script becomes a background job: states, retries, sleep and wake.
- [Beyond the catalog](https://docs.boxd.sh/guides/automations/beyond-the-catalog): Reach your own APIs, databases and cloud accounts from a script.
