We value Open Source and make a point to release all our plugins on GitHub under a BSD License.
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 normal and your stats will automatically show on your WakaTime Dashboard.