Skip to content

feat(opencode): Add commandsPath support for OpenCode client #144

@christso

Description

@christso

Summary

The documentation states that OpenCode supports commands at .opencode/commands/, but the code doesn't implement this.

Current State

Documentation (after this PR's fixes):

  • docs/src/content/docs/reference/clients.mdx: Lists OpenCode with .opencode/commands/
  • README.md: Shows OpenCode with .opencode/commands/ in the client comparison table

Code:

  • src/models/client-mapping.ts: OpenCode client mapping has no commandsPath property
  • Commands are only synced when commandsPath exists (see copyCommands in src/core/transform.ts)

Expected Behavior

When plugins have a commands/ directory and OpenCode is in the workspace's clients list, commands should be synced to .opencode/commands/.

Implementation

Add commandsPath to the OpenCode client mapping:

```typescript
opencode: {
commandsPath: '.opencode/commands/', // Add this line
skillsPath: '.agents/skills/',
agentFile: 'AGENTS.md',
},
```

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions