How to Add WakaTime Coding Stats to Your GitHub Profile README
WakaTime automatically tracks how much time you spend coding in each language, editor, and project. Displaying this data on your GitHub profile README is one of the most compelling proof points a developer can offer — real hours logged, not just commit counts. This guide uses the anmol098/waka-readme-stats GitHub Action, which reads your WakaTime data and updates a section of your README automatically every day. Setup requires a WakaTime account, a GitHub personal access token, and about 10 minutes.
Quick Setup Steps
- 1
Step 1: Sign up at wakatime.com and install the WakaTime plugin for your code editor.
- 2
Step 2: Copy your Secret API Key from WakaTime account settings.
- 3
Step 3: Add WAKATIME_API_KEY and GH_TOKEN as repository secrets in your GitHub profile repo.
- 4
Step 4: Create .github/workflows/waka-readme.yml using the anmol098/waka-readme-stats Action.
- 5
Step 5: Add <!--START_SECTION:waka--> and <!--END_SECTION:waka--> comment markers to your README.md and commit.
What Is the WakaTime Stats Widget?
WakaTime is a time-tracking service for developers that integrates with most popular editors including VS Code, JetBrains IDEs, Vim, Emacs, and Sublime Text. Once installed, it silently records your coding activity in the background. The waka-readme-stats GitHub Action queries your WakaTime API daily and writes a formatted stats block into your README — showing your top languages, editors, operating systems, and total hours coded in the past week.
The stats block is injected between comment markers (start and end) that you place in your README, so the rest of your file stays exactly as you wrote it. The Action commits the updated README automatically, keeping your profile fresh without any manual intervention.
How to Set Up WakaTime Stats
Follow these steps to configure the widget:
- Sign up at wakatime.com and install the WakaTime plugin for your editor. Code for a few days to accumulate data.
- In your WakaTime account settings, copy your Secret API Key.
- In your GitHub profile repository settings, go to Secrets → Actions and add a new secret:
WAKATIME_API_KEYwith your WakaTime key. - Also add a
GH_TOKENsecret set to a GitHub personal access token withreposcope. - Create
.github/workflows/waka-readme.ymlwith:
name: Waka Readme
on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
jobs:
update-readme:
runs-on: ubuntu-latest
steps:
- uses: anmol098/waka-readme-stats@master
with:
WAKATIME_API_KEY: ${{ secrets.WAKATIME_API_KEY }}
GH_TOKEN: ${{ secrets.GH_TOKEN }}
- In your README, add the comment markers where you want the stats to appear:
<!--START_SECTION:waka-->
<!--END_SECTION:waka-->
Customizing WakaTime Stats
The waka-readme-stats Action accepts many configuration parameters to control what data appears and how it is formatted. To show only your top 5 languages, add SHOW_LINES_OF_CODE: false and SHOW_PROFILE_VIEWS: false. To hide the header and show only the stats table, set SHOW_TITLE: false.
For compact output that fits tighter layouts, set COMPACT_MESSAGE: true. The Action also supports SHOW_COMMIT: true to display a breakdown of commit activity by time of day and day of week — useful for demonstrating a consistent work schedule. All configuration options are documented in the repository's README at github.com/anmol098/waka-readme-stats.
Troubleshooting WakaTime Stats
If the stats block stays empty after the first workflow run, check that your WakaTime profile is set to public and that your Secret API Key is correct. WakaTime has two types of API keys — use the Secret API Key from account settings, not the share URL.
If the Action fails with a permissions error, verify that your GH_TOKEN has repo scope and that it was added as a repository secret (not an environment variable). If the workflow doesn't trigger on schedule, manually trigger it from Actions → Waka Readme → Run workflow. GitHub sometimes delays scheduled workflows by up to one hour during high load periods.
Frequently Asked Questions
How do I add WakaTime stats to my GitHub README?
Install the WakaTime editor plugin, copy your Secret API Key, add it as a repository secret `WAKATIME_API_KEY`, create a GitHub Actions workflow using anmol098/waka-readme-stats, add `<!--START_SECTION:waka-->` and `<!--END_SECTION:waka-->` comment markers to your README, and run the workflow. Stats update daily after that.
Is WakaTime free to use for GitHub README stats?
WakaTime's free tier provides the last 7 days of coding activity, which is what the GitHub Action displays by default. The free tier is sufficient for most README use cases. A paid plan extends history to longer periods but is not required for the standard weekly stats widget.
Why are my WakaTime stats not showing up in my README?
Verify that (1) your WakaTime profile is public, (2) the WAKATIME_API_KEY secret is set correctly in your repository, (3) the GH_TOKEN has repo write permissions, and (4) the comment markers are present in your README. Run the workflow manually from the Actions tab to see the error output.
Does WakaTime work with private GitHub repositories?
WakaTime tracks coding time locally in your editor regardless of whether the repository is public or private. The stats shown in your README reflect your total coding activity across all projects, not just public ones. Your GH_TOKEN needs repo scope to update a private profile repository.
From Our Blog
- Complete Guide to GitHub Badges for Your README
Learn how to add shields.io badges, GitHub stats cards, and tool badges to your GitHub profile README. Includes ready-to-use code for 50+ popular technologies.
- Best GitHub README Widgets and Tools: The Complete 2026 List
A curated list of the best GitHub profile README widgets — from snake animations to Spotify players, stats cards to 3D contribution graphs. Includes setup instructions for each.
- How to Add GitHub Stats Cards to Your README (2026 Guide)
Step-by-step guide to adding GitHub stats cards, language cards, streak stats, and WakaTime cards to your GitHub profile README using github-readme-stats.
Generate Your GitHub Profile README
Generate a GitHub profile README featuring WakaTime Coding Stats with AI
Try It Free — No Sign UpMore Widget Guides
How to Add Spotify Now Playing
Step-by-step guide to adding Spotify Now Playing to your GitHub README
How to Add Snake Contribution Animation
Step-by-step guide to adding Snake Contribution Animation to your GitHub README
How to Add Profile Views Counter
Step-by-step guide to adding Profile Views Counter to your GitHub README
How to Add Typing SVG Animation
Step-by-step guide to adding Typing SVG Animation to your GitHub README
How to Add GitHub Streak Stats
Step-by-step guide to adding GitHub Streak Stats to your GitHub README
How to Add GitHub Stats Card
Step-by-step guide to adding GitHub Stats Card to your GitHub README