[FEATURE]: Slash command accepts arguments #2170

Open
opened 2026-02-16 17:34:31 -05:00 by yindo · 2 comments
Owner

Originally created by @cvkmohan on GitHub (Oct 18, 2025).

Originally assigned to: @rekram1-node on GitHub.

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

When we create a slash command using markdown format in .opencode/command directory - it should accept and process command line arguments.
For example, I have a feature.md in command directory - I want to call it with /feature org_management - and inside feature.md I would want to use {FEATURE_NAME} as a placeholder and use it across the doc - something like # Feature Implementation: {FEATURE_NAME}

Originally created by @cvkmohan on GitHub (Oct 18, 2025). Originally assigned to: @rekram1-node on GitHub. ### 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 When we create a slash command using markdown format in .opencode/command directory - it should accept and process command line arguments. For example, I have a feature.md in command directory - I want to call it with `/feature org_management` - and inside `feature.md` I would want to use {FEATURE_NAME} as a placeholder and use it across the doc - something like `# Feature Implementation: {FEATURE_NAME}`
Author
Owner

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

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

  • #2226: Similar functionality for command arguments using $ARGUMENTS parsing and named arguments in frontmatter

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

@github-actions[bot] commented on GitHub (Oct 18, 2025): This issue might be a duplicate of existing issues. Please check: - #2226: Similar functionality for command arguments using `$ARGUMENTS` parsing and named arguments in frontmatter Feel free to ignore if none of these address your specific case.
Author
Owner

@rekram1-node commented on GitHub (Oct 19, 2025):

@cvkmohan you can use $ARGUMENTS in your template and they will be replaced

Ex command (hello.md):

why hello there $ARGUMENTS

Example invocation:

/hello Krishnamohan

Output:

why hello  there Krishnamohan

2 things:

  • we are going to add named argument support at some point see #2226
  • I just realized only first mention of $ARGUMENTS is replaced so I will update it to handle all mentions of that and replace all << just merged a pr to address that in next release

Lmk if I misunderstood your issue

@rekram1-node commented on GitHub (Oct 19, 2025): @cvkmohan you can use `$ARGUMENTS` in your template and they will be replaced Ex command (hello.md): ```markdown why hello there $ARGUMENTS ``` Example invocation: ``` /hello Krishnamohan ``` Output: ``` why hello there Krishnamohan ``` 2 things: - we are going to add named argument support at some point see #2226 - I just realized only first mention of $ARGUMENTS is replaced so I will update it to handle all mentions of that and replace all << just merged a pr to address that in next release Lmk if I misunderstood your issue
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#2170