rp-cli
Reference for rp-cli usage patterns. Consult before calling rp-cli via Bash.
When & Why to Use This Skill
This Claude skill provides a comprehensive reference for rp-cli, a proxy MCP client that enables AI agents to interact with RepoPrompt via Bash. It bridges the gap between AI reasoning and local development environments, allowing agents to manage workspace context, execute planning commands, search codebases, and manipulate files directly through shell commands for a more integrated coding experience.
Use Cases
- Automated Implementation Planning: Using the 'builder' command to generate structured architectural plans and implementation steps for complex features.
- Context-Aware Code Exploration: Executing 'tree', 'search', and 'structure' commands to help the AI agent understand codebase dependencies and file hierarchies.
- Streamlined Workspace Management: Switching between different projects, tabs, and file selections programmatically to maintain focus during multi-tasking development sessions.
- Enhanced Debugging Workflows: Retrieving chat history and specific file segments to provide the AI with the exact context needed to resolve bugs or refactor code.
| name | rp-cli |
|---|---|
| description | Reference for rp-cli usage patterns. Consult before calling rp-cli via Bash. |
rp-cli Reference
Quick reference for rp-cli commands. rp-cli is a proxy MCP client that lets AI agents access RepoPrompt's tools through shell commands.
Prerequisites
- RepoPrompt must be running on your Mac
- MCP Server must be enabled in RepoPrompt settings
- CLI installed via Settings → MCP Server → "Install CLI to PATH"
Basic Usage
rp-cli -e '<command>' # Execute single command
rp-cli -e '<cmd1> && <cmd2>' # Chain commands
rp-cli -w <id> -e '<command>' # Target specific window
Common Commands
Context Builder (Planning)
rp-cli -e 'builder "YOUR_INSTRUCTIONS" --response-type plan'
Creates implementation plan. Returns chat_id for follow-up.
Chat (Continue Conversation)
rp-cli -e 'chat "YOUR_MESSAGE" --mode plan'
rp-cli -e 'chat "YOUR_MESSAGE" --chat-id "CHAT_ID" --mode plan'
Modes: chat, plan, edit
Chat History
rp-cli -e 'chats list --limit 10'
rp-cli -e 'chats log --chat-id "CHAT_ID" --limit 10'
File Selection
rp-cli -e 'select add path/to/file.ts'
rp-cli -e 'select remove path/to/file.ts'
rp-cli -e 'select set path/to/file1.ts path/to/file2.ts'
rp-cli -e 'select clear'
rp-cli -e 'select promote path/to/codemap.ts' # Upgrade to full file
rp-cli -e 'select demote path/to/large.ts' # Downgrade to codemap
Workspace Context
rp-cli -e 'context'
rp-cli -e 'context --include prompt,selection,tokens'
File Tree
rp-cli -e 'tree'
rp-cli -e 'tree --mode auto'
rp-cli -e 'tree --folders'
Search
rp-cli -e 'search "pattern"'
rp-cli -e 'search "pattern" --extensions .ts'
Code Structure
rp-cli -e 'structure src/auth'
rp-cli -e 'map src/components'
Read Files
rp-cli -e 'read path/to/file.ts'
rp-cli -e 'read path/to/file.ts --start-line 45 --limit 100'
Workspace Management
rp-cli -e 'workspace list'
rp-cli -e 'workspace tabs'
rp-cli -e 'workspace tab "TAB_NAME"'
rp-cli -e 'workspace switch "PROJECT_NAME"'
Chaining Commands
rp-cli -e 'workspace MyProject && select set src/ && context'
Output Redirection
rp-cli -e 'context > /tmp/context.md'
Bash Execution Notes
- Use single quotes around the
-eargument - Escape single quotes in instructions: replace
'with'\'' - No sandbox required (communicates via local socket)
Parsing Chat Log
When fetching chats with chats log:
role: "user"= task context (ignore)role: "assistant"= architectural plan (parse this)- Always use the last assistant message
Troubleshooting
Connection failures: Ensure RepoPrompt is running and MCP Server is enabled
Command not found: Run rp-cli --version to verify installation
Operations need approval: Some operations require approval in RepoPrompt UI
More Information
- Help:
rp-cli --help - Command details:
rp-cli -d <command>