The WakaTime plugin works for TextMate 1 & 2 and is open-source on GitHub.
Download the latest plugin release from GitHub
Unzip and open the downloaded tmplugin file to install the plugin in TextMate.
Enter your API key
, then press enter.
Use TextMate like you normally do and your time will be tracked for you automatically.
Visit https://wakatime.com/dashboard to see your coding activity.
Confirm the replacement and restart Textmate.
Delete the file ~/Library/Application Support/TextMate/PlugIns/WakaTime.tmplugin.