Show HN:0.6 秒内将文件夹复制到 ChatGPT – OpenRepoPrompt
Show HN: Copy Folder to ChatGPT in 0.6s – OpenRepoPrompt

原始链接: https://github.com/wildberry-source/open-repoprompt

Open Repoprompt 简化了在基于 Web 的大型语言模型(如 Claude、GPT-4 或 Grok)中使用本地代码的方法,即使没有直接的 API 访问权限也能轻松实现。它可以快速将整个项目或选定的文件/文件夹序列化成 XML 格式,方便粘贴到大型语言模型中。 该工具允许您选择目录、过滤文件、添加指令(例如,“分析代码并提出改进建议”),然后生成一个代表您的代码和指令的 XML 提示。这个 XML 提示可以复制并粘贴到任何接受 XML 的大型语言模型中。 Open Repoprompt 支持代码审查、文档生成、重构、错误查找和理解新代码库等任务。您可以下载适用于 Windows、macOS(Intel 和 Apple 硅芯片)和 Linux 的预构建可执行文件,也可以从源代码构建。

CompetitivePen 创建了 OpenRepoPrompt,这是一个开源的、MIT 许可的工具,可以轻松地与大型语言模型 (LLM) 共享代码,且避免厂商锁定。由于导出数据和处理缺乏 API 访问权限的模型(例如 o1 PRO 或 Grok 3)的困难,他们在周末构建了它,将文件和文件夹序列化为 XML 格式供 LLM 使用。该工具旨在简化向 ChatGPT 等模型提供代码的过程,声称复制文件夹的速度为 0.6 秒。虽然文件过滤等功能仍在开发中,但创建者认为它已达到最小可行产品 (MVP) 的标准,并寻求用户反馈。OpenRepoPrompt 可在 GitHub 上获取:github.com/wildberry-source/open-repoprompt。在评论中,siva7 警告用户,ChatGPT 和 Claude 可能会在后台使用 RAG(检索增强生成)技术(未公开),以便在使用项目功能或附加组件集成时节省计算资源,即使代码适合提示上下文窗口,也可能导致响应质量降低。

原文


OpenPrompt Interface

o1 PRO , GROK 3 thinking are one of the best model available right now, but there is no api access available. This Tool Simplifies the process of copying files and folders into web LLMs.

Fastest Serialization of files and folders into XML format.

Download Executable (Recommended)

  1. Go to the Releases page
  2. Download the appropriate version for your operating system:
    • Windows: openprompt-windows-amd64.exe
    • macOS: openprompt-macos-amd64
    • macOS arm: openprompt-macos-arm64
    • Linux: openprompt-linux-amd64
# Clone the repository
git clone https://github.com/wildberry-source/open-repoprompt.git

# Navigate to the project directory
cd open-repoprompt

# Build the application
go build -o openprompt ./cmd
  1. Select Directory: Choose a directory containing your code
  2. Set Filters: Specify which files to include/exclude
  3. Select Files: Check the boxes next to files you want
  4. Add Instructions: Tell the LLM what you need
  5. Generate & Copy: Create your XML prompt and copy to clipboard
  6. Paste into LLM: Use with Claude, GPT-4, Grok, or any LLM that accepts XML
  • Code Reviews: Feed your entire codebase for comprehensive reviews
  • Documentation Generation: Create docs for your project based on source code
  • Refactoring Help: Get suggestions for improving complex code
  • Bug Hunting: Let LLMs analyze your code to find potential issues
  • Learning New Codebases: Quickly understand unfamiliar projects
  • Architecture Analysis: Get insights on your project structure
<prompt>
  <files>
    <file path="project/main.go" type="go">package main

func main() {
    println("Hello")
}
</file>
    <file path="project/utils/helper.go" type="go">...</file>
  </files>
  <instructions>Analyze the code and suggest improvements.</instructions>
</prompt>

Popularity

MIT

联系我们 contact @ memedata.com