WakaTime is an automatic time tracking tool for developers. Rode has built-in support for WakaTime, allowing you to track your coding activity without any manual intervention.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/kashsuks/rode/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
Before configuring WakaTime in Rode, you need to install the WakaTime CLI:Install WakaTime CLI
Follow the official WakaTime CLI installation guide for your operating system.On macOS with Homebrew:On Linux:
Get your API key
Sign up for a free account at wakatime.com and get your API key from your settings page.
Configuration
Rode stores WakaTime configuration in a Lua file at~/.config/rode/wakatime.lua.
Using the Settings UI
The easiest way to configure WakaTime is through Rode’s settings interface:Enter your API key
Paste your WakaTime API key in the API Key field. The format should be
waka_xxxxx....Configure API URL (Optional)
By default, Rode uses
https://api.wakatime.com/api/v1. You can change this if you’re using a self-hosted WakaTime instance.Manual Configuration
You can also manually create or edit the configuration file at~/.config/rode/wakatime.lua:
~/.config/rode/wakatime.lua
Configuration Options
Your WakaTime API key for authentication. Get this from your WakaTime settings.Format:
waka_xxxxx...The WakaTime API endpoint URL. Only change this if you’re using a self-hosted WakaTime instance.
How It Works
Once configured, Rode automatically sends heartbeats to WakaTime as you code:Heartbeat Triggers
Rode sends heartbeats in the following scenarios:Tab Focus
When you switch to a different file tab
File Save
When you save a file (marked as a write event)
Rate Limiting
To avoid excessive API calls, Rode implements intelligent rate limiting:- Heartbeats are sent at most once every 2 minutes for the same file
- Switching to a different file immediately triggers a new heartbeat
- Save operations always trigger a heartbeat (marked with
--writeflag)
Implementation Details
The heartbeat implementation can be found insrc/wakatime/client.rs:5:
- The plugin identifier is
rode/0.1.0 - File paths are passed as the
--entityargument - Write operations (saves) are flagged with
--write - Heartbeats run asynchronously without blocking the editor
Troubleshooting
Activity not appearing on WakaTime dashboard
Activity not appearing on WakaTime dashboard
Possible causes:
- WakaTime CLI not installed - Verify with
which wakatime-cli - Invalid API key - Check that your API key is correct in settings
- API key is empty - Rode silently skips heartbeats if the API key is empty
wakatime-cli is in your PATH and your API key is correctly configured.Using a self-hosted WakaTime instance
Using a self-hosted WakaTime instance
If you’re running your own WakaTime server:
- Set the
api_urlto your server’s API endpoint - Make sure your API key is from your self-hosted instance
- Verify network connectivity to your server
Checking if heartbeats are being sent
Checking if heartbeats are being sent
Since Rode redirects stdout/stderr to null for heartbeat commands, you can temporarily monitor WakaTime CLI:You should see entries with
rode/0.1.0 as the plugin identifier.If your API key is empty or contains only whitespace, Rode will silently skip sending heartbeats. Make sure to configure your API key before expecting activity tracking.
Privacy
Rode only sends the following information to WakaTime:- File paths of the files you’re editing
- Whether the event was a write operation (save)
- Timestamp of the activity
- Plugin identifier (
rode/0.1.0)