diff options
| author | Danilo M. <danix@danix.xyz> | 2026-07-01 10:40:32 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-07-01 10:40:32 +0200 |
| commit | 69647b1ca6f2e11429850b0782c65d04b86509cb (patch) | |
| tree | ab6b98c3595aaf04a9391f881357a73eb3d29c01 /completions/firefly.bash | |
| parent | b078c5980facc0ebe4acd1f251f6ae3dad561292 (diff) | |
| download | firefly-cli-69647b1ca6f2e11429850b0782c65d04b86509cb.tar.gz firefly-cli-69647b1ca6f2e11429850b0782c65d04b86509cb.zip | |
feat: tx add --dry-run to validate before writing (v0.3.3)
An agent importing rows in a loop could fail mid-batch: a --to account that
didn't exist yet errored after earlier rows had already been written, leaving
a half-applied batch to clean up by hand.
--dry-run resolves --from/--to and infers the type but sends nothing, printing
{"dry_run": true, "would_send": {...}}. A missing account stays a hard error
(exit 1) so the agent can dry-run every row first, create the accounts the
errors name, then run the batch for real. No batch input mode: the agent
already owns the loop.
Verified live read-only: valid accounts emit would_send and write nothing
(search confirms []), missing account exits 1 with the candidate list.
PATCH: new optional flag, contract unchanged.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Diffstat (limited to 'completions/firefly.bash')
| -rw-r--r-- | completions/firefly.bash | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/completions/firefly.bash b/completions/firefly.bash index b23f081..2dbe218 100644 --- a/completions/firefly.bash +++ b/completions/firefly.bash @@ -40,7 +40,7 @@ _firefly() { "account balance") leaf_opts="--at";; "account create") leaf_opts="--currency --opening-balance --type";; "account list") leaf_opts="--type";; - "tx add") leaf_opts="--category --date --desc --from --tags --to --type";; + "tx add") leaf_opts="--category --date --desc --dry-run --from --tags --to --type";; "tx delete") leaf_opts="--yes";; "tx edit") leaf_opts="--amount --category --date --desc --from --tags --to --type";; "tx list") leaf_opts="--account --all --limit --since --until";; |
