summaryrefslogtreecommitdiffstats
path: root/completions/firefly.bash
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-07-01 10:53:58 +0200
committerDanilo M. <danix@danix.xyz>2026-07-01 10:53:58 +0200
commit1c807048f8c754b421dae5a07ee8c053e3788348 (patch)
tree252dcd2c199c3a8a68e76539eb2a07f695c49549 /completions/firefly.bash
parent69647b1ca6f2e11429850b0782c65d04b86509cb (diff)
downloadfirefly-cli-1c807048f8c754b421dae5a07ee8c053e3788348.tar.gz
firefly-cli-1c807048f8c754b421dae5a07ee8c053e3788348.zip
feat: tx add --skip-dupes for idempotent imports (v0.3.4)
Re-running an import (a retried or double-read batch) created phantom duplicate transactions and drifted balances, with no signal. --skip-dupes searches for an existing tx with the same amount + date + source + destination before writing; on a match it emits {"skipped": "duplicate", "matched_id": "<id>"} and exits 0 without writing. Off by default (one extra search per add only when set). dry-run wins over skip-dupes: a preview never triggers the search. Match is amount+date+ accounts, not description, so genuinely distinct same-value same-day transfers between the same accounts look like duplicates; documented. Also document a Firefly quirk in SKILL.md: a missing/deleted transaction id returns 401 (not 404) on tx get/edit/delete, so a 401 after delete confirms the record is gone rather than signalling an auth failure. Verified live on the test instance: create -> identical --skip-dupes skips with matched_id and no write, --dry-run --skip-dupes previews without searching, no-match --skip-dupes writes; records cleaned up after. 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.bash2
1 files changed, 1 insertions, 1 deletions
diff --git a/completions/firefly.bash b/completions/firefly.bash
index 2dbe218..68c4b74 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 --dry-run --from --tags --to --type";;
+ "tx add") leaf_opts="--category --date --desc --dry-run --from --skip-dupes --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";;