Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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.

Awesome Lists containing this project

README

        



Trak banner

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`