From 38d7357f36e6eeb91216d1c5668fb29406c7e076 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Tue, 30 Jun 2026 17:55:30 +0200 Subject: feat: add tx edit and tx delete (v0.3.0) Implements ISSUES.md #1, the missing other half of an import tool: correcting and removing mis-imported transactions without the web UI. - tx edit : PATCH a single-split journal; only the fields passed are sent (--amount/--date/--desc/--from/--to/--category/--tags/--type). Errors if no field is given. Accounts resolve to ids; category/tags pass raw. - tx delete : requires --yes (no interactive prompt, agent-first); prints {"deleted": ""} on success. Also fix gen_completion.py: running it as a script put scripts/ on sys.path[0] and imported the installed (stale) firefly_cli, so the generated completion drifted (missing account balance/get, tx get/search). Prepend the repo root so the documented regen command uses this tree. The regenerated completion now reflects the full command surface. MINOR bump per the contract-keyed scheme: new commands, no breaking change. Co-Authored-By: Claude Opus 4.8 --- scripts/gen_completion.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'scripts/gen_completion.py') diff --git a/scripts/gen_completion.py b/scripts/gen_completion.py index a97f26b..4714bf1 100644 --- a/scripts/gen_completion.py +++ b/scripts/gen_completion.py @@ -8,8 +8,14 @@ No drift: groups, leaves, and per-leaf flags are read straight off the argparse subparsers the registry builds. """ import argparse +import os +import sys from collections import defaultdict +# Run from the repo, not any installed copy: prepend the repo root so +# `python scripts/gen_completion.py` imports this tree, not a stale install. +sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) + from firefly_cli import registry import firefly_cli.commands # noqa: F401 triggers registration -- cgit v1.2.3