Motebit

CLI

The developer REPL — slash commands, streaming, and debugging.

The CLI is a developer debugging interface. Same runtime as the desktop app, different surface — a Node.js REPL with streaming output, tool approval prompts, and direct access to the motebit's internals.

Running the CLI

pnpm --filter @motebit/cli dev

Or with options:

pnpm --filter @motebit/cli dev -- \
  --provider anthropic \
  --model claude-sonnet-4-5-20250514 \
  --operator

CLI flags

FlagDescription
--provider <name>ollama or anthropic
--model <name>Model identifier
--db-path <path>Custom SQLite database path
--no-streamDisable streaming (wait for full response)
--sync-url <url>Sync relay server URL
--sync-token <token>Sync relay master token
--operatorStart with operator mode enabled
--allowed-paths <paths>Comma-separated paths for file tools
--versionPrint version
--helpPrint help

Slash commands

CommandAction
/helpShow available commands
/model <name>Switch model
/memoriesList stored memories
/stateShow current state vector
/forget <nodeId>Delete a memory by ID
/exportExport all data (memories, events, identity)
/clearClear conversation history
/toolsList registered tools
/syncTrigger manual sync cycle
/summarizeSummarize current conversation
/conversationsList recent conversations
/conversation <id>Load a past conversation
/goalsList all scheduled goals
/goal add "<prompt>" --every <interval> [--once]Add a scheduled goal
/goal remove <id>Remove a goal
/goal pause <id>Pause a goal
/goal resume <id>Resume a paused goal
/goal outcomes <id>Show execution history for a goal
/approvalsShow pending approval queue
/reflectTrigger reflection -- see what the agent learned
/mcp listList connected MCP servers
/mcp trust <name>Trust an MCP server (skip approval for its tools)
/mcp untrust <name>Remove trust from an MCP server
/mcp add <name> <url> [--motebit]Add an HTTP MCP server (live, no restart)
/mcp remove <name>Remove an MCP server (live, no restart)
/discover [capability]Discover agents on the relay (optional capability filter)
/operatorToggle operator mode
quit / exitExit the CLI

Tool approval flow

When the agent requests a tool that requires approval, the CLI pauses and prompts:

Tool approval required: shellExec
  args: {"command": "ls -la"}
Allow? (Y/n):

Type Y to approve, n to deny. The agent continues with the result (or denial) and completes the turn.

Identity bootstrap

The CLI uses the same identity system as the desktop app:

  1. First launch generates an Ed25519 keypair
  2. Private key is encrypted with PBKDF2 (AES-256-GCM) and stored in ~/.motebit/config.json
  3. Identity and device are registered in the local SQLite database
  4. Optional: register with a sync relay using --sync-url and --sync-token

Streaming output

By default, the CLI streams responses token-by-token. Tool calls appear inline:

> What files are in my home directory?
[calling readFile...]
[readFile done]
Your home directory contains the following files: ...

Use --no-stream to wait for the complete response before printing.

Subcommands

The CLI supports several subcommands beyond the default interactive REPL:

SubcommandDescription
motebit verify <path>Verify a signed motebit.md identity file
motebit exportExport all data (memories, events, identity)
motebit run --identity <path>Start daemon mode with goal scheduling
motebit serveStart MCP server mode (see MCP Server)
motebit doctorDiagnose configuration and connectivity issues
motebit goal add/list/remove/pause/resumeManage scheduled goals
motebit approvals list/show/approve/denyManage the tool approval queue