Custom commands for opencode.
This option can either be:
- An attribute set defining commands
- A path to a directory containing multiple command files
If an attribute set is used, the attribute name becomes the command filename, and the value is either:
- Inline content as a string (creates
opencode/command/<name>.md) - A path to a file (creates
opencode/command/<name>.md)
If a path is used, it is expected to contain command files. The directory is symlinked to $XDG_CONFIG_HOME/opencode/command/.
Declarations
Type
(attribute set of (strings concatenated with "\n" or absolute path)) or absolute pathDefault
{ }Example
{
changelog = ''
# Update Changelog Command
Update CHANGELOG.md with a new entry for the specified version.
Usage: /changelog [version] [change-type] [message]
'';
fix-issue = ./commands/fix-issue.md;
commit = ''
# Commit Command
Create a git commit with proper message formatting.
Usage: /commit [message]
'';
}