|
| 1 | +# Workflows File Format |
| 2 | + |
| 3 | +The workflow file format is a [yaml](https://yaml.org/) file and must have either a `.yml ` or `yaml` extension. If you're new to YAML and want to learn more, see "[Learn YAML in Y minutes](https://learnxinyminutes.com/docs/yaml/)." |
| 4 | + |
| 5 | + |
| 6 | +_Compatibility Note_: Warp is still in Beta and this format is subject to change. |
| 7 | + |
| 8 | +### `name` |
| 9 | +--- |
| 10 | +The name of the Workflow. Required. |
| 11 | + |
| 12 | +### `command` |
| 13 | +---- |
| 14 | +The command that is executed when the Workflow is selected. Required. |
| 15 | + |
| 16 | +### `tags` |
| 17 | +---- |
| 18 | +An array of tags that are useful to categorize the Workflow. Optional. |
| 19 | + |
| 20 | +```yaml |
| 21 | +tags: ["git", "GitHub"] |
| 22 | +``` |
| 23 | +
|
| 24 | +### `description` |
| 25 | +---- |
| 26 | +The description of the Workflow and what it does. Optional. |
| 27 | + |
| 28 | +### `source_url` |
| 29 | +---- |
| 30 | +The URL from where the Workflow was originally generated from. This is surfaced in [commands.dev](https://www.commands.dev/) for attribution purposes. Optional. |
| 31 | + |
| 32 | + |
| 33 | +### `author` |
| 34 | +---- |
| 35 | +The original author of the Workflow. For example, if this workflow was generated from StackOverflow, the `author` would be the `author` of the StackOverflow post. This is surfaced in [commands.dev](https://www.commands.dev/) for attribution purposes. Optional. |
| 36 | + |
| 37 | +### `author_url` |
| 38 | +---- |
| 39 | +The URL of original author of the Workflow. For example, if this workflow was generated from StackOverflow, the `author_url` would be the StackOverflow author's profile page. This is surfaced in [commands.dev](https://www.commands.dev/) for attribution purposes. Optional. |
| 40 | + |
| 41 | +### `shells` |
| 42 | +---- |
| 43 | +The list of shells where this Workflow is valid. If not specified, the Workflow is assumed to be valid in all shells. This must be one of `zsh`, `bash`, or `fish`. |
| 44 | + |
| 45 | + |
| 46 | +## `arguments` |
| 47 | +---- |
| 48 | +A Workflow can have parameterized arguments to specify pieces of the Workflow that need to be filled in by the user. |
| 49 | + |
| 50 | +You can specify which part of the Workflow command maps to an argument by surrounding it with two curly braces (`{{<argument>}}`). |
| 51 | + |
| 52 | +For example the workflow command: |
| 53 | +```bash |
| 54 | +for {{variable} in {{sequence}}}; do |
| 55 | + {{command}} |
| 56 | +done |
| 57 | +``` |
| 58 | +Includes 3 arguments: `variable`, `sequence`, and `command`. |
| 59 | + |
| 60 | +## `arguments.name` |
| 61 | +----- |
| 62 | +The name of the argument. The argument name is used within the command to specify the ranges of the argument. Required. |
| 63 | + |
| 64 | +```yaml |
| 65 | +name: Example workflow |
| 66 | +command: echo {{string}} |
| 67 | +arguments: |
| 68 | + - name: string |
| 69 | + - description: The value to echo |
| 70 | +``` |
| 71 | + |
| 72 | +## `arguments.description` |
| 73 | +----- |
| 74 | +The description of the argument. This is surfaced in both commands.dev and Warp to help users fill in Workflow arguments. Optional |
| 75 | + |
| 76 | +## `arguments.default_value` |
| 77 | +----- |
| 78 | +The default value for the argument. If specified, the `default_value` replaces the argument name within the command. Optional |
0 commit comments