**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:
parent
755b1a6fc1
commit
518a422da0
1 changed files with 322 additions and 731 deletions
1053
src/cli.ts
1053
src/cli.ts
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue