Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lcfd/trak
Keep a record of the time you dedicate to your projects.
https://github.com/lcfd/trak
cli command-line command-line-tool python report time time-tracking tracking
Last synced: about 2 months ago
JSON representation
Keep a record of the time you dedicate to your projects.
- Host: GitHub
- URL: https://github.com/lcfd/trak
- Owner: lcfd
- License: agpl-3.0
- Created: 2023-10-04T21:18:37.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-09-06T10:58:04.000Z (4 months ago)
- Last Synced: 2024-10-05T23:34:45.822Z (3 months ago)
- Topics: cli, command-line, command-line-tool, python, report, time, time-tracking, tracking
- Language: Python
- Homepage: https://usetrak.com
- Size: 2.26 MB
- Stars: 11
- Watchers: 2
- Forks: 2
- Open Issues: 20
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
trak
Trak is a CLI to track the time you spend on projects, with useful reports and analytics.
For freelancers, by a freelance.
Website
·
Issues
·
Documentation
•
Feedback
## Installation
### Pypi
[On Pypi](https://pypi.org/project/trakcli/) you can find the package under the `trakcli` name.
You can install it with pip:
```bash
pip install trakcli
```or with `pipx`:
```bash
pipx install trakcli
```### Brew
`brew install lcfd/trak/trak`
### Nix
Try it:
```bash
nix shell nixpkgs/master#trak
```Install it:
```bash
nix profile install nixpkgs/master#trak
```### Local
Run `poetry build` and then
```bash
# x.x.x = The version you have used to do the build.
pipx install ./dist/trakcli-x.x.x-py3-none-any.whl
```to install `trak` using the wheel file.
## Usage
The package has the useful `--help` command that explains all the commands.
`trak --help`
The CLI guides you through what you should and must do with specific messages.
### Basic commands
```bash
# Start a new session
trak start# Stop the current session
trak stop# Show the elapsed time of the current session
trak status# Show the amount of hours spend on the project
trak report project
```Start tracking a billable project:
`trak start pasta -b`
Start tracking a project on a specific category/topic:
`trak start pasta -c rigatoni`
## Starship
There is a dedicated command that outputs clean strings for tools like Starship:
`trak status -s` or `trak status --starship`
To see the status in your terminal line open `$HOME/.config/starship.toml`
and put this snippet inside of it:```bash
[custom.trak]
command = """ trak status -s """
when = "trak status"
shell = "sh"
```This way you can stay updated on the state of your session wherever you integrate this command.
## Distribution
### Create dist tar
`tar --exclude=".venv" --exclude="dist" --exclude=".mypy_cache" --exclude=".pytest_cache" --exclude="**/__pycache__" -czvf dist.tar.gz cli`