A step into Wakapi : a Wakatime alternative

A step into Wakapi : a Wakatime alternative

Like many developers, I stumbled upon Wakatime, a web app designed to track the time you spend working on projects. It's an amazing tool with plenty of extensions that allow you to monitor your time across various platforms, such as your IDE, your browser, and even while using Blender! However, using the free tier of Wakatime does come with some downsides. The most significant limitation is the code stats history, as you can't view more than two weeks of data without subscribing for $12 per month.

As I started searching for a self-hostable alternative, I came across two projects:

  • Hakatime, a server implementation of Wakatime with a good UI but seemingly no longer maintained.
  • Wakapi, another server implementation that appears to be more popular (with 2k stars) and highly configurable.

So let's dive into Wakapi!

Installation and configuration

💡
Before installing Wakapi, you can try it by using the official public instance found here

Installing Wakapi is really straightforward as you can install it using a one line script, eget or Docker.

Device configuration

After the installation, and creating your first account on the website, you can configure your pc to send data to Wakapi. The only thing you need to do is to create a .wakatime.cfg file in your home folder and add the api_url and your api_key following this template. Your api_key can be found by clicking on your profile in Wakapi and then clicking on "Show API key".

💡
In case your key is stolen, you can always generate a new one in the Settings. You can only have one api key!

By doing this, all the extensions that send heartbeats to Wakatime will start sending them to your wakapi instance instead!

Instance configuration

You can also configure your instance using environment variables. A comprehensive list is available in the project README to customize Wakapi to your needs.

If you want your instance to be private or shared only with known people, you should set the WAKAPI_ALLOW_SIGNUP to false.  If you need to invite someone to your instance even when sign-up is disabled, you can always send them a private link to let them create an account.

Wakatime importation

Wakapi allows you to import all your data from Wakatime into your instance using a Wakatime API key. To do this, simply navigate to your settings and select the integrations section. There, you will be able to import your data and even send your Wakapi data back to Wakatime.

⚠️
Once your import is complete, you might notice a discrepancy between the time recorded on Wakatime and the time displayed on Wakapi. This difference arises because Wakapi calculates time differently than Wakatime. For more details, you can refer to the Wakapi FAQ

Statistics and a lot more

When you open Wakapi, you'll find all your stats displayed in various charts. There's even an activity chart, similar to GitHub's commit chart, that shows your daily activity!

But the statistics aren't limited to just you; you can also share them using badges or GitHub README stats. These generated images can be embedded on any website.

Badge example
Example of badges generated using Wakatime statistics

Labels and projects

All your data is automatically associated with a project, usually named after your working folder. You can always rename these projects in your account's data settings. Additionally, you have the flexibility to rename languages, operating systems, editors, and even machines.

If multiple projects are related, you can assign a label to them. This makes it easier to organize and sort them in your statistics tab.

Leaderboard

Last but not least, there's also a leaderboard where you can see how many hours your friends have worked in a week. It doesn't offer any additional functionality but does introduce a competitive element to your development journey.

Example of the leaderboard

In summary, Wakapi is a self-hostable alternative to Wakatime that provides extensive customization, easy data import, and a visually appealing statistics view. It's an excellent choice for those who want to maintain control over their tracking data!