Overview
GemKit uses two configuration files in the .gemini/ directory:
.gk.json- Project settings, plans, paths, and agent configurationsettings.json- Tools, hooks, and automation settings
.gk.json Reference
The main project configuration file.
Plan Settings
json
| Field | Description |
|---|---|
namingFormat | Template for plan file names |
dateFormat | Date format in plan names |
issuePrefix | Prefix for issue references |
reportsDir | Directory for generated reports |
resolutionOrder | Order to resolve plan context |
branchPattern | Regex to extract branch names |
Path Configuration
json
| Field | Description |
|---|---|
docs | Documentation directory |
plans | Plans directory |
Agent Spawning
json
| Field | Description |
|---|---|
agentsDir | Directory containing agent definitions |
defaultModel | Default AI model for agents |
music | Enable ambient music during execution |
Project Detection
json
All fields default to "auto" for automatic detection.
Notifications
json
| Field | Description |
|---|---|
discord.enabled | Enable Discord notifications |
discord.mainAgent | Notify for main agent events |
discord.subAgentRoles | Roles that trigger notifications |
Locale and Trust
json
Assertions
json
Custom assertions for validation (empty by default).
settings.json Reference
Controls tools, hooks, and automation behavior.
Tools Configuration
json
| Field | Description |
|---|---|
hooks | Enable/disable hooks system |
allowedTools | List of tools agents can use |
interactiveShell.enabled | Allow interactive shell |
interactiveShell.inactivityTimeout | Shell timeout in seconds |
color | Enable colored output |
autoApproved | Commands that don't require approval |
Hooks Configuration
Hooks are defined in settings.json with lifecycle stages:
json
Hook Lifecycle Stages
| Stage | When It Runs |
|---|---|
SessionStart | When a new session begins |
BeforeAgent | Before an agent processes a request |
BeforeModel | Before sending to the AI model |
SessionEnd | When session completes |
Hook Object Properties
| Property | Type | Description |
|---|---|---|
command | string | Command to execute |
timeout | number | Timeout in milliseconds |
matcher | string | Pattern to match (* for all) |
Environment Variables
Required
| Variable | Description |
|---|---|
GEMINI_API_KEY | Google Gemini API key |
Optional
| Variable | Description |
|---|---|
ANTHROPIC_API_KEY | Claude API key for dual-provider |
DISCORD_WEBHOOK | Discord webhook URL for notifications |
Setting Environment Variables
Linux/macOS:
bash
Windows (PowerShell):
powershell
.gkignore Reference
Specify files to ignore when loading context:
Complete .gk.json Example
json