Implement bds-cli over the shared RuDS engines #19
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Goal
Replace the bds-cli stub with the automation commands in specs/cli.allium, using the same database, projects, settings, engines, and domain events as the desktop app.
Current state
Required behavior
Implementation notes
Acceptance criteria
Implemented in
fdfae20and pushed to main.The bds-cli stub is now a typed native Clap CLI over the same application paths, SQLite database, project registry, settings, filesystem metadata, rebuild/render/publish/Git, post/media/gallery, config/project, Lua, notification, and AI-gating engines used by the desktop app. It provides stable text/JSON output and 0/1 exit semantics, guarded launcher installation, and a localized Settings > Data installer. The packaged macOS app now ships both bds-ui and bds-cli.
The implementation adds full/incremental rebuild, exact transactional repairs, full/forced/incremental rendering, upload, push/pull with post-pull cache sync, JSON or flag-driven post/gallery creation, shared media enrichment and translation, utility Lua execution, and deduplicated CLI domain notifications. Airplane mode blocks network commands and exclusively selects the local AI endpoint; unavailable AI uses documented fallbacks/notices. Later engines are handled honestly: embeddings fail when enabled until #23 supplies the real model, and direct TUI dispatch retains the baseline launcher guard until #27 supplies the terminal surface.
Neutral review compared the implementation with the issue, bDS2 CLI/launcher behavior, and specs/cli.allium. It caught and fixed fresh-database FTS initialization, Lua notification persistence, notification deduplication/final actions, exact media-link transactions, publish cache selection, packaged-binary omission, thumbnail format validation, gallery excerpt persistence, search repair notification, and full-rebuild thumbnail repair.
Verification passed: cargo fmt --all -- --check; cargo build --workspace; strict workspace clippy; cargo test --workspace including 9 CLI unit dispatch tests, 2 real-process suites, 423 core tests plus integration suites; isolated CLI/event/media suites; allium check and analyse with zero findings; cargo-packager macOS app build; and packaged Settings visual QA.