diff options
| author | Dax Raad <[email protected]> | 2025-08-22 17:23:51 -0400 |
|---|---|---|
| committer | Dax Raad <[email protected]> | 2025-08-22 17:23:59 -0400 |
| commit | 0fe94c16164f9db08a82511ff5ddd45b40cb80ad (patch) | |
| tree | 7b68767cd28a468e0c4df38ed1f83fee8d0b25d3 /packages/web/src/content/docs | |
| parent | a42b004c723fd9f8b3fc3053b12e71600c7cb3d2 (diff) | |
| download | opencode-0fe94c16164f9db08a82511ff5ddd45b40cb80ad.tar.gz opencode-0fe94c16164f9db08a82511ff5ddd45b40cb80ad.zip | |
docs: add file names to code block titles in commands.mdx
Diffstat (limited to 'packages/web/src/content/docs')
| -rw-r--r-- | packages/web/src/content/docs/docs/commands.mdx | 43 |
1 files changed, 16 insertions, 27 deletions
diff --git a/packages/web/src/content/docs/docs/commands.mdx b/packages/web/src/content/docs/docs/commands.mdx index 93be346c6..d34f0ee3f 100644 --- a/packages/web/src/content/docs/docs/commands.mdx +++ b/packages/web/src/content/docs/docs/commands.mdx @@ -13,7 +13,7 @@ Create markdown files in the `command/` directory to define custom commands. Create `.opencode/command/test.md`: -```md +```md title=".opencode/command/test.md" --- description: Run tests with coverage agent: build @@ -34,32 +34,13 @@ Use the command by typing `/` followed by the command name. --- -## Create command files - -For complex commands, create markdown files in the `command/` directory. - -Create `.opencode/command/test.md`: - -```md ---- -description: Run tests with coverage -agent: build -model: anthropic/claude-3-5-sonnet-20241022 ---- - -Run the full test suite with coverage report and show any failures. -Focus on the failing tests and suggest fixes. -``` - -The frontmatter defines command properties. The content becomes the template. - ---- - ## Use arguments Pass arguments to commands using the `$ARGUMENTS` placeholder. -```md +Create `.opencode/command/component.md`: + +```md title=".opencode/command/component.md" --- description: Create a new component --- @@ -80,7 +61,9 @@ Run the command with arguments: Use `!`command`` to inject shell command output into your prompt. -```md +Create `.opencode/command/analyze-coverage.md`: + +```md title=".opencode/command/analyze-coverage.md" --- description: Analyze test coverage --- @@ -91,7 +74,9 @@ Here are the current test results: Based on these results, suggest improvements to increase coverage. ``` -```md +Create `.opencode/command/review-changes.md`: + +```md title=".opencode/command/review-changes.md" --- description: Review recent changes --- @@ -110,7 +95,9 @@ Commands run in your project's root directory and their output becomes part of t Include files in your command using `@` followed by the filename. -```md +Create `.opencode/command/review-component.md`: + +```md title=".opencode/command/review-component.md" --- description: Review component --- @@ -131,7 +118,9 @@ Configure commands with these optional frontmatter properties: - **agent**: Agent to use (defaults to "build") - **model**: Specific model to use for this command -```md +Create `.opencode/command/code-review.md`: + +```md title=".opencode/command/code-review.md" --- description: Code review assistant agent: build |
