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.
gaze init [flags]
This command takes no positional arguments. It always operates on the current working directory.
| Flag | Type | Default | Description |
|---|---|---|---|
--force |
bool |
false |
Overwrite existing files. Without this flag, existing user-owned files are skipped. |
The init command creates the following directory structure:
.opencode/
├── agents/
│ └── gaze-reporter.md # AI agent prompt for quality reporting
├── command/
│ ├── 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
Gaze uses a mixed ownership model for scaffolded files:
- User-owned files (
agents/,command/gaze.md): Created once, never overwritten on subsequentgaze initruns (unless--forceis used). Users can customize these files. - Tool-owned files (
references/,command/review-council.md,command/speckit.testreview.md): Updated automatically ongaze initif the content has changed. These files are maintained by Gaze and should not be manually edited.
This command does not read .gaze.yaml.
cd /path/to/your/go/project
gaze init✓ Created .opencode/agents/gaze-reporter.md
✓ Created .opencode/command/gaze.md
✓ Created .opencode/command/review-council.md
✓ Created .opencode/command/speckit.testreview.md
✓ Created .opencode/references/gaze-example-output.md
✓ Created .opencode/references/gaze-scoring-model.md
gaze initOn subsequent runs, user-owned files are skipped and tool-owned files are updated if their content has changed.
gaze init --forceOverwrites all files, including user-customized agent prompts and commands.
- OpenCode Integration — how to use
/gazeafter initialization gaze report— the CLI equivalent of the/gazeOpenCode command