MCPcopy Index your code
hub / github.com/beatbrot/trackie

github.com/beatbrot/trackie @v1.0.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.0.0 ↗ · + Follow
95 symbols 175 edges 9 files 2 documented · 2% updated 2y agov1.0.0 · 2021-08-27★ 503 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

⏳ trackie

<a href="https://spdx.org/licenses/Apache-2.0.html">
  <img alt="Crates.io" src="https://img.shields.io/crates/l/trackie">
</a>
<a href="https://crates.io/crates/trackie">
  <img alt="Crates.io" src="https://img.shields.io/crates/v/trackie">
</a>
<a href="https://github.com/beatbrot/trackie/actions/workflows/rust.yml">
  <img alt="GitHub Workflow Status" src="https://img.shields.io/github/workflow/status/beatbrot/trackie/Rust">
</a>
<a href="https://codecov.io/gh/beatbrot/trackie">
  <img src="https://codecov.io/gh/beatbrot/trackie/branch/master/graph/badge.svg?token=M1UUT2YYD6"/>
</a>

trackie is a private, daemon-less time tracker running in your CLI.


Trackie offers an easy CLI to track the time you spent on your various projects. It bundles up your busy days in easy digestible reports that you can filter to your liking.

All data is saved to ($XDG_DATA_HOME|%APPDATA%)/trackie/trackie.json where it can be processed by other tools.

Trackie is optimized to lower its complexity to the absolute minimum.


Usage

Trackie currently consists of three simple commands:

  • trackie start <project-ID>: Starts time tracking for a project with the given ID.
  • trackie stop: Stops the time tracking.
  • trackie resume: Resumes time tracking for the last tracked project.
  • trackie status [-f <format>]: Prints information about the currently tracked project.
  • trackie report [-d <num-days>] [-i/--include-empty-days] [--json]: Creates a report for the last n days (default: 5).

Shell integration

Trackie's customizable status command is a great fit for many shells.

Starship

The following starship configuration, for example, leads to a nice element that shows on which project you are working on and for how long you are already doing that.

[custom.trackie]
command = 'trackie status -f "%p[%D]"'
# Comment the following line if you don't want to hide the trackie block if no project is currently tracked
when = "trackie status"
symbol = "⏳"
style = "bg:cyan fg:black"
format = "[$symbol($output)]($style)[](fg:cyan)"

This configuration leads to the following result:

Windows Terminal with starship and trackie extension

Use the following config to get better performance when using powershell

[custom.trackie]
command = ''
shell = ["cmd.exe", "/C", "trackie status -f %p[%D]"]
# Comment the following line if you don't want to hide the trackie block if no project is currently tracked
when = "trackie status"
symbol = "⏳"
style = "bg:cyan fg:black"
format = "[$symbol($output)]($style)[](fg:cyan)"

Oh My Posh

To get an equivalent prompt with "Oh my Posh", use the following segement code in your config file.

{
  "type": "command",
  "style": "powerline",
  "foreground": "#100e23",
  "powerline_symbol": "\uE0B0",
  "background": "cyan",
  "properties": {
    "prefix": "⏳",
    "command": "/root/trackie status -f %p[%D]"
  }
}

Installation

Download prebuilt release

  1. Download the binary for your respective OS from the latest release.
  2. Copy it to a folder in your PATH.

Compile from source using cargo

  1. Run cargo install trackie.

Compile from source using make

git clone https://github.com/beatbrot/trackie
cd trackie
make
sudo make install

Extension points exported contracts — how you extend this code

FileHandler (Interface)
(no doc) [2 implementers]
src/persistence.rs
PrettyString (Interface)
(no doc) [1 implementers]
src/pretty_string.rs

Core symbols most depended-on inside this repo

run_app
called by 16
src/lib.rs
report_days
called by 5
src/report_creator.rs
start_log
called by 4
src/time_log.rs
for_day
called by 4
src/time_log.rs
report_day
called by 4
src/report_creator.rs
stop_pending
called by 3
src/time_log.rs
start_tracking
called by 2
src/lib.rs
get_pending_duration
called by 2
src/time_log.rs

Shape

Function 39
Method 36
Class 17
Interface 2
Enum 1

Languages

Rust100%

Modules by API surface

src/time_log.rs24 symbols
src/report_creator.rs21 symbols
src/lib.rs15 symbols
src/persistence.rs11 symbols
tests/cli-tests.rs8 symbols
benches/perf_test.rs7 symbols
src/cli.rs6 symbols
src/pretty_string.rs2 symbols
src/main.rs1 symbols

For agents

$ claude mcp add trackie \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact