A simple command-line tool for tracking time spent on tasks, built using Rust.
- Rust installed on your machine
- Clone the repository:
git clone https://github.com/eatPizza311/time-tracker.git cd time-tracker - Build the project:
cargo build --release
You can use
cargo runinstead
- Start tracking time:
cargo run -- --db-dir db.json --lockfile track.lock start
Don't forget the
--between cargo and command! - Stop tracking time:
cargo run -- --db-dir db.json --lockfile track.lock stop
- Get the report:
cargo run -- --db-dir db.json --lockfile track.lock report
You can specify the location of a flat-file database and a lockfile.
You can also run without any flags:
The db and lockfile will be stored in the track directory at the following path with default name:
| Platform | db file (records.json) | lockfile (track.lock) |
|---|---|---|
| Linux | $XDG_DATA_HOME or $HOME/.local/share |
$XDG_CACHE_HOME or $HOME/.cache |
| macOS | $HOME/Library/Application Support |
$HOME/Library/Caches |
| Windows | {FOLDERID_RoamingAppData} |
{FOLDERID_LocalAppData} |

