**feat: add backup and restore commands for database operations**

### Changes:
- Added `backup` command to export database content into a JSON file.
  - Includes noun and verb data with metadata.
  - Allows specifying a custom output filename (`brainy-backup.json` by default).
- Added `restore` command to import data from a JSON file into the database.
  - Supports clearing existing data with `--clear` option before restoration.
  - Displays success information for imported nouns and verbs.
- Integrated help text examples for the new commands.
- Enhanced CLI interface with additional indentation for better readability.
- Adjusted `completion-setup` to include autocomplete for backup and restore operations.

### Purpose:
Introduced backup and restore functionality to improve database management and data portability, enabling users to save and load datasets seamlessly for better flexibility in usage and recovery.
This commit is contained in:
David Snelling 2025-06-19 15:00:58 -07:00
parent 755b1a6fc1
commit 518a422da0

1053
src/cli.ts

File diff suppressed because it is too large Load diff