**feat(cli, scripts): introduce CLI package and automated publishing process**
- Added a new `@soulcraft/brainy-cli` package to provide a dedicated CLI interface for the Brainy database. - Implemented a CLI wrapper script (`cli-wrapper.js`) to manage global package execution and version handling. - Introduced `scripts/publish-cli.js` to automate synchronized publishing of the main package and CLI, ensuring version consistency. - Created documentation for CLI usage and publishing workflow (`publishing-cli.md`). - Updated `package.json` to include CLI-related build and deploy scripts. - Adjusted `README.md` to document the CLI package, usage instructions, and build separation. This feature introduces a standalone CLI package, improves deployment automation, and enhances documentation to align with the updated architecture.
This commit is contained in:
parent
97839c6ada
commit
7e3e6654a9
11 changed files with 417 additions and 22 deletions
54
cli-package/README.md
Normal file
54
cli-package/README.md
Normal file
|
|
@ -0,0 +1,54 @@
|
|||
# @soulcraft/brainy-cli
|
||||
|
||||
Command-line interface for the [Brainy vector graph database](https://github.com/soulcraft-research/brainy).
|
||||
|
||||
## Installation
|
||||
|
||||
```bash
|
||||
# Install globally
|
||||
npm install -g @soulcraft/brainy-cli
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
Once installed, you can use the `brainy` command from anywhere:
|
||||
|
||||
```bash
|
||||
# Show help
|
||||
brainy --help
|
||||
|
||||
# Initialize a new database
|
||||
brainy init
|
||||
|
||||
# Add data
|
||||
brainy add "Cats are independent pets" '{"noun":"Thing","category":"animal"}'
|
||||
|
||||
# Search
|
||||
brainy search "feline pets" --limit 5
|
||||
|
||||
# Add relationships
|
||||
brainy addVerb id1 id2 RelatedTo '{"description":"Both are pets"}'
|
||||
|
||||
# Visualize the graph
|
||||
brainy visualize
|
||||
brainy visualize --root <id> --depth 3
|
||||
|
||||
# Generate random test data
|
||||
brainy generate-random-graph --noun-count 20 --verb-count 30 --clear
|
||||
```
|
||||
|
||||
## Features
|
||||
|
||||
- Full access to all Brainy database functionality from the command line
|
||||
- Autocomplete support for commands and options
|
||||
- Visualization of graph data
|
||||
- Import/export capabilities
|
||||
- Augmentation pipeline testing
|
||||
|
||||
## Requirements
|
||||
|
||||
- Node.js >= 24.0.0
|
||||
|
||||
## License
|
||||
|
||||
MIT
|
||||
Loading…
Add table
Add a link
Reference in a new issue