Skip to content

woylie/ebb

Ebb

CLI for time tracking and flex time balance.

Command-Line Help

Features

  • Time tracking
  • Projects and tags
  • Flex time balance
  • Vacation, holiday, and sick day tracking

Installation

With Nix

nix profile install github:woylie/ebb/v0.1.0

If the binary can't be found, ensure your Nix profile is in your PATH.

export PATH="$HOME/.nix-profile/bin:$PATH"

Manual Build

With Cargo:

git clone https://github.com/woylie/ebb.git --branch v0.1.0
cd ebb
cargo build --release
./target/release/ebb

With Nix:

nix build github:woylie/ebb/v0.1.0
./result/bin/ebb

Shell Completions

You can generate shell completions with:

ebb generate-completions --shell <SHELL>

To see a list of available shells, run:

ebb generate-completions --help

Getting Started

Configuration

You can list all available configuration options with:

ebb config list

Modify the defaults with:

ebb config set <KEY> <VALUE>

For example: ebb config set working_hours.monday 6h

  • sick_days_per_year.<YEAR> - Defines how many sick days you are allowed to take in a year. The value applies to the specified year and all subsequent years, until a new value is set for a later year.
  • vacation_days_per_year.<YEAR> - Specifies the number of vacation days allowed per year, starting from the given year. The value applies to the specified year and all subsequent years, until a new value is set for a later year.
  • working_hours.<WEEKDAY> - Defines how many hours you are supposed to work on a weekday. The value is a duration string, e.g. "6h" or "7h 30m".

Holidays, Vacation Days, and Sick Days

You can manage holidays, vacation days, and sick days with ebb holiday, ebb vacation, and ebb sickday. Run the commands without further arguments to see the command line help.

Holidays can be national holidays or other days on which you are not expected to work or log hours.

You can render an overview with the count of taken and remaining vacation days and sick days for the current year or other years with ebb daysoff or ebb daysoff --year 2024.

Time Tracking

The commands related to time tracking are:

  • ebb start <PROJECT> [TAGS] - Start tracking time for the given project with optional tags.
  • ebb stop - Stop tracking the current project.
  • ebb cancel - Cancel tracking without saving.
  • ebb restart - Restart the last project.
  • ebb status - Show the current time tracking status.

Reporting

  • ebb balance - Prints the current time balance: expected work hours, actual work hours, and the remaining work hours to break even. A negative remaining value indicates overtime. This overview requires the working hours, vacation days, sick days, and holidays to be configured correctly. By default, the regarded time frame starts at first logged entry and ends at the end of the current day. Run ebb balance --help to view options to change the time frame.
  • ebb report - Print a report listing the recorded time per project and tag.

Important to Know

  • In printed durations, 1d means 24h, not one working day.
  • Vacation days, holidays, and sick days can be full or half days. This is relative to the expected working hours configured for that day. For example, if Monday is configured with 8 expected working hours, a full day off will reduce the flex time balance by 8 hours, and a half day off will reduce it by 4 hours. If a day is configured with 6 expected working hours, a full day off reduces the balance by 6 hours, and a half day off reduces the balance by 3 hours. This logic may be improved in the future based on user feedback.

Further Help

There's a Markdown version of the command-line help available. You can also view help for any command with -h or --help (e.g., ebb balance --help).

Development

The repo contains a flake.nix. You can get into a development shell with all required packages with nix develop. If you have direnv installed, you can also run direnv allow.

Run all checks via flake:

nix flake check

Run tests:

cargo test

Format Rust code:

cargo fmt

Format Nix code:

nixfmt flake.nix

Format anything else:

prettier . --write

Lint Rust code with Clippy:

cargo clippy --all-targets --all-features --no-deps

Check licenses with cargo-deny:

cargo deny check licenses

Check Reuse compliance:

pipx run reuse lint

Add SPDX header to file:

pipx reuse annotate --copyright="YOUR NAME" --license="AGPL-3.0-or-later" <filename>

Generate markdown documentation:

./gen-docs.sh

Generate THIRD_PARTY file:

./gen-third-party.sh

About

No description, website, or topics provided.

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Sponsor this project

  •  

Packages

No packages published

Contributors 2

  •  
  •