Hybrid RAG search for Godot documentation
Project description
Godot RAG
Hybrid RAG search for Godot documentation and addons. Search by type for precise results.
Installation
uv pip install godot-rag
Or from wheel:
uv pip install godot_rag-4.7.0-py3-none-any.whl
Usage
Language note: Queries must be in English. For non-English queries, translate to English first (e.g., "怎么做二段跳" → "how to double jump"). The embedding model is English-only.
Search by type
All search commands have long aliases: search, search-class, search-tutorial, search-engine, search-addon.
Default behavior: s, s-class, s-tutorial, s-engine exclude addon results. Use s-addon to search addons.
# Search class reference (API docs only)
godot-rag s-class "Node.add_child"
godot-rag s-class "Signal.emit" --limit 3
# class.method queries work — finds the class
godot-rag s-class "ResourceLoader.load"
# Tutorials + getting started guides
godot-rag s-tutorial "how to use signals"
# Engine details (architecture, file formats, GDExtension, etc.)
godot-rag s-engine "GDExtension"
# Addon docs and examples (must use s-addon)
godot-rag s-addon "state machine"
godot-rag s-addon "state machine" --addon statecharts
# Search all docs (no type filter, excludes addons)
godot-rag s "Timer"
# Fuzzy symbol matching (camelCase/snake_case/dotted all work)
godot-rag s-class "addChild" # matches add_child, _add_child
godot-rag s-class "Node.add_child" # matches Node._add_child
# Disable graph expansion (only return direct matches)
godot-rag s-class "add_child" --no-expand
Search addons
# Search all addon docs, examples, and API summaries
godot-rag s-addon "state machine"
# Filter by specific addon
godot-rag s-addon "state" --addon statecharts
godot-rag s-addon "change_scene" --addon scene_manager
# JSON output for AI agents
godot-rag s-addon "state machine" --addon statecharts --json
List addons
godot-rag addons
godot-rag addons --json
Output format
# JSON output (for AI Agent)
godot-rag s-class "Vector3.normalized" --json
# Limit results
godot-rag s-tutorial "C# Variant" --limit 3
# Debug search metadata
godot-rag s-class "Node.add_child" --debug-search
Update
When Godot releases a new version:
# Update godot-docs submodule
cd godot-docs && git pull origin stable
# Rebuild docs and RAG
uv run godot-rag-build build
# Include Scene Manager wiki docs
uv run godot-rag-build build --with-wiki
# Build and publish to PyPI
uv run godot-rag-build publish --target pypi
# Build and publish to TestPyPI
uv run godot-rag-build publish --target testpypi
Development
uv run pytest -q
License
MIT
Godot 文档与 addon 的混合 RAG 搜索。按类型搜索,精准命中。
安装
uv pip install godot-rag
或从 wheel 安装:
uv pip install godot_rag-4.7.0-py3-none-any.whl
使用方法
语言说明:查询必须使用英文。非英文查询请先翻译为英文(例如:"怎么做二段跳" → "how to double jump")。Embedding 模型仅支持英文。
按类型搜索
所有搜索命令都有长别名:search、search-class、search-tutorial、search-engine、search-addon。
默认行为:s、s-class、s-tutorial、s-engine 排除 addon 结果。使用 s-addon 搜索 addon。
# 搜索类参考(仅 API 文档)
godot-rag s-class "Node.add_child"
godot-rag s-class "Signal.emit" --limit 3
# class.method 查询可用 — 自动找到类
godot-rag s-class "ResourceLoader.load"
# 搜索教程(教程 + 入门指南)
godot-rag s-tutorial "how to use signals"
# 搜索引擎细节(架构、文件格式、GDExtension 等)
godot-rag s-engine "GDExtension"
# 搜索 addon 文档和示例(必须使用 s-addon)
godot-rag s-addon "state machine"
godot-rag s-addon "state machine" --addon statecharts
# 搜索全部文档(无类型过滤,排除 addon)
godot-rag s "Timer"
# 模糊符号匹配(camelCase/snake_case/带点号 都能匹配)
godot-rag s-class "addChild" # 匹配 add_child, _add_child
godot-rag s-class "Node.add_child" # 匹配 Node._add_child
# 禁用图谱扩展(仅返回直接匹配结果)
godot-rag s-class "add_child" --no-expand
搜索 addon
# 搜索所有 addon 文档、示例和 API 摘要
godot-rag s-addon "state machine"
# 按指定 addon 过滤
godot-rag s-addon "state" --addon statecharts
godot-rag s-addon "change_scene" --addon scene_manager
# JSON 输出(供 AI agent 使用)
godot-rag s-addon "state machine" --addon statecharts --json
列出 addon
godot-rag addons
godot-rag addons --json
输出格式
# JSON 输出(供 AI Agent 使用)
godot-rag s-class "Vector3.normalized" --json
# 限制结果数量
godot-rag s-tutorial "C# Variant" --limit 3
# 调试搜索元数据
godot-rag s-class "Node.add_child" --debug-search
更新
当 Godot 发布新版本时:
# 更新 godot-docs 子模块
cd godot-docs && git pull origin stable
# 重建文档和 RAG
uv run godot-rag-build build
# 纳入 Scene Manager wiki 文档
uv run godot-rag-build build --with-wiki
# 构建并发布到 PyPI
uv run godot-rag-build publish --target pypi
# 构建并发布到 TestPyPI
uv run godot-rag-build publish --target testpypi
开发
uv run pytest -q
许可证
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file godot_rag-4.7.0.post13-py3-none-any.whl.
File metadata
- Download URL: godot_rag-4.7.0.post13-py3-none-any.whl
- Upload date:
- Size: 28.5 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e5f77ae29f46dc1ebd058df15ade8d5c619a3cc5d48987276d2cebc3c539106c
|
|
| MD5 |
6e63ee49b67626798496bf98c6a9e088
|
|
| BLAKE2b-256 |
5c028bc663641a86947435d090de7104ef98179cfacbcb0a9ea1774da5424024
|