Flavourtown Time Tracking (VS Code Extension)
Shows your daily coding stats and progress toward your target item.
Setup
- set up Hackatime api
log in to Hackatime settings
,then go to setup time tracking
then look for your api key and copy it to a safe place
- set up Hackatime Username
log in to Hackatime settings
then copy your Username, or set one up if you havent (don't forget to press save!!!)
- set up Flavourtown api
log in to your flavourtown account and go to setting 
look for your API key
copy it to a save place
- install the extension
go to your vscode's sidebar and look for extension, then search for Flavourtown-sidebar, then press install
- set up extension
press on the gear icon
paste your apis
enter your Hackatime Username
press refresh
dont forget to set your target!!!
Congradulations!!! You are all set!
Troubleshooting
- If data is empty: ensure Python is installed and the API key/username are set; run
python python_scripts/get_data.py to see errors. If you use a venv, set the Flavourtown: Python Path setting to your venv's python.
- If prices are missing: run
python python_scripts/get_targets.py to refresh storage/ft_store.json.
Privacy
API tokens are stored in your VS Code user settings and sent only to Hackatime/Flavourtown to fetch your data. Remove keys from settings to revoke access.
Settings
| Setting |
Required |
Description |
| hackatime_api |
Yes |
Hackatime API token used to fetch stats. |
| username |
Yes |
Hackatime username for the stats fetch. |
| flavourtown_api |
Optional |
Flavourtown API token to fetch store data and pricing. |
| storeItem |
Optional |
Store item name to track; set via the picker command. |
| country |
Optional |
Pricing region code (au, ca, eu, in, uk, us, xx). |
| quality |
Optional |
Quality factor (1-15, default 10) used in the cookie formula. |
| k |
Optional |
Advanced exponent k in the cookie formula (default 4). |
| beta |
Optional |
Advanced beta factor in the cookie formula (default 2). |
| pythonPath |
Optional |
Absolute path to the Python interpreter (e.g. inside a venv). |
Settings live in VS Code user settings. Env fallbacks (if set): HACKATIME_API_KEY, HACKATIME_USERNAME, FT_API_KEY.
The extension predicts earned cookies using:
$$c(h, q) = 88 \cdot \left(\frac{q}{15}\right)^k \cdot (1 + \beta \ln(1 + h))$$
Where:
- $h$ = hours coded today
- $q$ = quality factor (1-15)
- $k$ = exponent (default 1)
- $\beta$ = beta factor (default 2)