breign-cli
v1.1.0
Published
Command line interface for Breign. The sovereign ahentic platform made in Luxembourg
Readme
BREIGN Command Line Interface
A powerful CLI tool for interacting with the sovereign agentic platform made in Luxembourg.
Installation
Install from NPM (recommended)
# Install globally from npm
npm install -g breign-cliInstall from Source
# Clone the repository
git clone ssh://[email protected]:10022/id/assistant/brain-cli.git
cd brain-cli
# Install dependencies
npm install
# Generate the API client (requires OpenAPI Generator CLI)
npm run generate-client
# Build the CLI
npm run build
# Create a global link
npm linkUsage
# Show help
breign --help
# Show current configuration
breign config
# Set API server address (default is https://api-dev.avatar.lu)
breign config:set apiUrl https://api-dev.avatar.lu
# Login to the API (with default server URL)
breign login
# Login to the API with custom server URL
breign login --server https://api-dev.avatar.lu
# List all your brains
breign brains
# Get details about a specific brain
breign brain <brainId>
# Create a new brain (persona is required)
breign brain:create --name "My New Brain" --engine openai --config '{"model":"gpt-4o-mini"}' --persona "This is an AI assistant that helps with data analysis."
# Update a brain (persona can be updated)
breign brain:update <brainId> --name "Updated Brain Name" --persona "New persona description"
# Delete a brain
breign brain:delete <brainId>
# Set up brain for conversations (uses a known working flow ID)
breign flow:create <brainId> --promptInit "You are a helpful assistant"
# Add a knowledge module to a brain
breign module:add <brainId> --name "ContextualKnowledgeWeaviate" --config '{"indexName":"my_index"}'
# Update a module (enable/disable or change configuration)
breign module:update <brainId> <moduleId> --enabled false
# List guardians for a brain
breign guardians <brainId>
# Create a new guardian
breign guardian:create <brainId> --role WORDCHECK --name "Profanity Filter"
# Start an interactive chat session with a brain
breign chat [brainId] # Uses default brain ID if not specified
# Start a new conversation with a brain
breign chat:create [brainId] --message "Hello, how can you help me today?" # Uses default brain ID if not specified
# Continue an existing conversation
breign chat:send <conversationId> --message "Tell me more about that"
# View all messages in a conversation
breign chat:messages <conversationId>
# Convert text to speech
breign tts --text "Hello, this is a test" --output speech.mp3 --provider amazon --voice en-US-female
# Convert speech to text
breign stt --file recording.mp3 --language en-US
# Upload a file to a brain's knowledge base
breign file:upload [brainId] --file document.pdf # Uses default brain ID if not specified
# Scan a directory and upload files to a brain's knowledge base
breign files:scan [brainId] --directory ./docs --recursive --types pdf,txt,docx --exclude svg,jpg,png --size 10 # Uses default brain ID if not specified
# List all files in a brain's knowledge base
breign files [brainId] # Uses default brain ID if not specified
# Get details about a specific file
breign file [brainId] <fileId> # Uses default brain ID if not specified
# Delete a file
breign file:delete [brainId] <fileId> # Uses default brain ID if not specified
# Run diagnostic tests for API connectivity
breign diagnostic
# Enable verbose mode with any command for debugging
breign -v <command>Configuration
The CLI stores configuration in a local file:
- API key (obtained during login)
- API URL (defaults to https://api-dev.avatar.lu)
- Email address
- Default brain ID (optional, used when brain ID is not specified in commands)
You can modify the configuration using the config commands:
# View current configuration
breign config
# Set API server URL
breign config:set apiUrl https://your-custom-server.com
# Set default brain ID (this ID will be used when not specified in commands)
breign config:set defaultBrainId your-brain-id
# Clear all configuration
breign config:set clearAlternatively, you can modify the configuration directly by editing the file located at:
- macOS/Linux:
~/.config/breign-cli/config.json - Windows:
%APPDATA%\breign-cli\config.json
Specifying API Server
You can specify the API server in several ways:
Set it globally for all commands:
breign config:set apiUrl https://your-api-server.comSpecify it during login:
breign login --server https://your-api-server.comUse the default (https://api-dev.avatar.lu) if not specified
Using Default Brain ID
Most commands that require a brain ID can use a default brain ID when one is set:
Set a default brain ID:
breign config:set defaultBrainId your-brain-idUse commands without specifying a brain ID:
breign chat # Uses default brain ID breign files # Uses default brain ID breign file:upload --file document.pdf # Uses default brain IDOverride the default by explicitly providing a brain ID:
breign chat specific-brain-id # Uses the specified brain ID instead of default
Commands
Authentication
login: Log in to BREIGN using email authenticationlogout: Log out from BREIGN
Brains
brains: List all accessible brainsbrain <id>: Get details for a specific brainbrain:create: Create a new brain (requires name, engine, and persona)brain:update <id>: Update an existing brain (name, description, engine, or persona)brain:delete <id>: Delete a brain
Flows
flow:create <brainId>: Set up brain for conversations (prompt template and flow)
Modules
module:add <brainId>: Add a module to a brain (e.g., knowledge module)module:update <brainId> <moduleId>: Update a module's configuration or status
Guardians (Content Moderation)
guardians <brainId>: List guardians for a brainguardian:create <brainId>: Create a new guardianguardian:update <brainId> <guardianId>: Update a guardianguardian:delete <brainId> <guardianId>: Delete a guardian
Conversations
chat [brainId]: Start an interactive chat session with a brain (uses default brain ID if not specified)chat:create [brainId]: Create a new conversation (uses default brain ID if not specified)chat:send <conversationId>: Send a message to an existing conversationchat:messages <conversationId>: View all messages in a conversation
Tools
tts: Convert text to speechstt: Convert speech to text
Knowledge Base Files
files [brainId]: List files in a brain's knowledge base (uses default brain ID if not specified)file:upload [brainId]: Upload a file to a brain's knowledge base (uses default brain ID if not specified)files:scan [brainId]: Scan a directory and upload files to a brain's knowledge base (uses default brain ID if not specified)file [brainId] <fileId>: Get file details (uses default brain ID if not specified)file:delete [brainId] <fileId>: Delete a file (uses default brain ID if not specified)
License
MIT
