@brainbase-labs/cli
v0.6.1
Published
Pack, share, and install agent templates across harnesses (Claude Code, Codex, ...).
Downloads
2,016
Readme
brainbase
Pack, share, and install agent templates across harnesses (Claude Code, Codex, Kafka).
Install
npm install -g @brainbase-labs/cliThe package installs a brainbase command on your PATH. Requires Node.js 18+.
Quick start
brainbase login # connect this device to brainbase
brainbase template pack # bundle the current agent into a template
brainbase template publish # upload to the registry
brainbase template search # find templates published by your team
brainbase template onboard <creator/slug> # install or refresh a templateRun brainbase help to see every command.
Feature support by harness
Each component type is stored in the place that harness already reads from at runtime — the CLI doesn't impose its own layout. "Native" cells describe where the install lands; "—" means the harness does not support that component type.
| Component | Claude Code | Codex | Kafka |
|---|---|---|---|
| Skill | .claude/skills/<slug>/ (folder per skill, w/ provenance marker) | ~/.codex/skills/<slug>/ (global) or .agents/skills/<slug>/ (project) | .kafka/skills/<slug>/ |
| MCP server | Project: .mcp.json. Global: ~/.claude.json → mcpServers. Never settings.json (Claude ignores it there). | Embedded in ~/.codex/config.toml as [mcp_servers.<slug>] blocks | Embedded in .kafka/kafka.json (no sidecar — the Kafka SDK reads MCPs straight from settings) |
| Command (slash command / prompt) | .claude/commands/<slug>.md | ~/.codex/prompts/<slug>.md (Codex has no documented project-scope prompts dir) | .kafka/commands/<slug>.md (the Kafka runtime calls these "playbooks" internally, but the CLI keeps the command type for cross-harness symmetry) |
| Sub-agent | .claude/agents/<slug>.md | — (Codex uses a different agent schema) | .kafka/agents/<slug>.md |
| Playbook | .claude/playbooks/<slug>.md + auto-managed table at the bottom of CLAUDE.md | .codex/playbooks/<slug>.md + auto-managed table at the bottom of AGENTS.md | .kafka/playbooks/<slug>.md + auto-managed table at the bottom of KAFKA.md |
| Instruction | Block in CLAUDE.md between <!-- brainbase:start name=<template> --> / :end markers | Same block convention in AGENTS.md | Same block convention in KAFKA.md |
| Hook | — (todo) | — | — |
| File | Arbitrary copy: single file or directory to a target path relative to cwd | Same | Same |
Playbook files carry a small YAML frontmatter (title, description) — the CLI parses it to build the table injected into each harness's instructions file. The table is bracketed by <!-- brainbase:playbooks:start --> / :end markers and regenerated on every pull, so removed playbooks drop out of the table automatically.
Project root (harness-agnostic)
- Auto-detected
ONBOARDING.mdand any extra files/folders you point--file <path>at — packed asfilecomponents and replayed at install time.
Configuration
| Variable | Purpose |
|---|---|
| BRAINBASE_REGISTRY_URL | Override the registry API host (default: https://kafka-llm-service.onrender.com) |
| BRAINBASE_API_URL | Same as above; checked second |
| BRAINBASE_TOKEN | Use a PAT instead of the stored login session |
| BRAINBASE_HOME | Where local state lives (default: ~/.brainbase) |
Auth
Two ways to authenticate, in priority order:
brainbase login— interactive Supabase OAuth, stored in~/.brainbase/auth.json. Carries full scopes.brainbase token create --scope publish— long-lived PAT (bbpat_…) for CI / unattended use.
BRAINBASE_TOKEN env var overrides both.
License
MIT — see LICENSE.
