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

# Grok

> 检测并使用本机 grok。扩展只做检测，不代装。

Grok 走本机 `grok`。凭证和模型留在 Grok 自己的配置里（通常是 `~/.grok/`）。

打开 **设置 → 供应商管理 → CLI**，确认 Grok CLI 显示 **已安装**。扩展**不会**代你安装，也不会改 `config.toml`。

<img src="https://mintcdn.com/mossx-docs/kz4nt5KFSKzkAZwe/images/vscode/provider-cli.png?fit=max&auto=format&n=kz4nt5KFSKzkAZwe&q=85&s=5db25777376fb6428e73b4b9c0ae471e" alt="CLI 检测页" width="100%" data-path="images/vscode/provider-cli.png" />

## 安装

```bash theme={null}
curl -fsSL https://x.ai/cli/install.sh | bash
grok --version
```

Grok 没有 npm 发行版。Windows 请在 WSL 或 Git Bash 里跑这条命令。

文档：[https://x.ai/cli](https://x.ai/cli)

装好后回到 CLI 页点 **重新检测**。找不到命令时，可设 `GROK_BIN` / `GROK_PATH` / `GROK_CLI_PATH`，或把 `~/.grok/bin` 写进系统 `PATH`。

## 能力差异

相对 Claude Code：

* 没有规划模式
* MCP / Skills / 部分设置页以 Claude Code 为主
* 停止按钮会结束 `grok` 子进程
* 图片附件走 Grok 自己的方式（例如 `--prompt-file`）
* 历史按运行时隔离，且有本地历史索引

## 检测失败时

见 [检测与安装](/vscode/providers/cli)。

## 下一步

* [多供应商总览](/vscode/providers/overview)
* [发出第一条消息](/vscode/start/first-task)
