Grok CLI的安装过程相对简单,以下是详细的安装和验证步骤:
安装前准备:
- 确保系统已安装Node.js(建议版本16或更高)
- 确保已安装npm包管理器
Validate the environment:可以运行以下命令检查版本:
node -v npm -v
全局安装Grok CLI:Open a terminal and run the following command:
npm i -g @vibe-kit/grok-cli
Verify the installation:安装完成后,可以通过以下命令检查是否安装成功:
grok --version
If the version number is returned, the installation was successful.Optional configuration:如果需要使用AI功能,可以配置xAI API密钥:
grok config set api-key <你的密钥>
This answer comes from the articleGrok CLI: Intelligent AI Assistant in the TerminalThe