Beyond Better CLI Documentation

bb is a command-line interface tool for interacting with the Beyond Better API and managing AI-assisted conversations for various text-based projects.

Installation

For detailed installation instructions, please refer to our Installation Guide.

For Windows users, we provide an MSI installer and batch files for easy setup and usage. Please see our Windows User Guide for more information.

Usage

bb [command] [options]

On Windows, use bb.exe instead of bb for all CLI commands.

Available Commands

General

  • bb --version: Display the version of the Beyond Better CLI tool.
  • bb --help: Show help information for the Beyond Better CLI tool.

Project Initialization

  • bb init: Initialize Beyond Better in the current directory.

Security Management

  • bb secure: Manage TLS security settings
    • on: Enable TLS (recommended)
      • Generates CA and server certificates
      • Adds CA to system trust store
      • Updates configuration
    • off: Disable TLS (not recommended)
      • Disables TLS in configuration
      • Keeps certificates for future use
    • status: Show detailed TLS status
      • Certificate details and validity
      • Trust store status
      • Browser compatibility info
    • trust: Add certificate to trust store
    • untrust: Remove certificate from trust store

API Management

  • bb start: Start the Beyond Better API server and open the browser interface.
  • bb stop: Stop the Beyond Better API server.
  • bb status: Check the status of the Beyond Better API server.

Conversation Management

  • bb chat (alias: c): Start a new conversation or continue an existing one.

Utility Commands

  • bb logs: View chat conversation logs (default).

Configuration Management

  • bb config: View or update BB configuration.
    • Commands:
      • view: View configuration settings
        • --global: Show only global configuration
        • --project: Show only project configuration
      • get <key>: Get a specific configuration value
        • --global: Get from global configuration
        • --project: Get from project configuration
      • set <key> <value>: Set a configuration value (defaults to project config)
        • --global: Set in global configuration
        • --project: Set in project configuration
    • Examples:
    • View current configuration:
      bb config view
    • View global configuration:
      bb config view --global
    • Get a specific value:
      bb config get api.logLevel
      bb config get --global api.apiPort
    • Set configuration values:
      # Set in project config (default)
      bb config set api.logLevel debug
      
      # Set in global config
      bb config set --global api.apiPort 3000
      
      # Set complex values (automatically parsed)
      bb config set api.toolConfigs '{"tool1": {"enabled": true}}'
    • Notes:
      • Nested keys use dot notation (e.g., 'api.logLevel')
      • Values are automatically parsed as JSON when appropriate
      • Project config is the default target for 'set' command
      • Configuration changes take effect immediately

Examples

Run these commands in your project directory.

  1. Initialize Beyond Better in your project:
    bb init
  2. Start the Beyond Better API server and open the browser interface:
    bb start
  3. Stop the Beyond Better API server:
    bb stop
  4. Start a new interactive conversation:
    bb chat
  5. Continue an existing interactive conversation:
    bb chat -i <conversation-id>
  6. Start a new conversation with single-shot statement:
    bb chat -p "Hello, I'd like to start a new project."
  7. Continue an existing conversation with single-shot statement:
    bb chat -i <conversation-id> -p "Can you explain the last change?"
    echo "Fix the test errors: `node run test`" | bb chat -i <conversation-id>
  8. View chat conversation logs in real-time with color-enabled display (useful for single-shot statements):
    bb logs -f -i <conversation-id>

Windows-Specific Usage

For detailed instructions on using Beyond Better on Windows, including how to use the provided batch files and the importance of project-specific usage, please refer to our Windows User Guide.

Remember that the init and start commands (and their corresponding batch files) are project-specific. Always ensure you're in the correct project directory when running these commands or using the batch files.

Security Documentation

For detailed security information, see:

Note: Some commands mentioned in the full documentation are currently not implemented and will be added in future updates.