@2kw/ai
v5.0.0
Published
CLI for the 2kw.ai platform (engineering name: Backbone)
Readme
Backbone CLI
A command-line interface for the Backbone AI platform. Manage schemas, prompts, extractions, documents, and more — straight from your terminal.
Installation
# Latest stable release
npm install -g @manfred-kunze-dev/backbone-cli
# Pre-release (dev channel)
npm install -g @manfred-kunze-dev/backbone-cli@devThe CLI will notify you when a newer version is available.
Quick Start
# Authenticate
backbone auth login
# Define a schema and run an extraction
backbone schemas create -n "Invoice"
backbone extractions create --schema <id> -m gpt-4o --text "Invoice #123, Total: $500"The CLI is also available as bb for quick access — e.g. bb schemas list.
Authentication
The CLI supports multiple authentication methods (highest priority first):
| Method | Example |
|--------|---------|
| CLI flags | --api-key sk_... --base-url https://... |
| Environment variables | BACKBONE_API_KEY, BACKBONE_BASE_URL |
| Local .backbone file | JSON file in the current directory |
| Config store | ~/.config/backbone/config.json (set via backbone auth login) |
backbone auth login # Interactive setup
backbone auth status # Verify credentials
backbone auth logout # Clear stored credentialsContexts
The CLI supports kubectl-style contexts for switching between organizations and environments:
# Contexts are created automatically via `backbone auth login`
backbone context list # List all contexts
backbone context use acme-corp # Switch active context
backbone context create staging # Create a new context
backbone context rename old new # Rename a context
backbone context delete old # Remove a contextCommands
| Command | Description |
|---------|-------------|
| auth | Login, logout, and check auth status |
| config | Get, set, and list configuration values |
| context | Manage CLI contexts for multiple environments |
| schemas | Manage schemas, versions, labels, validation, and testing |
| prompts | Manage prompts, versions, labels, compilation, and testing |
| extractions | Create extractions (text, file, images), list, re-run, estimate tokens |
| convert | Convert documents (PDF, DOCX, images) to Markdown/text/HTML/JSON |
| ai | Chat completions and model listing via the LLM Gateway |
| transcribe | Transcribe audio files (mp3, wav, flac, ogg, etc.) |
| providers | Manage BYOK AI providers |
| analytics | View organization usage analytics |
| billing | Check subscription tier and usage limits |
| docs | Browse API documentation from the terminal |
Global Options
| Flag | Description |
|------|-------------|
| --api-key <key> | Override the API key |
| --base-url <url> | Override the base URL (default: https://backbone.manfred-kunze.dev/api) |
| --json | Output raw JSON instead of formatted tables |
| --no-color | Disable colored output |
For full command documentation, see the Backbone docs.
License
Proprietary — see LICENSE for details.
