wakatime / wakatime-cli

Command line interface used by all WakaTime text editor plugins
https://wakatime.com/plugins
BSD 3-Clause "New" or "Revised" License
277 stars 41 forks source link

Support loading api key from env var #997

Closed alanhamlett closed 9 months ago

alanhamlett commented 9 months ago

When env var WAKATIME_API_KEY present, use it's value as the api key. This means you don't need a ~/.wakatime.cfg file, but if the ~/.wakatime.cfg file exists and has an api_key then it takes precedence over the env var.

Fixes #761.

gandarez commented 9 months ago

I'll review it soon