hourus-0.1.0 is not a library.
hourus
A command-line time-tracking tool that parses .hours log files and generates time summaries.
Usage
hourus [OPTIONS] [COMMAND]
Global options:
--path <PATH>— Path to.hourslog file (or sqlite db if compiled with sqlite feature). Falls back toHOURUS_DEFAULT_FILEenv var, then stdin.--no-env— Ignore theHOURUS_DEFAULT_FILEenvironment variable.--from <DATE>— Only include entries on or after this date (YYYY-MM-DD).--to <DATE>— Only include entries on or before this date (YYYY-MM-DD).
Commands:
- (default) — Print total hours worked.
breakdown [OPTIONS]— Print hours broken down by task, sorted by duration.start <DESCRIPTION>— Start a new session (auto-ends any open session).end— End the current open session.
Output formats
The default command and breakdown support a --format flag:
| Format | Flag | Description |
|---|---|---|
| Pretty | --format pretty |
Human-readable text (default) |
| JSON | --format json |
Newline-delimited JSON |
| CSV | --format csv |
Comma-separated values with header |
| TSV | --format tsv |
Tab-separated values with header |
The --format flag is per-command: pass it after breakdown for breakdown output, or as a global flag for total output.
Examples
# Total hours from a file
# Total hours as JSON
# Breakdown by task for a date range
# Breakdown as CSV (e.g. for import into a spreadsheet)
# Breakdown as TSV, piped to a pager
|
# Start and end sessions
# Use the environment variable default instead of --path
# Pipe from stdin
|
Log File Format
Each line follows this structure:
[KIND] - [DATETIME] - [DESCRIPTION]
- KIND:
STARTorEND(case-insensitive) - DATETIME:
YYYY-MM-DD HH:MM:SSorYYYY-MM-DDTHH:MM:SS - DESCRIPTION: Task name (normalised to lowercase)
Example:
START - 2025-01-15 09:00:00 - feature work
END - 2025-01-15 11:30:00 - feature work
START - 2025-01-15T13:00:00 - code review
END - 2025-01-15T14:15:00 - code review
Installation
Requires Rust 1.92+.
Hourus has not been released on crates.io.
To install you must first clone the repo and then run cargo install.
i.e.,
Development