OmniScout Docs

配置

config.toml、环境变量、数据布局与 JSON 输出。

config.toml

在各平台的配置目录下创建 config.toml:

平台路径
macOS~/Library/Application Support/omniscout/config.toml
Linux~/.config/omniscout/config.toml
default_source = "searxng"   # searxng | ddg | wikipedia | web
search_limit = 10
research_results = 8
request_throttle_seconds = 1.0
embedding_model = "sentence-transformers/all-MiniLM-L6-v2"
browser = "chrome"                    # chrome | edge | brave | vivaldi | opera | arc | chromium | custom
# browser_executable = "/path/to/browser"  # only needed for 'custom'

优先用 CLI 而非手改 — omniscout settings set 写入的是同一文件:

omniscout settings set browser brave
omniscout settings show

用 omniscout install、omniscout settings browsers 与 omniscout settings engines 检查安装状态与引擎。

环境变量

变量用途
OMNISCOUT_JSON=1强制所有命令输出 JSON
OMNISCOUT_DAEMON_AUTO_START=0不自动启动 daemon
OMNISCOUT_DAEMON_PORTdaemon 端口(默认 7720)
OMNISCOUT_DATA_DIR覆盖数据目录
OMNISCOUT_BROWSER浏览器 id(覆盖配置)
OMNISCOUT_EMBED_LOCAL_ONLY=0允许运行时从 Hugging Face 获取
TWOCAPTCHA_API_KEY / CAPTCHA_API_KEY验证码求解器 key
OMNISCOUT_API_KEY云端 API key(云端 SDK/CLI 使用)
OMNISCOUT_BASE_URL云端 base URL(默认生产环境)

旧版 HARNESS_* 等价变量仍被接受。

JSON 输出约定

每个命令都会说 JSON — 这是 agent 集成面:

omniscout --json answer "What is local-first software?"
export OMNISCOUT_JSON=1   # same for all commands in this shell

开启 JSON 后,stdout 为结构化载荷,日志走 stderr(加 -v/--verbose 输出更多)。用 jq 处理:

omniscout search "topic" | jq '.hits[] | {title, url}'

或跳过 CLI 直接与 daemon 对话:

curl -X POST http://127.0.0.1:7720/command \
  -H 'Content-Type: application/json' \
  -d '{"action":"navigate","args":{"url":"https://example.com"},"session":"demo"}'

完整 agent 循环(JSON、trace/replay/watch、错误类型)见与 AI agent 配合使用。

磁盘状态

路径(数据目录下)用途
profiles/持久浏览器 user-data-dir
qdrant/内嵌向量索引
models/sentence-transformers/预取的 embedding 模型
memory.sqlite浏览器记忆(访问 + 笔记)
sessions.sqlite常驻会话注册表
cache/pages/按内容哈希的 HTML 缓存
daemon/PID、端口、日志、操作历史、会话恢复

profile 与模型 / 缓存数据不要纳入版本控制。

On this page