openviking by volcengine/openviking
npx skills add https://github.com/volcengine/openviking --skill openviking重要提示:所有 ov 命令都是终端(shell)命令——通过 bash 工具运行。直接执行——无需预检查,无需测试命令。在错误发生时处理它们。
OpenViking 将内容存储在 viking:// 命名空间下的虚拟文件系统中。每个 URI 映射到一个文件或目录,例如 viking://resources/fastapi/routing.py。每个目录都有 AI 生成的摘要(abstract / overview)。核心原则:缩小 URI 范围以提高检索效率。 与其搜索所有仓库,不如锁定到特定的仓库或子目录——这能显著减少干扰并加快结果返回速度。
根据你的查找目标选择合适的命令:
| 命令 | 适用场景 | 示例 |
|---|
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
ov search | 语义搜索——用于基于概念/意图的查询 | "依赖注入", "认证如何工作" |
ov grep | 你知道确切的关键词或符号 | 函数名、类名、错误字符串 |
ov glob | 你想通过模式枚举文件 | 所有 *.py 文件、所有测试文件 |
# 语义搜索
ov search "dependency injection" --uri viking://resources/fastapi --limit 10
ov search "how tokens are refreshed" --uri viking://resources/fastapi/fastapi/security
ov search "JWT authentication" --limit 10 # 跨所有仓库
ov search "error handling" --limit 5 --threshold 0.7 # 过滤低相关性结果
# 关键词搜索——精确匹配或正则表达式
ov grep "verify_token" --uri viking://resources/fastapi
ov grep "class.*Session" --uri viking://resources/requests/requests
# 文件枚举——按名称模式(务必指定 --uri 以限定搜索范围)
ov glob "**/*.py" --uri viking://resources/fastapi
ov glob "**/test_*.py" --uri viking://resources/fastapi/tests
ov glob "**/*.py" --uri viking://resources/ # 跨所有仓库
缩小范围: 一旦你确定了一个相关目录,将其作为 --uri 参数传入,以将后续搜索限制在该子树下——这比搜索整个仓库更快、更精确。
查询表述: 编写具体、有上下文的查询,而不是单个关键词。
ov search "API" # 太模糊
ov search "REST API authentication with JWT tokens" # 更好
ov search "JWT token refresh flow" --uri viking://resources/backend # 最佳
# 目录:AI 生成的摘要
ov abstract viking://resources/fastapi/fastapi/dependencies/ # 单行摘要
ov overview viking://resources/fastapi/fastapi/dependencies/ # 详细分解
# 文件:原始内容
ov read viking://resources/fastapi/fastapi/dependencies/utils.py
ov read viking://resources/fastapi/fastapi/dependencies/utils.py --offset 100 --limit 50
abstract / overview 仅适用于目录。read 仅适用于文件。
ov ls viking://resources/ # 列出所有已索引的仓库
ov ls viking://resources/fastapi # 列出仓库顶层内容
ov ls viking://resources/fastapi --simple # 仅路径,无元数据
ov ls viking://resources/fastapi --recursive # 递归列出所有文件
ov tree viking://resources/fastapi # 完整目录树(默认:3 层深度)
ov tree viking://resources/fastapi -L 2 # 限制深度为 2 层
ov tree viking://resources/fastapi -l 200 # 将摘要列截断为 200 个字符
ov tree viking://resources/fastapi -L 2 -l 200 # 组合:2 层深度,200 字符摘要
-L 控制树展开的深度层数。-l 控制每个目录 AI 生成摘要的长度。在深入研究之前,使用 ov tree -L 2 -l 200 作为了解仓库结构的良好起点。
ov add-resource https://github.com/owner/repo --to viking://resources/repo --timeout 300
--timeout 是必需的(单位:秒)。小型仓库使用 300(5 分钟),大型仓库请增加时间。
提交后,运行一次 ov observer queue 并向用户报告状态。索引在后台运行——不要轮询或等待。
| 仓库大小 | 文件数 | 预估时间 |
|---|---|---|
| 小型 | < 100 | 2–5 分钟 |
| 中型 | 100–500 | 5–20 分钟 |
| 大型 | 500+ | 20–60+ 分钟 |
ov rm viking://resources/fastapi --recursive
这将永久删除该仓库及其所有已索引内容。运行前请与用户确认。
command not found: ov → 告知用户:pip install openviking --upgrade。停止。
url is required / CLI_CONFIG 错误 → 自动创建配置并重试:
mkdir -p ~/.openviking && echo '{"url": "http://localhost:1933"}' > ~/.openviking/ovcli.conf
CONNECTION_ERROR / 连接失败:
~/.openviking/ov.conf 存在 → 自动启动服务器,等待直到健康,然后重试:
openviking-server > /tmp/openviking.log 2>&1 &
for i in $(seq 1 10); do ov health 2>/dev/null && break; sleep 3; done
不存在 → 告知用户先配置 ~/.openviking/ov.conf。停止。
对于其他问题或命令详情,请运行:
ov help
ov <command> --help # 例如 ov search --help
每周安装量
295
仓库
GitHub 星标数
18.8K
首次出现
2026 年 3 月 4 日
安全审计
安装于
codex293
kimi-cli293
github-copilot293
gemini-cli293
cursor293
opencode293
IMPORTANT: Allov commands are terminal (shell) commands — run them via the bash tool. Execute directly — no pre-checks, no test commands. Handle errors when they occur.
OpenViking stores content in a virtual filesystem under the viking:// namespace. Each URI maps to a file or directory, e.g. viking://resources/fastapi/routing.py. Each directory has AI-generated summaries (abstract / overview). The key principle: narrow the URI scope to improve retrieval efficiency. Instead of searching all repos, lock to a specific repo or subdirectory — this reduces noise and speeds up results significantly.
Choose the right command based on what you're looking for:
| Command | Use when | Example |
|---|---|---|
ov search | Semantic search — use for concept/intent based queries | "dependency injection", "how auth works" |
ov grep | You know the exact keyword or symbol | function name, class name, error string |
ov glob | You want to enumerate files by pattern | all *.py files, all test files |
# Semantic search
ov search "dependency injection" --uri viking://resources/fastapi --limit 10
ov search "how tokens are refreshed" --uri viking://resources/fastapi/fastapi/security
ov search "JWT authentication" --limit 10 # across all repos
ov search "error handling" --limit 5 --threshold 0.7 # filter low-relevance results
# Keyword search — exact match or regex
ov grep "verify_token" --uri viking://resources/fastapi
ov grep "class.*Session" --uri viking://resources/requests/requests
# File enumeration — by name pattern (always specify --uri to scope the search)
ov glob "**/*.py" --uri viking://resources/fastapi
ov glob "**/test_*.py" --uri viking://resources/fastapi/tests
ov glob "**/*.py" --uri viking://resources/ # across all repos
Narrowing scope: once you identify a relevant directory, pass it as --uri to restrict subsequent searches to that subtree — this is faster and more precise than searching the whole repo.
Query formulation: write specific, contextual queries rather than single keywords.
ov search "API" # too vague
ov search "REST API authentication with JWT tokens" # better
ov search "JWT token refresh flow" --uri viking://resources/backend # best
# Directories: AI-generated summaries
ov abstract viking://resources/fastapi/fastapi/dependencies/ # one-line summary
ov overview viking://resources/fastapi/fastapi/dependencies/ # detailed breakdown
# Files: raw content
ov read viking://resources/fastapi/fastapi/dependencies/utils.py
ov read viking://resources/fastapi/fastapi/dependencies/utils.py --offset 100 --limit 50
abstract / overview only work on directories. read only works on files.
ov ls viking://resources/ # list all indexed repos
ov ls viking://resources/fastapi # list repo top-level contents
ov ls viking://resources/fastapi --simple # paths only, no metadata
ov ls viking://resources/fastapi --recursive # list all files recursively
ov tree viking://resources/fastapi # full directory tree (default: 3 levels deep)
ov tree viking://resources/fastapi -L 2 # limit depth to 2 levels
ov tree viking://resources/fastapi -l 200 # truncate abstract column to 200 chars
ov tree viking://resources/fastapi -L 2 -l 200 # combined: 2 levels deep, 200-char summaries
-L controls how many levels deep the tree expands. -l controls the length of the AI-generated summary per directory. Use ov tree -L 2 -l 200 as a good starting point to understand a repo's structure before diving in.
ov add-resource https://github.com/owner/repo --to viking://resources/repo --timeout 300
--timeout is required (seconds). Use 300 (5 min) for small repos, increase for larger ones.
After submitting, run ov observer queue once and report status to user. Indexing runs in background — do not poll or wait.
| Repo Size | Files | Est. Time |
|---|---|---|
| Small | < 100 | 2–5 min |
| Medium | 100–500 | 5–20 min |
| Large | 500+ | 20–60+ min |
ov rm viking://resources/fastapi --recursive
This permanently deletes the repo and all its indexed content. Confirm with the user before running.
command not found: ov → Tell user: pip install openviking --upgrade. Stop.
url is required / CLI_CONFIG error → Auto-create config and retry:
mkdir -p ~/.openviking && echo '{"url": "http://localhost:1933"}' > ~/.openviking/ovcli.conf
CONNECTION_ERROR / failed to connect:
~/.openviking/ov.conf exists → auto-start server, wait until healthy, retry:
openviking-server > /tmp/openviking.log 2>&1 &
for i in $(seq 1 10); do ov health 2>/dev/null && break; sleep 3; done
Does not exist → Tell user to configure ~/.openviking/ov.conf first. Stop.
For other issues or command details, run:
ov help
ov <command> --help # e.g. ov search --help
Weekly Installs
295
Repository
GitHub Stars
18.8K
First Seen
Mar 4, 2026
Security Audits
Gen Agent Trust HubPassSocketWarnSnykWarn
Installed on
codex293
kimi-cli293
github-copilot293
gemini-cli293
cursor293
opencode293
React 组合模式指南:Vercel 组件架构最佳实践,提升代码可维护性
106,200 周安装