Automatic time tracking for commands in Powershell using wakatime.
Make sure you have configured wakatime API key in your ~/.wakatime.cfg file.
-
pip install wakatime
to install wakatime CLI, with 4.1 or higher. See more here for wakatime CLI. -
For PSGallery users:
- Install directly from PSGallery; import this in your
$profile
.
- For GitHub users:
- git clone https://github.com/Gravifer/posh-wakatime.git
- include the "Powershell-wakatime.sh" file in your
$profile
file. - But if you already have a PROMPT_COMMAND variable set, just merge yout own pre_prompt_command with the following one. And don't forget to create and configure your "~/.wakatime.cfg" file.
-
Open a new terminal and type commands
Codes and ideas are integrated from bash-wakatime, powerwaka, posh-git, conda(powershell).
- Submission to WakaTime.com
- Auto-installation of WakaTime CLI in the module path, rather than using the one in path. (Will provide better robustness)
- Correct attribution to contributors.