[API Feature Request] Set arguments to commands
Describe the feature and the current behavior/state.
Allow passing arguments to commands, similar to what is available for script commands
Will this change the current api? How?
this will be an addition to the current api
Who will benefit with this feature?
Users would be able to provide input to commands in a more convenient and efficient way.
Currently for a command to take user input, it would first render a Form for user to fill out and submit. For simple inputs, rendering a form could be overkill and also more keystrokes are needed from users: type command name -> hit enter to run command -> type input -> hit cmd+enter to submit form
With the ability to provide arguments, it would be simplified to: type command name -> tab and input arguments -> hit enter to run command
Good idea, this ability is very likely will be added at some point.
I want this feature too. I'm building a TLDR extension, providing a rich UI than TLDR script. But extension api can't set argument to the commands like script.
I would love to have this feature, so that commands/extensions (with single parameters) could be used as fallback commands (i.e. as options that are displayed if there isn’t a direct hit).
The currently typed query could be passed directly to the configured fallbacks which could return their first results. Here's a mockup of my idea:

+1
install [extensions url]
npm [got]
weather [P(aris)]
Raycast API-wise I see this as the biggest missing bit of functionality.
I'd find this very valuable. I currently have a script command that I'm migrating to an extension. It's used for checking for open rooms in a shared calendar (ie. in my coworking space) and booking a quick call room if needed.
In the script command, I have an argument for passing how many minutes the room is needed for, but defaults to 30 without an argument. For example, if I need a room for 60 minutes and it's only open for 40, it wouldn't make sense to show that.
With the current extension API, I see three options:
- Default to 30 minutes, but use the search field to search for minutes available.
- This isn't ideal, as the UI convention would be for the user to use the search field to narrow down rooms available.
- Offer multiple commands for multiple time periods (ie. "Check for rooms open in the next 15 minutes", "Check for rooms open in the next 30 minutes", etc.)
- This also isn't ideal, as it lacks customizability and adds unnecessary commands at the root level.
- Default to using a form instead of a list
- This would provide flexibility for time, but add a lot of extra keystrokes. Instead of immediately defaulting to the list of 30 minutes (like I can with the script), the user would always have to go through the action of filling out a form; increasing the amount of time to find an open room by many multiples.
I am looking into building an extension and would need this as well.
I am happy to see it set to "in progress". Is there any ETA for this to ship? A rough one, like in x weeks would be very helpful if possible. 🙏
Shipped!