https://github.com/prplwtf/bashatime.sh
this is not a proper wakatime plugin
https://github.com/prplwtf/bashatime.sh
bash bash-script wakatime wakatime-api
Last synced: 5 months ago
JSON representation
this is not a proper wakatime plugin
- Host: GitHub
- URL: https://github.com/prplwtf/bashatime.sh
- Owner: prplwtf
- License: mit
- Created: 2025-10-07T19:08:48.000Z (9 months ago)
- Default Branch: master
- Last Pushed: 2025-11-24T18:30:43.000Z (7 months ago)
- Last Synced: 2025-12-13T09:53:42.071Z (6 months ago)
- Topics: bash, bash-script, wakatime, wakatime-api
- Language: Shell
- Homepage:
- Size: 73.2 KB
- Stars: 9
- Watchers: 0
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README

# bashatime.sh
[](https://award.athena.hackclub.com?utm_source=readme)
## Installation
**Requirements**
- A Linux machine (MacOS might work too, untested though)
- `inotify-tools`, to watch for files
- `git`, to know what files to watch
- `bash`, to run the script
- `wakatime`/`wakatime-api`, to submit your progress to wakatime
### Clone the repository
First, clone the bashatime repository to your local machine. This is bashatime's installation directory. You can use a different directory to the one used in the command below, if you know what you are doing.
```bash
git clone https://github.com/prplwtf/bashatime.sh.git ~/.bashatime
```
### Make executable
To run bashatime, you have to make it executable.
```bash
chmod +x ~/.bashatime/bashatime.sh
```
### Make it a command
In your `~/.bashrc` or `~/.zshrc`, create an alias for `~/.bashatime/bashatime.sh` to run it more easily.
```bash
# When using bash
echo "alias bashatime=\"~/.bashatime/bashatime.sh\"" >> ~/.bashrc
# When using zsh
echo "alias bashatime=\"~/.bashatime/bashatime.sh\"" >> ~/.zshrc
```
### Source the shell config
Finally, source the shell config to apply the alias to your current session.
```bash
# When using bash
source ~/.bashrc
# When using zsh
source ~/.zshrc
```
### Run bashatime from your project directory
Run the bashatime script from your project's root directory. You have to do this every time you code.
```bash
bashatime
```
## Configuration
To create a bashatime configuration, make a file called `.bashatimerc` in the project's directory. The following configuration options are currently supported:
```bash
# The name of your project, defaults to the parent folder name
PROJECT_NAME=""
# Uncomment to output verbose logs as well
#LOG_VERBOSE="1"
```
### Wakatime configuration
bashatime uses the `wakatime-api` cli tool to submit heartbeats. Use the `~/.wakatime.cfg` config for your API url, key, and other configuration options.
## Limitations
bashatime has a few known limitations, it's a bash script after all.
- When deleting tracked files, bashatime might return errors when updating any file. To fix this, commit your deleted files in git.
- bashatime does not know your editor's buffer cursor position. It tries to "guess" the cursor position based on file changes, but will never be 100% accurate.
- Configuration options are lacking right now, but more might be introduced at some point in the future.
## Contributing
Contributions are welcome. Whenever making changes to `bashatime.sh`, please make sure it passes shellcheck to avoid weird edge-cases and shell freak-outs.