You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: desktop/src-tauri/src/types/generated/workspace.rs
+83Lines changed: 83 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -122,6 +122,64 @@ impl ExecutableFilter {
122
122
Default::default()
123
123
}
124
124
}
125
+
#[doc = "A map of executable verbs to valid aliases. This allows you to use custom aliases for exec commands in the workspace.\nSetting this will override all of the default flow command aliases. The verbs and its mapped aliases must be valid flow verbs.\n\nIf set to an empty object, verb aliases will be disabled.\n"]
#[doc = " \"description\": \"A map of executable verbs to valid aliases. This allows you to use custom aliases for exec commands in the workspace.\\nSetting this will override all of the default flow command aliases. The verbs and its mapped aliases must be valid flow verbs.\\n\\nIf set to an empty object, verb aliases will be disabled.\\n\","]
#[doc = "Configuration for a workspace in the Flow CLI.\nThis configuration is used to define the settings for a workspace.\nEvery workspace has a workspace config file named `flow.yaml` in the root of the workspace directory.\n"]
Copy file name to clipboardExpand all lines: docs/guide/executable.md
+21Lines changed: 21 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -41,6 +41,27 @@ For instance, `flow test my-app` is equivalent to `flow validate my-app`. This a
41
41
interaction with the CLI, making it easier to remember and use.
42
42
*See the [verb reference](../types/flowfile.md#verb-groups) for a list all verbs and their synonyms.*
43
43
44
+
**Custom Verb Aliases**
45
+
46
+
You can customize which verb aliases are available in your workspace by configuring `verbAliases` in your [workspace configuration](workspace.md#workspace-configuration). This allows you to:
47
+
48
+
-**Use custom aliases**: Define your own preferred aliases for verbs
49
+
-**Disable default aliases**: Set an empty map `{}` to disable all verb aliases
50
+
-**Selective aliases**: Only enable specific aliases for certain verbs
51
+
52
+
```yaml
53
+
# In your workspace flow.yaml
54
+
verbAliases:
55
+
run: ["exec", "start"] # `run` executables can be called with `exec` or `start`
56
+
build: ["compile"] # `build` executables can be called with `compile`
57
+
# No entry for `test` means no aliases for test executables
58
+
59
+
# To disable all verb aliases:
60
+
verbAliases: {}
61
+
```
62
+
63
+
With the above configuration, `flow start my-app` would run a `run` executable, but `flow execute my-app` would fail because `execute` is no longer a valid alias.
64
+
44
65
> [!TIP]
45
66
> Create shell aliases for commonly used verbs to make running executables easier. For example:
Copy file name to clipboardExpand all lines: docs/guide/workspace.md
+21Lines changed: 21 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,6 +18,27 @@ When a workspace is created, a [configuration](#workspace-configuration) file is
18
18
19
19
The workspace configuration file is a YAML file that contains the configuration options for the workspace. This file is located in the root directory of the workspace and is named `flow.yaml`.
20
20
21
+
```yaml
22
+
# Example workspace configuration
23
+
displayName: "My Project"
24
+
description: "A sample Flow workspace"
25
+
descriptionFile: README.md
26
+
tags: ["development", "web"]
27
+
verbAliases:
28
+
run: ["exec", "start"]
29
+
build: ["compile"]
30
+
executables:
31
+
included: ["scripts/", "tools/"]
32
+
excluded: ["node_modules/", ".git/"]
33
+
```
34
+
35
+
**Key Configuration Options:**
36
+
37
+
- **verbAliases**: Customize which verb aliases are available when running executables. Set to `{}` to disable all aliases. See [custom verb aliases](executable.md#custom-verb-aliases) for more details.
38
+
- **executables**: Configure which directories to include or exclude when discovering executables.
39
+
- **displayName**, **description**, and **descriptionFile**: Used in the interactive UI and library views.
40
+
- **tags**: Used for filtering workspaces.
41
+
21
42
For more details about workspace configuration options, see [Workspace](../types/workspace.md).
Copy file name to clipboardExpand all lines: docs/schemas/workspace_schema.json
+13Lines changed: 13 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -32,6 +32,16 @@
32
32
}
33
33
}
34
34
}
35
+
},
36
+
"VerbAliases": {
37
+
"description": "A map of executable verbs to valid aliases. This allows you to use custom aliases for exec commands in the workspace.\nSetting this will override all of the default flow command aliases. The verbs and its mapped aliases must be valid flow verbs.\n\nIf set to an empty object, verb aliases will be disabled.\n",
0 commit comments