See the Installation Guide for all available methods.
On first run, ggcode auto-detects your environment and prompts for configuration:
ggcodeThe onboarding wizard will:
- Ask you to select a provider (Z.ai, OpenAI, Anthropic, etc.)
- Prompt for your API key
- Write the configuration to
~/.ggcode/ggcode.yaml - Store the API key securely in
~/.ggcode/keys.env
You can also manually create the config file. See Configuration for details.
Create ~/.ggcode/ggcode.yaml:
vendor: openai
endpoint: default
model: gpt-4oThen add your API key to ~/.ggcode/keys.env:
OPENAI_API_KEY=sk-your-key-hereOr set it via environment variable:
export OPENAI_API_KEY=sk-your-key-hereggcodeType a message and press Enter. ggcode will:
- Send your message to the configured LLM
- Stream the response in real-time
- Execute any tool calls (file reads, searches, etc.) with your approval
The input supports three modes:
- Normal (
❯): Chat with the agent (default). - Shell (
$): Type$or!to run shell commands inline. Exits after each command. - Chat (
#): Type#to send LAN Chat messages to other ggcode instances. Stays active untilEsc.
| Command | Description |
|---|---|
/help |
Show available commands |
/sessions |
List and resume sessions |
/model [name] |
Switch model |
/mode [mode] |
Switch permission mode (supervised/plan/auto/bypass/autopilot) |
/compact |
Compact conversation to save context |
/exit |
Exit ggcode |
- Configuration — Full config reference
- Providers — Set up multiple providers
- Slash Commands — All available commands and input modes
- Permission Modes — Control agent autonomy
- LAN Chat — Real-time messaging between instances
- CLI Reference — All CLI flags and subcommands