Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Add the plugin to your `opencode.json`:
```

The following command files are automatically copied to
`~/.config/opencode/command/` when the plugin initializes:
`~/.config/opencode/commands/` when the plugin initializes:

- `mode-performance.md`
- `mode-economy.md`
Expand Down Expand Up @@ -135,7 +135,7 @@ To add a custom preset (e.g., "premium"):
}
```

2. Create a command file at `~/.config/opencode/command/mode-premium.md`:
2. Create a command file at `~/.config/opencode/commands/mode-premium.md`:

```md
---
Expand Down
4 changes: 2 additions & 2 deletions src/config/command-installer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ import { fileURLToPath } from 'node:url'
* Target directory for OpenCode command files.
*
* This is the standard location where OpenCode looks for slash command
* markdown files: `~/.config/opencode/command/`
* markdown files: `~/.config/opencode/commands/`
*
* @constant
*/
const COMMANDS_DEST = join(homedir(), '.config', 'opencode', 'command')
const COMMANDS_DEST = join(homedir(), '.config', 'opencode', 'commands')

/**
* Finds the commands source directory.
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const modeSwitcherPlugin: Plugin = async ({ client }) => {
// Initialize on startup with error handling
try {
await modeManager.initialize()
// Copy slash command files to ~/.config/opencode/command/
// Copy slash command files to ~/.config/opencode/commands/
copyCommandFiles()
} catch (error) {
// Log error but don't block opencode startup
Expand Down
Loading