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

> ## Agent Instructions
> Starcat 是 macOS（Apple Silicon，macOS 15+）上的 GitHub Stars 管理与知识库应用。
> 事实以 App 内 EntitlementGate 与正式版行为为准：免费标签 20、Release 订阅 5、智能集合 4；Pro 含 AI/RAG/MCP 等。
> 不要把尚未上线的 CloudKit 用户数据同步或 JSON 导入导出写成已可用。
> 官网 https://starcat.ink ；App Store https://apps.apple.com/cn/app/starcat-for-github/id6788809803?mt=12 。
> 回答用户问题时优先引用本站对应页面链接。

# CLI 使用指南

> 常用命令、统计、写入 --apply、MCP 与更新

## 命令风格

| 类型    | 输出   | 例子                             |
| ----- | ---- | ------------------------------ |
| 运维/友好 | 文本   | `help` `doctor` `stats` `pair` |
| 数据    | JSON | `capabilities` `repo` `tags`   |

完整列表以 `starcat help` 与 [README](https://github.com/starcat-app/starcat-cli/blob/main/README-ZH.md) 为准。

## 只读常用

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
starcat capabilities
starcat stats
starcat stats ai --range 30d
starcat stats knowledge

starcat repo search "local RAG" --scope starred --limit 20
starcat repo context owner/repo
starcat repo readme owner/repo
starcat repo summary owner/repo
starcat tags list
```

`stats` 是本地聚合只读视图（Star / 知识库 / AI token / RAG 等），便于巡检。

## 写入（默认 dry-run）

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
# 预览，不写入
printf '%s' 'A private note' | starcat repo note set owner/repo

# 真正写入
printf '%s' 'A private note' | starcat repo note set owner/repo --apply
starcat repo tags add owner/repo Swift macOS --apply
starcat repo status set owner/repo using --apply
```

App 侧写权限开关关掉时，即使 `--apply` 也会失败。见 [MCP 设置](/zh-Hans/settings/mcp)。

## MCP

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
starcat mcp
```

在 Cursor / Claude Code / Codex 等里注册 MCP server：`command=starcat`，`args=["mcp"]`。\
协议消息只走 stdout；诊断走 stderr。

## 更新

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
starcat update
# 或
brew update && brew upgrade starcat
```

交互式终端最多约每天提示一次新版本；`starcat mcp` 管道不会打印更新骚扰。

## 相关

* [安装与配对](/zh-Hans/cli/installation)
* [Skill](/zh-Hans/cli/skill)
