User guide Command-line interface (CLI)

Command-line interface (CLI)

Use ramulbot from the terminal to connect to a local or paired Host, send tasks with files, wait for completion, download artifacts, and manage your Library.

On this page

Set up the ramulbot command

Each ramulbot invocation runs independently without keeping an interactive session open, while sharing the selected Bot's conversation and artifacts with desktop and mobile.

Use the CLI bundled in the macOS desktop app

If you packaged the macOS app from your workspace and placed it in /Applications/Ramulbot.app, it already includes the ramulbot CLI and matching Node runtime. Add its bin directory to your shell profile and open a new shell:

export PATH="/Applications/Ramulbot.app/Contents/Resources/bin:$PATH"
ramulbot --version

Build a standalone package from the workspace (macOS / Linux)

In a provisioned workspace with Node 24 (>=24.21.0 <25), build the CLI tarball and install it into a user-writable npm prefix whose bin directory is on your PATH:

pnpm --filter @ramulbot/cli build
CLI_TARBALL=$(npm pack ./apps/cli/dist)
npm install --global "./$CLI_TARBALL"
ramulbot --version
ramulbot --help

By default, the CLI stores pairing credentials in the macOS Keychain or Linux Secret Service. On headless Linux systems, pass --credential-store private-file to store credentials explicitly in an owner-only directory.

Connect to a local or remote Host

Local Host

Start Ramulbot Desktop or your registered local Host service, then connect with the local owner identity:

ramulbot host list
ramulbot host status --host local
ramulbot --host local bot list

Pair with a remote Host

To give a standalone CLI device access to selected Bots on another Host, first create an invitation from Settings › Devices on that Host:

  • Direct HTTPS invitation: Enter the trusted address shown on the Host and type the six-digit code at the hidden prompt:
ramulbot host pair --as office --origin https://my-host.example
ramulbot host use office
ramulbot host status
  • Full invitation link (including Relay): Pass the invitation via stdin, inspect the preview's Host and granted Bots, and confirm the returned attempt ID:
ramulbot host pair --as office --invite-stdin --json < invitation.txt
# Set ATTEMPT to the attemptId from the preview after checking the Host and Bots.
ramulbot host pair --confirm "$ATTEMPT" --json
ramulbot --host office bot list --json

A limited invitation exposes only the Bots granted in that invitation; a paired CLI does not automatically see every Bot on the Host.

Set RAMULBOT_HOME (default ~/.ramulbot) to select the local product home, or RAMULBOT_CLI_HOME (default $RAMULBOT_HOME/cli) to select the CLI's state directory. Pass --host on any command to override the default Host for that call.

Choose a runtime and create a Bot

With the local owner identity, inspect available runtimes and models, create a Bot, and configure its defaults. Add --timeout 2m if a runtime probe takes longer to respond:

ramulbot --host local runtime list
# Set RUNTIME to the ID of the runtime you want to use.
ramulbot --host local runtime models "$RUNTIME"
# Set MODEL to a model ID supported by that runtime.
BOT=$(ramulbot --host local bot create --name Reviewer --runtime "$RUNTIME" --model "$MODEL" --json | jq -er '.result.bot.id')

Override the model on an individual message or update a Bot's saved defaults (--provider is an alias for --runtime, and --thinking-level sets reasoning depth when supported):

ramulbot --host local message send --bot "$BOT" --text 'Review the attached notes' --attach notes.md
ramulbot --host local message send --bot "$BOT" --model "$OTHER_MODEL" --text 'Summarize the findings'
ramulbot --host local bot update "$BOT" --runtime "$OTHER_RUNTIME" --model "$OTHER_MODEL"
ramulbot --host local bot update "$BOT" --clear-model --clear-thinking-level

Submit a task, follow up, and download artifacts

The example below sends a file-backed task, waits for completion, sends a follow-up reply, and downloads a published artifact (jq is used only to extract IDs from JSON output):

TASK=$(ramulbot --host local message send --bot "$BOT" --text 'Summarize the meeting' \
  --attach minutes.md --json | jq -er '.result.receipt.taskId')
ramulbot --host local task wait "$TASK" --bot "$BOT" --timeout 5m --json
ramulbot --host local message send --bot "$BOT" --text 'Assign all follow-ups to Lin'
ramulbot --host local artifact list --bot "$BOT"
# Set ARTIFACT to the ID of the file you want to save.
ramulbot --host local artifact download "$ARTIFACT" --output minutes-result.md

Cancellation, follow-ups, and request recovery

  • Press Ctrl-C to end the local wait. Run ramulbot --host local task stop "$TASK" to request cancellation on the Host.
  • Answering clarifications: When a task pauses for clarification, send a regular message to the same Bot to answer it.
  • Recovering after a lost response: If a send command is interrupted before returning a receipt, run ramulbot request list and ramulbot request show ID under the same CLI profile before deciding whether to replay with ramulbot request retry ID.

Manage a Host Library

With the local owner identity, create, apply, edit, and roll back Library instructions, Skills, profiles, and MCP entries from the command line:

printf '%s\n' '{"kind":"instruction","name":"Review","body":"Include a concise summary and open questions."}' > review.json
ITEM=$(ramulbot --host local library create --file review.json --json | jq -er '.result.item.id')
ramulbot --host local library apply "$ITEM" --bot "$BOT"
ramulbot --host local library bindings --bot "$BOT"

Always pass the current revision via --expected-revision when editing so stale updates are rejected, and use revisions or rollback whenever you need an earlier version:

ramulbot --host local library show "$ITEM" --json > current.json
REV=$(jq -er '.result.item.revision' current.json)
jq '.result.definition | .body = "Include a summary, open questions, and next steps."' current.json |
  ramulbot --host local library edit "$ITEM" --expected-revision "$REV" --stdin
ramulbot --host local library revisions "$ITEM"
ramulbot --host local library rollback "$ITEM" --revision "$REV"
ramulbot --host local library unbind "$ITEM" --bot "$BOT"