| Crates.io | rtimelogger |
| lib.rs | rtimelogger |
| version | 0.8.5 |
| created_at | 2025-10-06 08:01:38.355441+00 |
| updated_at | 2026-01-13 14:41:58.760934+00 |
| description | A simple cross-platform CLI tool to track working hours, lunch breaks, and calculate surplus time |
| homepage | https://github.com/umpire274/rTimelogger |
| repository | https://github.com/umpire274/rTimelogger |
| max_upload_size | |
| id | 1869909 |
| size | 333,642 |
rTimelogger is a cross-platform command-line time tracking tool written in Rust. It tracks working time using IN / OUT events, supports multiple locations, lunch rules, working gaps, and computes expected exit time and daily surplus accurately.
Starting from v0.8.2, rTimelogger automatically migrates the database schema to support the new National holiday
position.
events.position CHECK constraintEvent-based time tracking (IN / OUT)
Multiple working positions:
O OfficeR RemoteC Client / On-siteN National holidayH HolidayM MixedAutomatic calculation of:
Configurable lunch rules
Event mode with:
Internal audit log
Safe database migrations with automatic backups
Cross-platform (Linux, macOS, Windows)
cargo install rtimelogger
yay -S rtimelogger
# or
paru -S rtimelogger
brew tap umpire274/tap
brew install rtimelogger
Starting from v0.8.0, rFortune provides an official .deb package.
You can install it directly from the GitHub Releases page:
sudo dpkg -i rtimelogger_<version>_amd64.deb
To verify integrity, download the corresponding .sig file and verify it with GPG (see below).
sha256sum -c rtimelogger_<version>_amd64.deb.sha256
gpg --verify rtimelogger_<version>_amd64.deb.sig
If dependencies are missing, complete the installation with:
sudo apt --fix-broken install
You can still use the prebuilt tarball:
tar -xvf rtimelogger-<version>-x86_64-unknown-linux-gnu.tar.gz
sudo mv rtimelogger /usr/local/bin/
You can use the prebuilt tarballs for Intel or Apple Silicon:
tar -xvf rtimelogger-<version>-x86_64-apple-darwin.tar.gz
sudo mv rtimelogger /usr/local/bin/
or
tar -xvf rtimelogger-<version>-aarch64-apple-darwin.tar.gz
sudo mv rtimelogger /usr/local/bin/
Download the prebuilt zip file, extract it, and move rtimelogger.exe to a directory in your PATH, e.g.,
C:\Windows\System32\ or create a dedicated folder like C:\Program Files\rtimelogger\ and add it to your system
PATH.
Initialize configuration and database:
rtimelogger init
Example rtimelogger.conf:
database: /home/user/.rtimelogger/rtimelogger.sqlite
default_position: O
min_work_duration: 8h
lunch_window: 12:30-14:00
min_duration_lunch_break: 30
max_duration_lunch_break: 90
separator_char: "-"
show_weekday: None # None | Short | Medium | Long
Override database path at runtime:
rtimelogger --db /custom/path/db.sqlite <command>
| Command | Description |
|---|---|
init |
Initialize DB and config |
add |
Add or edit IN / OUT events |
list |
Show sessions, events, or details |
del |
Delete events or pairs (with confirmation) |
backup |
Backup database (optional compression) |
export |
Export data (CSV / JSON / XLSX / PDF) |
db |
Database utilities |
config |
Manage configuration file |
log |
Show internal audit log |
rtimelogger addrtimelogger add <DATE> [OPTIONS]
Examples:
rtimelogger add 2025-12-15 --in 09:00
rtimelogger add 2025-12-15 --out 17:30
rtimelogger add 2025-12-15 --in 09:00 --lunch 30 --out 17:30
rtimelogger add 2025-12-15 --edit --pair 1 --out 18:00
rtimelogger add 2025-12-15 --out 10:30 --work-gap
rtimelogger add 2025-12-15 --edit --pair 2 --no-work-gap
rTimelogger supports multiple day positions to describe how a working day (or non-working day) is classified.
Supported positions
| Code | Name | Description |
|---|---|---|
O |
Office | Regular office working day |
R |
Remote | Remote working day |
C |
On-site | Working day at customer site |
M |
Mixed | Mixed working locations |
H |
Holiday | Personal holiday (counts against personal leave allowance) |
N |
National holiday | Public holiday (does not affect personal leave allowance) |
To mark a public/national holiday, use the add command with the national position.
rtimelogger add 2025-12-25 --pos n
or
rtimelogger add 2025-12-25 --pos national
Behavior
--in, --out, --lunch, or --work-gap parameters are allowedNational holiday days
In both standard and compact list views:
--:--TGT) is not computedΞWORK) is neutral (-)Example:
2025-12-25 (Thu) | National holiday | --:-- | --:-- | --:-- | --:-- | -
| Aspect | Holiday (H) |
National holiday (N) |
|---|---|---|
| Working day | β | β |
| Counts as personal leave | β | β |
| Expected time | β | β |
| ΞWORK contribution | β | β |
| Requires time entries | β | β |
rtimelogger listThe list command displays saved work sessions, supporting multiple layouts and levels of detail.
rtimelogger list # current month
Shows the sessions for the current month using the default tabular layout.
rtimelogger list --period 2025-12
rtimelogger list --period 2025
rtimelogger list --period 2025-12-01
rtimelogger list --period 2025-12-01:2025-12-31
rtimelogger list --period all
The weekday is shown inside the date column, using the format:
YYYY-MM-DD (Mo)
YYYY-MM-DD (Monday)
The format is controlled by the show_weekday configuration option:
| Value | Output example |
|---|---|
none |
2025-12-19 |
short |
2025-12-19 (Mo) |
medium |
2025-12-19 (Mon) |
long |
2025-12-19 (Monday) |
rtimelogger list --period 2025-12
Example:
DATE (WD) | POSITION | IN | LNCH | OUT | TGT | ΞWORK
---------------------------------------------------------------------------
2025-12-19 (Fr) | Remote | 08:55 | 00:30 | 18:27 | 17:01 | -02h04m
Columns explained:
rtimelogger list --period 2025-12-19 --details
Displays the individual IN/OUT pairs for the selected day. It is available only for single-day periods or
--today.
Output example:
DETAILS
PAIR | IN | OUT | WORKED | LUNCH | POSITION | WG
------------------------------------------------------
1 | 08:55 | 09:37 | 00h42m | 0m | Remote |
2 | 13:07 | 18:27 | 04h50m | 30m | Remote |
Columns explained:
rtimelogger list --period 2025-12 --compact
Shows a condensed, single-line-per-day view, suitable for long periods.
Example:
DATE (WD) | POSITION | IN / LNCH / OUT | TGT | ΞWORK
--------------------------------------------------------------------
2025-12-19 (Fr) | Remote | 08:55 / 00:30 / 18:27 | 17:01 | Ξ -02h04m
2025-12-22 (Mo) | Holiday | --:-- / --:-- / --:-- | --:-- | Ξ -
Characteristics:
β οΈ
--compactcannot be combined with--details
rtimelogger list --period 2025-12-15 --events
Displays the raw IN / OUT events for the selected day.
Output example:
EVENTS:
Date Time | Type | Lunch | Position | Source | Pair | Work Gap
----------------------------------------------------------------------------------------
β 2025-12-19 08:55 | in | lunch 0 min | Remote | cli | 1 |
09:37 | out | lunch 0 min | Remote | cli | 1 |
13:07 | in | lunch 0 min | Remote | cli | 2 |
18:27 | out | lunch 30 min | Remote | cli | 2 |
Days marked as Holiday:
At the end of the output, a cumulative total is always displayed:
Ξ£ Total ΞWORK: +02h04m
The total accounts for:
rtimelogger list --period 2025-12 --json
Outputs the data in JSON format for easy integration with other tools or scripts.
rtimelogger delrtimelogger del 2025-12-15
rtimelogger del --pair 2 2025-12-15
All deletions require confirmation and automatically reindex pairs.
rtimelogger backuprtimelogger backup --file /abs/path/backup.sqlite
rtimelogger backup --file /abs/path/backup.sqlite --compress
rtimelogger exportrtimelogger export --format pdf --file /abs/path/report.pdf --range 2025-12
Supported formats:
csvjsonxlsxpdfOutput path must be absolute.
Starting from v0.8.3, rTimelogger supports importing work sessions and holidays from external files.
This feature is designed to simplify preventive data entry, especially for national holidays.
The import system is safe by default and provides a full dry-run mode.
Flexible JSON structures are supported. The following formats are valid:
Root object with holidays:
{
"year": 2026,
"holidays": [
{
"date": "2026-01-01",
"name": "New Year"
},
{
"date": "2026-01-06",
"name": "Epiphany"
}
]
}
Root object with days:
{
"days": [
{
"date": "2026-05-01",
"position": "N",
"name": "Labour Day"
}
]
}
Root array of day objects:
[
{
"date": "2026-12-25",
"name": "Christmas Day"
}
]
Notes:
position is optional:
NationalHolidayname is optional and stored in the event meta fieldCSV files must include a header row.
Example:
date,position,name
2026-01-01,N,New Year
2026-01-06,N,Epiphany
2026-04-25,N,Liberation Day
Notes:
position must be a valid location code (N, H, O, R, C, M)rtimelogger import --file <path> [options]
Options
--file <path> : Path to the input file (required)
--format <json|csv> : Input format (default: json)
--dry-run : Simulate the import without modifying the database (strongly recommended)
--replace : Replace existing events for conflicting dates (dangerous)
--source <label> : Logical label describing the origin of imported data. The final stored value will include the
format automatically (e.g. import (from json))
Only Holiday and NationalHoliday positions are accepted by default.
Dates with existing work events are skipped unless --replace is used.
Imported holidays:
Each import generates a detailed summary:
rtimelogger import \
--file holidays_2026.json \
--format json \
--dry-run
rtimelogger import \
--file holidays_2026.csv \
--format csv \
--source calendar
This ensures full traceability of all events.
rtimelogger dbrtimelogger db --info
rtimelogger db --check
rtimelogger db --vacuum
rtimelogger db --migrate
rtimelogger configrtimelogger config --print
rtimelogger config --edit
rtimelogger config --migrate
Missing fields are added automatically with defaults.
rtimelogger logrtimelogger log --print
Shows timestamped internal operations (add, del, migrate, backup, β¦).
If you are upgrading from 0.7.x or earlier, read:
β‘οΈ UPGRADE-0.7-to-0.8.md
This document explains:
MIT License β see LICENSE.