Conversation
引入基于 Typer 的完整 CLI 模块 (openviking/cli),支持 resources、 sessions、search、filesystem、content、relations、pack、debug、 observer、system 等子命令。 新增统一配置加载器 (config_loader),采用三级解析链(显式路径 → 环境变量 → ~/.openviking/),同时服务于 server (ov.conf) 和 CLI (ovcli.conf)。 精简 AsyncOpenViking / SyncOpenViking 客户端,移除 service 模式 (vectordb_url / agfs_url) 和环境变量回退逻辑,仅保留 embedded 和 HTTP 两种模式。 同步更新中英文文档、示例和测试。
MaojiaSheng
approved these changes
Feb 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
实现 OpenViking Bash CLI 模块,完成技术方案中 T3(CLI 基础框架)和 T5(CLI 完整命令)两个任务。基于 Typer 构建非交互式 CLI,支持 Agent 通过 subprocess 调用,并统一配置加载机制。
Related Issue
Related to #48
Type of Change
Changes Made
T3: CLI 基础框架
openviking/cli/模块,基于 Typer 实现 CLI 入口 (main.py)context.py),统一管理 HTTPClient 连接和身份信息output.py),支持 JSON / Table / Plain 三种输出模式errors.py),CLI 异常转为友好的终端输出serve,ls,find,read,abstract,overview,add-resourceT5: CLI 完整命令
tree,stat,mkdir,rm,mv(commands/filesystem.py)search,grep,glob(commands/search.py)read,abstract,overview(commands/content.py)session new/list/get/commit/delete(commands/session.py)link,unlink,relations(commands/relations.py)add-resource,add-skill(commands/resources.py)export,import(commands/pack.py)status,health(commands/system.py)debug status,debug health(commands/debug.py)observe(commands/observer.py)serve(commands/serve.py)配置加载机制统一
openviking/utils/config/config_loader.py,统一ov.conf和ovcli.conf的加载逻辑OPENVIKING_CONFIG_FILE和OPENVIKING_CLI_CONFIG_FILE两个环境变量管理配置文件路径parser_config.py和embedding_config.py,简化配置体系Client 层改造
async_client.py/sync_client.py适配新的配置加载方式client/http.py和client/local.py适配新的初始化流程client/session.py移除创建 session 时的 user 参数(由 server 端管理)文档更新
examples/server_client/client_cli.sh示例脚本examples/ovcli.conf.example配置示例测试
tests/cli/test_cli.py:CLI 命令单元测试tests/cli/conftest.py:CLI 测试 fixturestests/test_config_loader.py:配置加载器单元测试Testing
Checklist
Additional Notes
ovcli.conf文件管理连接信息(url/api_key/user),避免每次命令都传递全局参数--output json/table/plain,默认 table 模式便于人类阅读,json 模式便于程序解析