Grok CLI Manual

Your First Task

Let Grok understand the repository first, then give it one small task with clear boundaries and verification.

Inspect active configuration

grok inspect
grok models

inspect shows the configuration Grok discovered. models confirms that YAI Router returns the expected model list.

Open a project

cd your-project
grok

Start with a read-only task:

Do not edit files yet. Explain this repository's structure, main modules, start command, test command, and most important configuration files.

Then ask for a small change:

Find one small, clearly verifiable improvement. Explain the files you would change, the reason, and the verification step. Wait for my confirmation before editing.

Single request

Run without the interactive UI:

grok --model grok-4.5 -p 'Inspect this project without editing and summarize its build and test commands in five lines'

Continue the latest session for the current project:

grok --continue