brainy/cli-package/README.md
David Snelling 087eb51799 **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.
2025-07-02 11:32:06 -07:00

54 lines
1 KiB
Markdown

# @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