summaryrefslogtreecommitdiffstats
path: root/SKILL.md
diff options
context:
space:
mode:
Diffstat (limited to 'SKILL.md')
-rw-r--r--SKILL.md10
1 files changed, 9 insertions, 1 deletions
diff --git a/SKILL.md b/SKILL.md
index 672c97e..42d5fb4 100644
--- a/SKILL.md
+++ b/SKILL.md
@@ -56,7 +56,7 @@ firefly account balance <name|id> [--at YYYY-MM-DD]
firefly account create <name> --type asset|expense|revenue
[--opening-balance N] [--currency CODE]
firefly tx add <amount> --from <acct> --to <acct>
- [--desc TEXT] [--date YYYY-MM-DD] [--category NAME] [--tags a,b] [--type T]
+ [--desc TEXT] [--date YYYY-MM-DD] [--category NAME] [--tags a,b] [--type T] [--dry-run]
firefly tx edit <id>
[--amount N] [--date YYYY-MM-DD] [--desc TEXT] [--from <acct>] [--to <acct>]
[--category NAME] [--tags a,b] [--type T] # only fields passed are changed
@@ -102,6 +102,14 @@ Supports asset, expense, revenue. asset accounts get the default role
automatically. Unlike categories/tags, accounts are NOT auto-created by
`tx add`, create them explicitly here first.
+**Validate a batch before writing any of it:** when importing many rows in a
+loop, a mid-batch failure (a `--to` account that doesn't exist yet) leaves the
+earlier rows already written. Dry-run each row first so the whole batch fails
+fast: `tx add ... --dry-run` resolves `--from`/`--to` and infers the type but
+sends nothing, printing `{"dry_run": true, "would_send": {...}}`. A missing
+account is still a hard error (exit 1). Recipe: dry-run every row, create any
+accounts the errors name, then run the batch for real.
+
**Check a balance:**
```bash
firefly account balance test01 # -> {"id","name","current_balance"}