We value Open Source and make a point to release all our plugins on GitHub under a BSD License.
The WakaTime plugin works for both Sublime Text 2 and Sublime Text 3 and is open source on GitHub.
Install Package Control.
Inside Sublime, select Tools → Command Palette…
Type install
, then select Package Control: Install Package
and press Enter.
Type wakatime
, then select WakaTime
and press Enter.
Enter your API Key, then press Enter.
Use Sublime Text like normal and your stats will automatically show on your WakaTime Dashboard.