Custom commands for opencode. The attribute name becomes the command filename, and the value is either:
- Inline content as a string
- A path to a file containing the command content Commands are stored in $XDG_CONFIG_HOME/.config/opencode/command/ directory.
Declarations
Type
attribute set of (strings concatenated with "\n" or absolute path)Default
{ }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]
'';
}