npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

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

Install 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 link

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

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

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

Using Default Brain ID

Most commands that require a brain ID can use a default brain ID when one is set:

  1. Set a default brain ID:

    breign config:set defaultBrainId your-brain-id
  2. Use 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 ID
  3. Override 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 authentication
  • logout: Log out from 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 (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 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 (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