View as Markdown
WakaTime icon

WakaTime ACTION

Log Coding Activity

Log coding activity to WakaTime. See the documentation
  • Action
  • Writes data
  • OAuth
  • SDK
  • MCP

IMPLEMENTATION

Call this tool

Connect a user's WakaTime account once, then configure and run Log Coding Activity from your backend or agent.

import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "wakatime-log-coding-activity",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    wakatime: { authProvisionId: "apn_xxxxxxx" },
    entity: "Entity",
    type: "Type",
  },
})

console.log(result)

SCHEMA

Inputs

Pipedream supplies the connected account. Your application provides the operation-specific values below. Dynamic inputs are resolved against that user's account.

Log Coding Activity inputs
Property Type Description
entity Entity string
The entity heartbeat is logging time against, such as an absolute file path or domain
Required
type Type string
Type of entity (file, app or domain)
Required
time Time string
UNIX epoch timestamp; numbers after decimal point are fractions of a second
Required
category Category string
The category for this activity
Optional
project Project string
The name of a project
Optional Dynamic
projectRootCount Project Root Count integer
Count of the number of folders in the project root path (optional); for ex: if the project folder is /Users/user/projects/wakatime and the entity path is /Users/user/projects/wakatime/models/user.py then the project_root_count is 5 and the relative entity path after removing 5 prefix folders is models/user.py
Optional
branch Branch string
Branch name
Optional
language Language string
The name of a programming language
Optional Dynamic
dependencies Dependencies string
Comma separated list of dependencies
Optional
lines Lines integer
Total number of lines in the entity (when entity type is file)
Optional
lineAdditions Line Additions integer
Number of lines added since last heartbeat in the current file
Optional
lineDeletions Line Deletions integer
Number of lines removed since last heartbeat in the current file
Optional
lineNo Line Number integer
Current line row number of cursor with the first line starting at 1
Optional
cursorPos Cursor Position integer
Current cursor column position starting from 1
Optional
isWrite Is Write boolean
Whether this heartbeat was triggered from writing to a file
Optional

REFERENCE

Tool details

Behavior hints are published with the component in the Pipedream registry and surface as MCP tool annotations, so an agent can reason about a tool before it calls it.

Registry key
wakatime-log-coding-activity
Version
0.0.2
App
WakaTime
Authentication
OAuth
Read-only
No
Destructive
No
Open world
Yes