theo CLI 包含在 @hitheo/sdk 包中。
安装
npm install -g @hitheo/sdk
命令
| 命令 | 说明 |
|---|---|
theo init | 在项目中初始化 Theo(配置 + MCP + IDE 检测) |
theo login | 进行身份验证并存储 API 密钥 |
theo logout | 删除存储在 ~/.theo/credentials 中的 API 密钥 |
theo mcp install | 为检测到的/指定的 IDE 配置 MCP |
theo status | 人类可读的连接状态与健康检查。会同时探测 hitheo.ai 和 www.hitheo.ai,以捕获顶级域名重定向导致的 401 陷阱。 |
theo verify | 机器可读的 JSON 诊断结果(供 CI 使用)。在不健康或未认证时以 1 退出。 |
theo complete "<prompt>" | 在终端中快速获取 AI 补全结果 |
theo skill init | 搭建新的技能项目脚手架 |
theo skill validate | 校验 theo-skill.json 清单文件 |
theo skill publish | 将技能提交到应用市场 |
快速开始
# 在你的项目中设置 Theo
theo init
# 确认连通性与身份验证(并检测是否存在重定向 401 陷阱)
theo status
# 将机器可读的诊断结果传给 CI
theo verify | jq .authenticated
# 快速补全
theo complete "Write a function to reverse a string"
