@fbelloncle/rainbow-cli-ng
v1.0.9
Published
Rainbow CPaaS command line interface — test build (private)
Readme
Rainbow CLI NG
rainbow-cli-ng is a command-line tool for interacting with the Rainbow CPaaS REST API.
It supports multiple authentication methods (API key, user credentials, OAuth), profile-based connection management with OS keyring secret storage, and a REPL shell mode for scripting and automation.
Features
- Multi-profile — switch between sandbox, staging, and production environments; run any command under a specific profile with
--profile <name>without changing your active configuration - Three auth methods —
API_KEY,RAINBOW(user/password),OAUTH(browser authorization code flow with automatic token refresh) - Shell mode — REPL with variables, foreach loops, conditionals, scripting (
.rbwfiles), and OS shell passthrough - Mass provisioning — bulk user, device, and directory management via CSV import/export
- MCP server — expose Rainbow CPaaS to any MCP-compatible client (Claude Desktop, Claude Code…)
Requirements
- Node.js 20.12+
Installation
npm install -g rainbow-cli-ngQuick start
# 1. Create a connection profile
rbw config create-profile
# 2. Verify the connection
rbw whoami
# 3. Start the interactive shell
rbwCommand overview
rbw config Profile and credential management
rbw whoami Current user information
rbw user User management
rbw company Company management
rbw application Application lifecycle management
rbw masspro Bulk provisioning (users, devices, directories)
rbw guides Developer guides browserRun rbw <command> --help for details on any command.
Shell mode
Running rbw without arguments starts an interactive REPL:
rbw[profile] › whoami
rbw[profile] › $me = whoami
rbw[profile] › company get $me.data.companyId
rbw[profile] › foreach $companies.data as c: company get $c.id
rbw[profile] › run my-script.rbwSee the JS Scripting Guide for full scripting documentation.
MCP server
# Start the MCP server (stdio transport)
rainbow-mcpAdd to your MCP client configuration (e.g. Claude Desktop claude_desktop_config.json):
{
"mcpServers": {
"rainbow": {
"command": "rainbow-mcp"
}
}
}Authentication methods
API key
rbw config create-profile
# Choose API_KEY, enter your application ID, application secret, and API keyRainbow credentials (user/password)
rbw config create-profile
# Choose RAINBOW, enter your login email, password, application ID, and application secretOAuth (browser flow)
rbw config create-profile
# Choose OAUTH, enter your application ID and application secret
# A browser window opens for authorizationMultiple profiles
# Create additional profiles
rbw config create-profile # creates "default" or a named profile
# Switch profiles
rbw config set-profile production
# Run a single command under a different profile
rbw --profile sandbox whoamiTheme (terminal background)
# Force light or dark theme (banner and prompt colors)
rbw config set-theme light # or: dark, autoauto (default) detects the terminal background via the COLORFGBG environment variable.
