A self-hosted app that relays WakaTime heartbeats to multiple instances
Setup | Usage | How it works | Issues | PyPI Package
Features
- ✅ Multi-instance support
- ✅ Self-hosted
- ✅ Key authentication
- ✅ Invalid project warnings
- ✅ Highly configurable
- ✅ Fully relays WakaTime requests
Table of contents
Setup
Quick run
Python (>=3.8) is required for this installation type, please install it before continuing.
# Install the package
$ pip install waka-relay
# Then run the app
$ waka-relay
Uv
Using the uv package manager (this method does not require a venv on non Windows systems) and is usually the preferred option:
# Install the tool (system wide command)
$ uv tool install waka-relay
# Run it
$ waka-relay
# Run it (without installing the command)
$ uv tool run waka-relay
Python
Python (>=3.8) is required for this installation type, please install it before continuing.
# Clone the repository
$ git clone https://github.com/ImShyMike/waka-relay.git
# Move into the project's folder
$ cd waka-relay
# Install the dependencies
$ pip install -r requirements.txt
# Then run the app using python
$ python wakarelay/main.py
# Or use uvicorn directly (WARNING: this will ignore the host, port, and worker configuration)
$ uvicorn wakarelay.main:app
Using docker
Using the prebuilt image:
# Pull the docker image
$ docker pull shymike/waka-relay
# Then run the container
$ docker run -d \
-p 25892:25892 \
-v ~/.waka-relay.toml:/root/.waka-relay.toml \
--name waka-relay \
waka-relay
Or build the image yourself:
# Clone the repository
$ git clone https://github.com/ImShyMike/waka-relay.git
# Move into the project's folder
$ cd waka-relay
# First start by building the docker image
$ docker build --network host -t waka-relay .
# Then run the container
$ docker run -d \
-p 25892:25892 \
-v ~/.waka-relay.toml:/root/.waka-relay.toml \
--name waka-relay \
waka-relay
Usage
In your ~/.wakatime.cfg file, set the API url to the adress of the waka-relay server. (this example uses localhost)
[settings]
api_key = 39949664-5a5f-4c7d-95b2-44a864f67b6a
api_url = http://localhost:25892
(api_key must be a valid UUID, even if require_api_key is false)
How it works
A "WakaTime instance" does not need to be the real WakaTime server, it can also be anything that implements the same protocol. (compatible backends)
Example config
The configuration file must be located either in ~/.waka-relay.toml or ./.waka-relay.toml (first config file found is used)
[relay]
workers = 2
timeout = 10
require_api_key = true
api_key = "39949664-5a5f-4c7d-95b2-44a864f67b6a"
debug = false
[relay.instances]
"https://api.wakatime.com/api/v1" = "WAKATIME API KEY"
For a full config example with an explanation check out the example config file.
Configuration options
| TOML key | Default value | Description |
|---|---|---|
host |
"0.0.0.0" |
Host for the webserver to listen on |
port |
25892 |
Port for the webserver to run on |
workers |
1 |
Worker process count for the webserver |
timeout |
25 |
Timeout value for the relayed requests (in seconds) |
retries |
3 |
Number of retries for failed requests |
time_text |
"%TEXT% (Relayed)" |
Text to display in the IDE (%TEXT% is replaced by what the api retuns) |
require_api_key |
false |
Whether or not to require an API key |
api_key |
"" |
The API key to use if require_api_key is true |
debug |
false |
Whether or not to enable debug logging |
Known compatible backends
This relay is know to be compatible with the following backend servers:
(all of the above servers were tested using the vscode extension)
Others may work, this is just a list of the ones that were tested and are compatible.
Issues
Please feel free to open an issue on the github if you come across a bug or crash as this project has not been fully tested and may have some bugs.
Star History
Metadata
Release files for waka-relay 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| waka_relay-0.2.1.tar.gz | 21.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| waka_relay-0.2.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 42.5 kB
Release files / waka_relay-0.2.1.tar.gz
| Download URL | waka_relay-0.2.1.tar.gz |
|---|---|
| Size | 21.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
48c1bf55ed7c24ba027c9455497d08d99c65b06b54bb3d59061eac5931585ddd
|
|
BLAKE2b-256 checksum How to use checksums |
888453a676315278b86dd4f14f3d763955e3f80e87fa524587b22667dcb23bde
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.5
|
Release files / waka_relay-0.2.1-py3-none-any.whl
| Download URL | waka_relay-0.2.1-py3-none-any.whl |
|---|---|
| Size | 21.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
22739d544f6ff81dae24986c44f4e0718504513ee0ee87550ce7bc65aaf7147b
|
|
BLAKE2b-256 checksum How to use checksums |
58a0a70b73c97beedf182aae7a80e6a231b9f7e4a2de93220b1914ab26d346b0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.5
|