rp-explorer

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

RP-Explorer

RP-Explorer

Token-efficient codebase exploration using RepoPrompt CLI.
使用RepoPrompt CLI实现Token高效的代码库探索。

Trigger Phrases

触发短语

Activates when user combines "use rp" or "use repoprompt" with an action:
  • "use rp to explore how auth works"
  • "use repoprompt to find similar patterns"
  • "use rp to understand the data flow"
  • "use repoprompt to search for API endpoints"
当用户将"use rp"或"use repoprompt"与操作结合时激活:
  • "use rp to explore how auth works"
  • "use repoprompt to find similar patterns"
  • "use rp to understand the data flow"
  • "use repoprompt to search for API endpoints"

CLI Reference

CLI参考文档

Read cli-reference.md for complete command documentation.
阅读cli-reference.md获取完整的命令文档。

Quick Start

快速开始

Step 1: Get Overview

步骤1:获取概览

bash
rp-cli -e 'tree'
rp-cli -e 'structure .'
bash
rp-cli -e 'tree'
rp-cli -e 'structure .'

Step 2: Find Relevant Files

步骤2:查找相关文件

bash
rp-cli -e 'search "auth" --context-lines 2'
rp-cli -e 'builder "understand authentication"'
bash
rp-cli -e 'search "auth" --context-lines 2'
rp-cli -e 'builder "understand authentication"'

Step 3: Deep Dive

步骤3:深入探索

bash
rp-cli -e 'select set src/auth/'
rp-cli -e 'structure --scope selected'
rp-cli -e 'read src/auth/login.ts'
bash
rp-cli -e 'select set src/auth/'
rp-cli -e 'structure --scope selected'
rp-cli -e 'read src/auth/login.ts'

Step 4: Export Context

步骤4:导出上下文

bash
rp-cli -e 'context --all > codebase-map.md'
bash
rp-cli -e 'context --all > codebase-map.md'

Token Efficiency

Token高效性

  • Use
    structure
    instead of reading full files (10x fewer tokens)
  • Use
    builder
    for AI-powered file discovery
  • Select only relevant files before exporting context
  • 使用
    structure
    替代读取完整文件(Token用量减少10倍)
  • 使用
    builder
    进行AI驱动的文件发现
  • 在导出上下文前仅选择相关文件

Tab Isolation

标签页隔离

builder
creates an isolated compose tab automatically. Use
-t
to target it:
bash
undefined
builder
会自动创建一个独立的组合标签页。使用
-t
指定目标标签页:
bash
undefined

Builder returns: Tab: <UUID><Name>

Builder返回: Tab: <UUID><Name>

rp-cli -w W -t "<Name>" -e 'select add extra.ts && context'
rp-cli -w W -t "<Name>" -e 'select add extra.ts && context'

Or chain commands:

或链式执行命令:

rp-cli -w W -e 'builder "find auth" && select add extra.ts && context'
undefined
rp-cli -w W -e 'builder "find auth" && select add extra.ts && context'
undefined

Requirements

要求

RepoPrompt v1.5.62+ with rp-cli installed.
需要安装RepoPrompt v1.5.62+及rp-cli。