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 devOr with options:
pnpm --filter @motebit/cli dev -- \
--provider anthropic \
--model claude-sonnet-4-5-20250514 \
--operatorCLI flags
| Flag | Description |
|---|---|
--provider <name> | ollama or anthropic |
--model <name> | Model identifier |
--db-path <path> | Custom SQLite database path |
--no-stream | Disable streaming (wait for full response) |
--sync-url <url> | Sync relay server URL |
--sync-token <token> | Sync relay master token |
--operator | Start with operator mode enabled |
--allowed-paths <paths> | Comma-separated paths for file tools |
--version | Print version |
--help | Print help |
Slash commands
| Command | Action |
|---|---|
/help | Show available commands |
/model <name> | Switch model |
/memories | List stored memories |
/state | Show current state vector |
/forget <nodeId> | Delete a memory by ID |
/export | Export all data (memories, events, identity) |
/clear | Clear conversation history |
/tools | List registered tools |
/sync | Trigger manual sync cycle |
/summarize | Summarize current conversation |
/conversations | List recent conversations |
/conversation <id> | Load a past conversation |
/goals | List 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 |
/approvals | Show pending approval queue |
/reflect | Trigger reflection -- see what the agent learned |
/mcp list | List 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) |
/operator | Toggle operator mode |
quit / exit | Exit 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:
- First launch generates an Ed25519 keypair
- Private key is encrypted with PBKDF2 (AES-256-GCM) and stored in
~/.motebit/config.json - Identity and device are registered in the local SQLite database
- Optional: register with a sync relay using
--sync-urland--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:
| Subcommand | Description |
|---|---|
motebit verify <path> | Verify a signed motebit.md identity file |
motebit export | Export all data (memories, events, identity) |
motebit run --identity <path> | Start daemon mode with goal scheduling |
motebit serve | Start MCP server mode (see MCP Server) |
motebit doctor | Diagnose configuration and connectivity issues |
motebit goal add/list/remove/pause/resume | Manage scheduled goals |
motebit approvals list/show/approve/deny | Manage the tool approval queue |