# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased]
## [0.11.1] - 2026-06-06
### Fixed
- Notes containing newlines are now rejected instead of silently corrupting the log file
- Zero-delta changes (e.g. `add 0 min`) no longer render in red
### Changed
- `add`/`remove`/`set`/`reset` now append to the log file in place instead of rewriting it on every change
- Reading the current balance now parses only the last log entry instead of the whole file
## [0.11.0] - 2026-05-30
### Added
- `--note`/`-m` flag on `reset` (consistent with `add`, `remove`, `set`)
- `flexi edit` — open the log file in `$EDITOR` (falls back to `vi`)
## [0.10.0] - 2026-05-30
### Added
- `flexi log --yesterday` — filter log entries to yesterday only
- `--note`/`-m` flag on `add`, `remove`, `set` — attach freeform annotation to a log entry (e.g. `flexi add 1 hr --note "stayed late"`); displayed dimmed in `flexi log`
## [0.9.0] - 2026-05-29
### Changed
- Log file now uses `>` as the separator between delta and new balance (e.g. `+1 hr > 2 hr`); `→` and `->` remain accepted for backwards compatibility and are displayed as `→` in the CLI
- `flexi log --summary` no longer shows current balance; totals reflect only the filtered period
## [0.8.0] - 2026-05-24
### Added
- `--version` flag
- `flexi log --summary` — shows totals (added, removed, net) for the filtered period; also shows current balance when no `--until` filter is set
## [0.7.0] - 2026-05-24
### Added
- `flexi log` filter flags: `--today`/`--day`, `--week`, `--month`, `--since YYYY-MM-DD`, `--until YYYY-MM-DD`, `--last N`
- `week_start` config key: `"monday"` (default) or `"sunday"`, controls `--week` filter
- `flexi log` entries colored: positive green, negative red, set/reset neutral
- `->` accepted as ASCII alias for `→` in hand-edited log entries; normalized to `→` in display
## [0.6.0] - 2026-05-24
### Added
- `timestamp_format` config key: `"simple"` (default, `2026-05-24 10:20`) or `"full"` (`2026-05-24T10:20:16+01:00`)
- `->` accepted as ASCII alias for `→` in hand-edited log entries
### Changed
- Storage simplified to a single file. `flexi.txt` is now the log — no separate `flexi.log`. Current balance is derived from the last entry's description.
- Log format changed from 4-column TSV (`timestamp\tprev\tnew\tdescription`) to 2-column (`timestamp description`). Timestamp and description are separated by whitespace and parsed by position.
- `reset` now records `= 0 min` in the log, consistent with `set`.
### Migration from 0.5.0
If you have an existing `flexi.log`, rename it to `flexi.txt` (replacing the old plain-text balance file). Then strip the integer columns:
```sh
awk -F'\t' '{print $1 " " $4}' flexi.txt > flexi.tmp && mv flexi.tmp flexi.txt
```
## [0.5.0] - 2026-05-23
### Added
- `flexi log` — show full change history
- `flexi undo` — revert the last change
- Delta output on `add` and `remove` (e.g. `+1 hr 30 min → 3 hr`)
- CI workflow for tests and clippy on push
## [0.4.0] - 2026-05-23
### Added
- `flexi copy` (alias: `cp`) — copy balance to clipboard; Wayland support via `wl-clipboard`
- Balance printed after every mutating command (`add`, `remove`, `set`, `reset`)
### Changed
- `rm` subcommand renamed to `remove`; `rm` kept as alias
## [0.3.0] - 2026-05-23
### Added
- `flexi set` — set balance to an exact value
- `flexi reset` — reset balance to zero
- `flexi completions` — print shell completion script
- Color output: positive balances green, negative red
- Atomic writes via `.tmp` file
## [0.2.0] - 2026-05-23
### Added
- Additional time input formats: plural/abbreviated units (`hours`, `hrs`, `mins`), compact (`1h30m`, `1h`, `30m`), decimal (`1.5`, `1.5h`), European decimal (`1,5`)
## [0.1.0] - 2026-05-23
### Added
- Initial CLI: `flexi` (display balance), `flexi add`, `flexi rm`
- XDG data directory support on Linux/macOS
- Negative balance display (e.g. `-1 hr 30 min`)