@rubii/boss
v1.6.0
Published
rubii-boss-cli — every BOSS MCP tool as a shell command (aws, db, mongo, elastic, redis, jira, cron, …), plus a stdio MCP server that proxies the BOSS MCP with the saved API key
Keywords
Readme
rubii-boss-cli
Every BOSS MCP tool as a shell command, plus a stdio MCP server — one tool,
two front ends, like rubii-db-mcp (rubii-mysql CLI + MCP server).
rubii-boss-cli aws <command> [args] [--options] # aws_* (+ efs_*, cron_*, ssm_clone, deploy_status, pipeline_*)
rubii-boss-cli db <command> … # sql_* (alias: sql, mysql)
rubii-boss-cli mongo <command> … # mongo_*
rubii-boss-cli elastic <command> … # es_* (alias: es)
rubii-boss-cli redis <command> … # redis_*
rubii-boss-cli pg <command> … # pg_* (alias: postgres; the LLM gateway's PostgreSQL, read only)
rubii-boss-cli jira search … / cron runs … / boss status / list tenants … # any other tool
rubii-boss-cli call <tool_name> --args '<json>' # any tool by its exact name
rubii-boss-cli mcp # stdio MCP server proxying the BOSS MCPHow it works
The CLI is an MCP client of the BOSS MCP server (https://boss.rubii.dev/api/mcp,
stateless Streamable HTTP) with your personal key (boss_pat_…). Nothing runs
locally: each command is one tools/call, so it gets exactly what the same tool
gets in Claude Code — your BOSS level, the prod data stores read-only over the
MCP, the McpWriteGuard rules, one audit row per call under your name. Commands
are derived from tools/list (cached an hour in ~/.rubii-boss-cli/tools-cache.json),
so a tool added to mcp-api is a command the moment it deploys; nothing here needs
changing. src/resolve.spec.ts checks that every tool in apps/mcp-api resolves
from its command.
- Commands: the tool name split on
_, with the group word for the prefix:aws_ecs_services→aws ecs services,sql_query→db query,es_list_indices→elastic list indices(orelastic indices). Kebab works too (aws ecs-services); the longest exact name wins, then a group's short word (redis keys→redis_scan_keys, soredis keys without ttlis stillredis_keys_without_ttl), then a unique prefix (mongo list coll). - Arguments: typed by the tool's input schema.
--tenant-id 12(kebab, snake or camel),--flag/--no-flag, repeated flags or a JSON array for arrays, JSON for objects,--<arg>-file <path>(or-for stdin) for any argument, and positional words fill the required arguments in order (redis get <key>,db query <schema> <sql>).-eis--env.--args '<json>'gives them all at once. - Extras over the MCP:
-o table|csv|tsv|jsonl|json|raw(the rows are found in the answer:rows,items,hits.hits, …; SQL keeps its column order),--save <file>(format from the extension),--dry-run, relative times for the CloudWatch Logs arguments (--start 2h,--end now), and the SQL/Mongotargetderived from--tenant-id(elseshare; in env dev it is left to the server, below). - Env dev without
--tenant-id(db,mongo,elastic; 1.4.0 and later): the tenant comes from the schema, database or index when it names one (--schema rubii_40is tenant 40), else it is your own dev tenant if you have the Developer role in BOSS, or the default dev tenant (2) for everyone else. The answer'stenantIdandtenantNotesay which (shown above a table). An explicit--tenant-idalways wins; prod and test still need one. Older CLIs sendtarget sharefor-e devwithout--tenant-id: add--target tenant.
Install
npm install -g @rubii/boss # public npm, Node 20+; update with: npm install -g @rubii/boss@latest
rubii-boss-cli login # or the short name: boss loginThe package installs two commands, boss and rubii-boss-cli; they are the same program (every example below works with either).
From a BOSS checkout instead:
npm ci # at the repo root
npm run install-cli --workspace @rubii/boss # build + copy dist/rubii-boss-cli to ~/bin
rubii-boss-cli login # prompts for the key, never echoeddist/rubii-boss-cli is a single-file bundle (esbuild) that needs Node 20+ and
nothing else, so it can be copied to any machine.
Login and config
login prompts for the key (hidden; or reads it from stdin: echo "$KEY" | rubii-boss-cli login),
checks it with tools/list (skip with --no-verify) and saves it to
~/.rubii-boss-cli/config.json (0600, dir 0700). whoami [--check], logout.
| Variable | Use |
|---|---|
| RUBII_BOSS_API_KEY | key, wins over the saved one (CI, scripts) |
| RUBII_BOSS_URL / --url | endpoint; default https://boss.rubii.dev/api/mcp, on the BOSS box http://127.0.0.1:4180/api/mcp |
| RUBII_BOSS_CLI_HOME | config dir (default ~/.rubii-boss-cli) |
| RUBII_BOSS_FILE_ROOT | a folder the command keeps its files in: --<arg>-file, --args-file and --save take only paths inside it and none on a hidden path (.mcp.json, .claude/), stdin (-) and --url are refused. BOSS sets it for agent turns whose only shell is this command; unset, nothing changes |
Off the box the request passes Cloudflare Access only with WARP on and signed in to Rubii; otherwise Access redirects and the CLI says so.
Bitbucket and git
boss bitbucket pr diff|comments|open|update|comment|approve|decline|merge, boss bitbucket file and boss bitbucket api get|write are the Bitbucket tools (they replace the bb-api command; run boss tools bitbucket for the arguments). Writes are signed as you with your own Bitbucket connection (Settings → Connections), a merge and every read with BOSS's.
For git on your own machine: boss bitbucket git-setup once, then plain git clone / git push on https://bitbucket.org/... use your own two-hour Bitbucket token, fetched by boss bitbucket git-credential (git runs it; it is not for you to run). The token goes to git's stdin only: it is not a tool a model can call, nothing else prints it, and between calls it sits in ~/.rubii-boss-cli/bitbucket-git-credential.json (0600).
MCP mode
claude mcp add --scope user boss -- rubii-boss-cli mcpOffers exactly the tools (descriptions, schemas, annotations and the server's instructions) the BOSS MCP offers your key and forwards every call. Use it for MCP clients that cannot send a header to a remote server, or to keep the key in one place instead of each client's config.
Waiting: boss wait (1.6.0 and later)
Wait for BOSS events from your own machine and exit when they happen, so Claude Code running it as a
background command is woken by its exit (docs/event-hub-plan.md, "CLI waits"):
boss wait for --channel cron-ttd-11 \
--conditions '[{"kind":"pr.merged","params":{"ws":"rubii20","repo":"cron-ttd","pr":11}}]'
boss wait listen cron-ttd-11 # listen again (an outcome nobody received arrives at once)
boss wait status # open waits and outcomes not received yet, every channel
boss wait cancel cron-ttd-11wait forsets the wait on a channel of your key (defaultdefault; a new wait replaces the channel's open one) through the BOSS MCP's CLI wait tools, then listens on BOSS's WebSocket (/api/mcp/events, your key in theAuthorizationheader) and prints BOSS's wake message when the wait resolves. Conditions,--wake,--timeout-hours(24, at most 168) and--notearewait_for's;--no-listenonly sets it.- It listens for
--max-minutes(110: under the 2 hours a Claude Code background command may run), then exits 3: runboss wait listen <channel>. BOSS keeps an outcome for 7 days until a CLI receives it. - Exit codes:
0resolved (the text says met, FAILED or timed out) ·3still waiting ·4another listener took the channel ·1failure ·2usage. - Personal keys only. With an agent's key (a BOSS workbench turn)
wait for|status|cancelare the session's own wait tools, and BOSS resumes the session itself.
Exit codes
0 ok · 1 the tool or the connection failed (message on stderr) · 2 usage error.
Develop
npm run build --workspace @rubii/boss # tsc (types) + esbuild bundle
npm test --workspace @rubii/boss
node packages/boss-cli/dist/rubii-boss-cli --helpReleasing
The version in package.json is the version of the CLI, of its tools cache (a new
version never reads an older version's cache) and of the npm package. src/version.ts
is generated from it by npm run build. Bump it in the pull request that changes the
CLI: when the PR merges, BOSS's deployer builds and publishes @rubii/boss if that
version is not on npm yet, and announces it in Slack. No version bump, no release.
