开源代码生成 是 AI Skill Hub 本期精选AI工具之一。综合评分 8.0 分,整体质量较高。我们强烈推荐将其纳入你的 AI 工具库,帮助提升工作效率。
开源代码生成 是一款基于 TypeScript 开发的开源工具,专注于 AI、代码生成、TypeScript 等核心功能。作为 GitHub 开源项目,它拥有活跃的社区支持和持续的版本迭代,代码完全透明可审计,支持本地部署以保护数据隐私。无论是个人使用还是集成到企业工作流,都能提供稳定可靠的解决方案。
开源代码生成 是一款基于 TypeScript 开发的开源工具,专注于 AI、代码生成、TypeScript 等核心功能。作为 GitHub 开源项目,它拥有活跃的社区支持和持续的版本迭代,代码完全透明可审计,支持本地部署以保护数据隐私。无论是个人使用还是集成到企业工作流,都能提供稳定可靠的解决方案。
# 方式一:npm 全局安装 npm install -g opencoderag # 方式二:npx 直接运行(无需安装) npx opencoderag --help # 方式三:项目依赖安装 npm install opencoderag # 方式四:从源码运行 git clone https://github.com/MrDoe/OpenCodeRAG cd OpenCodeRAG npm install npm start
# 命令行使用
opencoderag --help
# 基本用法
opencoderag [options] <input>
# Node.js 代码中使用
const opencoderag = require('opencoderag');
const result = await opencoderag.run(options);
console.log(result);
# opencoderag 配置说明 # 查看配置选项 opencoderag --config-example > config.yml # 常见配置项 # output_dir: ./output # log_level: info # workers: 4 # 环境变量(覆盖配置文件) export OPENCODERAG_CONFIG="/path/to/config.yml"
OpenCodeRAG is a local-first RAG plugin for semantic code search. It converts your codebase into vector indices and retrieves relevant code chunks on natural language queries. The primary aim is to save tokens by replacing full-file reads with targeted chunk retrieval and to speed-up tool calls for large codebases. Integrates seamlessly with OpenCode and works standalone via CLI.
You don't need a dedicated GPU to run embedding LLMs, smaller models can still run performant on modern CPUs.
⚠️ Note: Don't confuse this with the npm package opencode-rag (a discontinued project by a different author).
| Feature | Description |
|---|---|
| **AST chunking** | 17 languages via tree-sitter (TS, JS, Python, Java, Go, Rust, C/C++, C#, Ruby, Kotlin, Swift, JSON, HTML, CSS, XML) |
| **Document support** | Markdown, LaTeX, PDF, DOCX, DOC, Excel |
| **Hybrid search** | Vector similarity + TF×IDF keyword fusion |
| **OpenCode plugin** | Auto-inject context, read-tool override, TUI settings |
| **Incremental indexing** | File-hash manifest, background watcher, auto-rebuild on corruption |
| **Privacy-first** | All processing stays local with Ollama |
| **CLI** | index, query, status, list, show, dump, clear, init |
| **Proxy-aware** | Corporate proxy support with raw-socket localhost bypass |
| **OpenAI / Cohere** | Alternate embedding providers with API key auto-resolution |
git clone https://github.com/your-org/OpenCodeRAG.git cd OpenCodeRAG npm install --legacy-peer-deps npm run build ./install.sh # global install (optional)
```bash
When using OpenCode, the plugin enhances your agent with three discovery mechanisms:
高质量的开源AI工具,代码生成能力强
AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。
建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。
✅ MIT 协议 — 最宽松的开源协议之一,可自由商用、修改、分发,仅需保留版权声明。
经综合评估,开源代码生成 在AI工具赛道中表现稳健,质量优秀。如果你已有明确的使用需求,可以直接上手体验;如果还在评估阶段,建议对比同类工具后再做决策。
| 原始名称 | OpenCodeRAG |
| 原始描述 | 开源AI工具:OpenCodeRAG is a RAG (Retrieval-Augmented Generation) plugin for semantic code s。⭐14 · TypeScript |
| Topics | AI代码生成TypeScript |
| GitHub | https://github.com/MrDoe/OpenCodeRAG |
| License | MIT |
| 语言 | TypeScript |
收录时间:2026-06-14 · 更新时间:2026-06-14 · License:MIT · AI Skill Hub 不对第三方内容的准确性作法律背书。