- Introduced `test-fallback-function.js` and `test-fallback-simple.js` to validate `executeInThread` fallback functionality with both named and anonymous compute-intensive functions. - Added `test-tensorflow-textencoder.js` for TensorFlow.js and TextEncoder tests in a Node.js environment. - Created `test-tensorflow-textencoder.html` for browser-based TensorFlow.js and TextEncoder tests. - Implemented cross-environment test support in `cli-package/src/test-tensorflow-textencoder.ts` for CLI functionality. - Enhanced `src/utils/embedding.ts`, `textEncoding.ts`, and `brainy-wrapper.js` to include updated global `TextEncoder` and `TextDecoder` utilities for compatibility and worker improvements. - Standardized and expanded utility methods in `PlatformNode` for broader support, including `isFloat32Array` and `isTypedArray` checks. - Updated Node.js requirement to `>= 24.4.0` across documentation and configuration files for compatibility improvements. This update introduces comprehensive testing for fallback mechanisms, TensorFlow.js, and TextEncoder across multiple environments, ensuring robustness and compatibility.
54 lines
1 KiB
Markdown
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.4.0
|
|
|
|
## License
|
|
|
|
MIT
|