A simple tool to track how many hybrid days you need to work in a month. Defaults to a 0.2 ratio, but can be adjusted via flags.
This CLI calculates the number of days you need to be in the office based on the number of weekdays in a month, adjusted by a work ratio and any days off taken. The result is rounded up to the nearest 0.5.
You can get a pre-built binary for your system from the GitHub Releases page.
-
Go to Releases: Visit the Releases page.
-
Download: Find the latest release and download the appropriate binary for your operating system and architecture.
- Linux:
days-linux-amd64ordays-linux-arm64 - Windows:
days-windows-amd64.exeordays-windows-arm64.exe
- Linux:
-
Make Executable (Linux/macOS): If you're on Linux or macOS, you might need to make the downloaded binary executable:
chmod +x ./days-linux-amd64 # or the name of your downloaded binary -
Place in PATH (Optional but Recommended): For easier access, move the binary to a directory included in your system's
PATH(e.g.,/usr/local/binor~/bin).mv ./days-linux-amd64 /usr/local/bin/days # Rename for convenience
If you prefer to build the days CLI from its source code on macOS, follow these steps:
-
Install Go: Ensure you have Go installed on your system. You can download it from the official Go website.
-
Clone the Repository:
git clone https://github.com/DeltaScratchpad/days-cli.git cd days -
Build the Binary:
go build -o days .This command will compile the
daysapplication and create an executable nameddaysin the current directory. -
Install to /usr/local/bin: To make the
dayscommand available globally from any directory in your terminal, move the compiled binary to/usr/local/bin:sudo mv days /usr/local/bin/
Run the tool from the command line:
ᐅ ./days
Calculate hybrid days needed (rounded to nearest 0.5).
Flags: -year 2025, -month 7, -ratio 0.2, -off 0
Year: 2025, Month: 7 has 23 weekdays
You need to be in the office: 5 days- year: Specify the year (default: current year).
- month: Specify the month (default: current month).
- ratio: Define the fraction of weekdays required in the office (default: 0.2).
- off: Define the number of days off already taken (default: 0).
To calculate for July 2025:
ᐅ ./days -year 2025 -month 7For help:
ᐅ ./days -hTo set up a bash alias with the ratio fixed to 0.5, add the following to your shell config (e.g. ~/.bashrc or ~/.zshrc):
alias days="[saved location]/days -ratio 0.5"Reload your shell with:
source ~/.bashrc # or: source ~/.zshrc