grok-cli
1.1.0
dotnet tool install --global grok-cli --version 1.1.0
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
dotnet tool install --local grok-cli --version 1.1.0
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=grok-cli&version=1.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
nuke :add-package grok-cli --version 1.1.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
GrokCLI (grok dotnet tool)
Terminal chat client for Grok 4.1 Fast with agentic tool-calling, packaged as a .NET global tool named grok.
Install
- Prerequisite: .NET SDK 10+ and the dotnet tools path on PATH (
~/.dotnet/toolson Linux/macOS,%USERPROFILE%\.dotnet\toolson Windows). - Install:
dotnet tool install -g grok-cli - Update:
dotnet tool update -g grok-cli
Run
grok
Or from source:
dotnet run --project GrokCLI/GrokCLI.tui
Configure
- Set
XAI_API_KEYin the environment (recommended) or placegrok.config.jsonin the tool installation directory (same directory as the tool binaries) with:{ "XAI_API_KEY": "your_key_here" } - Optional: add
allowed_commands,blocked_commands, andpre_prompt. IfGROK.mdexists in the working directory or ancestors, its contents are appended to the pre-prompt.
Usage
- Chat normally; Ctrl+Enter inserts a newline.
cmd <command>or/cmd <command>runs shell commands (subject to allow/block rules).clearor/clearclears the terminal.- Toggle modes: type
debugornormalin chat, or use--mode normal|debug,--debug,--normal, orGROK_MODE. - Tools: python (
code_execution), shell (run_command), search (ripgrep/grep/PowerShell), file read (read_local_filewith 200 KB limit and working-dir sandbox), file edit (edit_filereplace/insert/append/delete/write with optional backups), change directory, tests, workflow completion marker, placeholder web search.
Safety and defaults
- If
XAI_API_KEYis missing, chat is locked and guidance is shown. - Default pre-prompt requests the model to call
workflow_donewhen finished and to followGROK.mdif present. - Destructive commands are blocked by default; other commands may prompt for approval.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
This package has no dependencies.