The Brightsy Command Line Interface (CLI) is a comprehensive tool for interacting with Brightsy AI, managing content, building component libraries, and integrating with development workflows. It features OAuth 2.1 authentication with automatic token refresh and supports the full Brightsy platform API.
Installation
Install the Brightsy CLI globally using npm:
npm install -g @brightsy/cli
Or run it directly with npx:
npx @brightsy/cli
Authentication
The CLI uses OAuth 2.1 with PKCE (Proof Key for Code Exchange) for secure authentication. No manual API keys required.
Login
brightsy login
This opens your browser for authentication and stores tokens locally. The CLI automatically refreshes tokens when they expire.
Account Information
brightsy whoami
Shows your current account and authentication status.
Logout
brightsy logout
Clears stored authentication tokens.
Chat & AI Interaction
Interactive Chat
Start an interactive chat session with AI agents or models:
brightsy chat
The CLI will prompt you to choose between:
- Agent Chat: Use configured agents with tools and memory
- Direct Model: Chat directly with AI models for simple completions
Direct Chat Commands
# Chat with a message brightsy chat "Help me debug this React component" # Chat with a specific agent brightsy chat --agent <agent-id> "Analyze this code" # Direct model completion brightsy chat --model claude_sonnet_4_5 "Explain this algorithm" # Start a new conversation brightsy chat --new "Fresh conversation topic"
List Available Resources
# List your configured agents brightsy agents # List available AI models for direct completion brightsy models
Content Management (CMS)
Records Management
# List records of a type
brightsy records list blog-post --limit 10 --status published
# Get a specific record
brightsy records get blog-post abc123
# Create a new record
brightsy records create blog-post --data '{"title":"New Post","content":"Content here"}'
# Update a record
brightsy records update blog-post abc123 --data '{"title":"Updated Title"}'
# Delete a record
brightsy records delete blog-post abc123
Record Types (Schemas)
# List all record types
brightsy record-types list --search blog
# Get record type schema
brightsy record-types get blog-post
# Create new record type
brightsy record-types create "Product" --slug product --schema '{"type":"object","properties":{"name":{"type":"string"}}}'
# Update record type
brightsy record-types update product --name "Updated Product"
# Delete record type (with confirmation)
brightsy record-types delete product --confirm