gaze init
June 16, 2026 · View on GitHub
Scaffold OpenCode agent and command files into the current directory. After running this command, you can use the /gaze command in OpenCode to generate AI-powered quality reports.
Synopsis
gaze init [flags]
Arguments
This command takes no positional arguments. It always operates on the current working directory.
Flags
| Flag | Type | Default | Description |
|---|---|---|---|
--force | bool | false | Overwrite existing files. Without this flag, existing user-owned files are skipped. |
Scaffolded Files
The init command creates the following directory structure:
.opencode/
├── agents/
│ └── gaze-reporter.md # AI agent prompt for quality reporting
├── commands/
│ ├── gaze.md # /gaze command definition
│ ├── review-council.md # /review-council command definition
│ └── speckit.testreview.md # /speckit.testreview command definition
└── references/
├── gaze-example-output.md # Canonical example output for the reporter
└── gaze-scoring-model.md # Document-enhanced classification scoring model
File Ownership Model
Gaze uses a mixed ownership model for scaffolded files:
- User-owned files (
agents/,commands/gaze.md): Created once, never overwritten on subsequentgaze initruns (unless--forceis used). Users can customize these files. - Tool-owned files (
references/,commands/review-council.md,commands/speckit.testreview.md): Updated automatically ongaze initif the content has changed. These files are maintained by Gaze and should not be manually edited.
Configuration Interaction
This command does not read .gaze.yaml.
Examples
Initialize OpenCode integration
cd /path/to/your/go/project
gaze init
✓ Created .opencode/agents/gaze-reporter.md
✓ Created .opencode/commands/gaze.md
✓ Created .opencode/commands/review-council.md
✓ Created .opencode/commands/speckit.testreview.md
✓ Created .opencode/references/gaze-example-output.md
✓ Created .opencode/references/gaze-scoring-model.md
Re-initialize (update tool-owned files)
gaze init
On subsequent runs, user-owned files are skipped and tool-owned files are updated if their content has changed.
Force overwrite all files
gaze init --force
Overwrites all files, including user-customized agent prompts and commands.
See Also
- OpenCode Integration — how to use
/gazeafter initialization gaze report— the CLI equivalent of the/gazeOpenCode command