[FEATURE]: Allow slash commands in "opencode run" #2357

Closed
opened 2026-02-16 17:35:18 -05:00 by yindo · 2 comments
Owner

Originally created by @rstacruz on GitHub (Oct 30, 2025).

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

It would be nice to do opencode run "/my-custom-slash-command" .

I have some commands that I use a lot (eg, create a PR, search for docs, etc) and it's be great to automate them.

I'm happy to try and give this a go as a PR, but thought it might be worth bringing it up first.

Originally created by @rstacruz on GitHub (Oct 30, 2025). ### Feature hasn't been suggested before. - [x] I have verified this feature I'm about to request hasn't been suggested before. ### Describe the enhancement you want to request It would be nice to do `opencode run "/my-custom-slash-command" `. I have some commands that I use a lot (eg, create a PR, search for docs, etc) and it's be great to automate them. I'm happy to try and give this a go as a PR, but thought it might be worth bringing it up first.
yindo added the discussion label 2026-02-16 17:35:18 -05:00
yindo closed this issue 2026-02-16 17:35:18 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Oct 30, 2025):

This issue might be a duplicate of existing issues. Please check:

  • #1398: Requests exposing TUI slash commands (like /init, /compact) to CLI, specifically mentioning using 'opencode run' from another app
  • #2330: Requested running commands directly from CLI with --command flag (closed, but similar concept)

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Oct 30, 2025): This issue might be a duplicate of existing issues. Please check: - #1398: Requests exposing TUI slash commands (like /init, /compact) to CLI, specifically mentioning using 'opencode run' from another app - #2330: Requested running commands directly from CLI with --command flag (closed, but similar concept) Feel free to ignore if none of these address your specific case.
Author
Owner

@rstacruz commented on GitHub (Oct 30, 2025):

Oof - this might already be available! https://github.com/sst/opencode/pull/2348

@rstacruz commented on GitHub (Oct 30, 2025): Oof - this might already be available! https://github.com/sst/opencode/pull/2348
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#2357