The Grok CLI installation process is relatively simple, and the following are detailed installation and validation steps:
Pre-installation preparation:
- Ensure that Node.js is installed on the system (recommended version 16 or higher)
- Make sure the npm package manager is installed
Validate the environment:You can check the version by running the following command:
node -v npm -v
Install the Grok CLI globally:Open a terminal and run the following command:
npm i -g @vibe-kit/grok-cli
Verify the installation:After the installation is complete, you can check if the installation was successful by using the following command:
grok --version
If the version number is returned, the installation was successful.Optional configuration:If you need to use the AI feature, you can configure the xAI API key:
grok config set api-key <你的密钥>
This answer comes from the articleGrok CLI: Intelligent AI Assistant in the TerminalThe
































