Skip to content

Add CLI interface (rr) alongside MCP server #3

@martinarva

Description

@martinarva

Context

From DoltHub Discord feedback (2026-04-03): Tim Sehn noted that Beads (popular Dolt-based agent memory tool) found agents prefer CLI over MCP. Recommendation: expose the same operations as a CLI tool.

Assessment

Context differs from Beads — Right Reasons is agent-to-agent where MCP is the native protocol. CLI would primarily serve developer debugging and manual operations, not agents. Current workarounds exist (query_sql MCP tool, dolt sql built-in CLI).

Decision: implement after O12 (EPICAL E2E pipeline)

Not a blocker for anything. Build when the core pipeline is stable.

Proposed scope

  • Python CLI using click, reusing existing Config/DoltDB classes
  • Same pyproject.toml package, separate entry point: rr = "rr_cli.cli:main"
  • ~200 lines of code
  • Plain text output by default, --json flag for machine-readable output

Proposed commands (1:1 mapping to MCP tools)

rr list-objects [--layer] [--type] [--search]
rr get-object <id>
rr list-relations [--from <id>] [--to <id>] [--type <type>]
rr traverse <id> [--direction up|down] [--depth <n>]
rr explain <id>
rr schema
rr query "<sql>"

rr session create [--source <text>]
rr propose-object <session_id> ...
rr propose-relation <session_id> ...
rr promote <candidate_id>

rr ops-contract generate <external_ref> <description> [--kind <kind>]
rr ops-contract get <id>
rr ops-contract list [--status <status>]

rr status
rr diff [<from_commit> <to_commit>]
rr commit -m "<message>"

Files to create

  • mcp-server/rr_cli/cli.py
  • mcp-server/rr_cli/__init__.py

Files to change

  • mcp-server/pyproject.toml (add CLI entry point + click dependency)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions