Skip to main content

BREIGN Command Line Interface

A powerful CLI tool for interacting with the sovereign agentic platform made in Luxembourg.

Installation​

Install from NPM​

# Install globally from npm
npm install -g breign-cli

Usage​

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

# Start a new conversation with a brain
breign chat:create <brainId> --message "Hello, how can you help me today?"

# 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

# Convert speech to text
breign stt --file recording.mp3

# Upload a file to a brain's knowledge base
breign file:upload <brainId> --file document.pdf

# List all files in a brain's knowledge base
breign files <brainId>

# Get details about a specific file
breign file <brainId> <fileId>

# Delete a file
breign file:delete <brainId> <fileId>

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

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

# Clear all configuration
breign config:set clear true

Alternatively, 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

Note: The actual path may include variations depending on installation.

Specifying API Server​

You can specify the API server in several ways:

  1. Set it globally for all commands:

    breign config:set apiUrl https://your-api-server.com
  2. Specify it during login:

    breign login --server https://your-api-server.com
  3. Use the default (https://api-dev.avatar.lu) if not specified

Commands​

Authentication​

  • login: Log in to the BREIGN using email authentication
  • logout: Log out from the BREIGN

Brains​

  • brains: List all accessible brains
  • brain <id>: Get details for a specific brain
  • brain: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 brain
  • guardian:create <brainId>: Create a new guardian
  • guardian:update <brainId> <guardianId>: Update a guardian
  • guardian:delete <brainId> <guardianId>: Delete a guardian

Conversations​

  • chat <brainId>: Start an interactive chat session with a brain
  • chat:create <brainId>: Create a new conversation
  • chat:send <conversationId>: Send a message to an existing conversation
  • chat:messages <conversationId>: View all messages in a conversation

Tools​

  • tts: Convert text to speech
  • stt: Convert speech to text

Knowledge Base Files​

  • files <brainId>: List files in a brain's knowledge base
  • file:upload <brainId>: Upload a file to a brain's knowledge base
  • file <brainId> <fileId>: Get file details
  • file:delete <brainId> <fileId>: Delete a file