> ## Documentation Index
> Fetch the complete documentation index at: https://docs.hitheo.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# CLI 概覽

> Theo CLI ——項目設置、MCP 配置、診斷與技能管理。

`theo` CLI 包含在 `@hitheo/sdk` 包中。

## 安裝

```bash theme={null}
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` | 將技能提交到應用市場 |

## 快速開始

```bash theme={null}
# 在你的項目中設置 Theo
theo init

# 確認連通性與身份驗證(並檢測是否存在重定向 401 陷阱)
theo status

# 將機器可讀的診斷結果傳給 CI
theo verify | jq .authenticated

# 快速補全
theo complete "Write a function to reverse a string"
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.