Skip to content

Commit 972db65

Browse files
authored
Standardize CLI workflow identifier terminology to "workflow-id" (#3867)
1 parent 3b7938e commit 972db65

3 files changed

Lines changed: 19 additions & 15 deletions

File tree

cmd/gh-aw/main.go

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,11 @@ var rootCmd = &cobra.Command{
3434
3535
A natural language GitHub Action is a Markdown file checked into the .github/workflows directory of a repository.
3636
The file contains a natural language description of the workflow, which is then compiled into a GitHub Actions workflow file.
37-
The workflow file is then executed by GitHub Actions in response to events in the repository.`,
37+
The workflow file is then executed by GitHub Actions in response to events in the repository.
38+
39+
Note: A workflow-id is the basename of the markdown file without the .md extension.
40+
For example, for 'weekly-research.md', the workflow-id is 'weekly-research'.
41+
This is different from the optional 'name' field in the workflow frontmatter, which sets the display name in GitHub Actions UI.`,
3842
Run: func(cmd *cobra.Command, args []string) {
3943
_ = cmd.Help()
4044
},
@@ -84,9 +88,9 @@ var removeCmd = &cobra.Command{
8488
}
8589

8690
var enableCmd = &cobra.Command{
87-
Use: "enable [workflow-name]...",
91+
Use: "enable [workflow-id]...",
8892
Short: "Enable agentic workflows",
89-
Long: `Enable one or more workflows by name, or all workflows if no names are provided.
93+
Long: `Enable one or more workflows by ID, or all workflows if no IDs are provided.
9094
9195
Examples:
9296
` + constants.CLIExtensionPrefix + ` enable # Enable all workflows
@@ -101,9 +105,9 @@ Examples:
101105
}
102106

103107
var disableCmd = &cobra.Command{
104-
Use: "disable [workflow-name]...",
108+
Use: "disable [workflow-id]...",
105109
Short: "Disable agentic workflows and cancel any in-progress runs",
106-
Long: `Disable one or more workflows by name, or all workflows if no names are provided.
110+
Long: `Disable one or more workflows by ID, or all workflows if no IDs are provided.
107111
108112
Examples:
109113
` + constants.CLIExtensionPrefix + ` disable # Disable all workflows
@@ -192,11 +196,11 @@ Examples:
192196
}
193197

194198
var runCmd = &cobra.Command{
195-
Use: "run <workflow-id-or-name>...",
199+
Use: "run <workflow-id>...",
196200
Short: "Run one or more agentic workflows on GitHub Actions",
197201
Long: `Run one or more agentic workflows on GitHub Actions using the workflow_dispatch trigger.
198202
199-
This command accepts one or more workflow IDs or agentic workflow names.
203+
This command accepts one or more workflow IDs.
200204
The workflows must have been added as actions and compiled.
201205
202206
This command only works with workflows that have workflow_dispatch triggers.

pkg/cli/logs.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ const (
298298
// NewLogsCommand creates the logs command
299299
func NewLogsCommand() *cobra.Command {
300300
logsCmd := &cobra.Command{
301-
Use: "logs [agentic-workflow-id]",
301+
Use: "logs [workflow-id]",
302302
Short: "Download and analyze agentic workflow logs with aggregated metrics",
303303
Long: `Download workflow run logs and artifacts from GitHub Actions for agentic workflows.
304304
@@ -314,12 +314,12 @@ Downloaded artifacts include:
314314
- aw.patch: Git patch of changes made during execution
315315
- workflow-logs/: GitHub Actions workflow run logs (job logs organized in subdirectory)
316316
317-
The agentic-workflow-id is the basename of the markdown file without the .md extension.
317+
The workflow-id is the basename of the markdown file without the .md extension.
318318
For example, for 'weekly-research.md', use 'weekly-research' as the workflow ID.
319319
320320
Examples:
321321
` + constants.CLIExtensionPrefix + ` logs # Download logs for all workflows
322-
` + constants.CLIExtensionPrefix + ` logs weekly-research # Download logs for specific agentic workflow
322+
` + constants.CLIExtensionPrefix + ` logs weekly-research # Download logs for specific workflow
323323
` + constants.CLIExtensionPrefix + ` logs -c 10 # Download last 10 matching runs
324324
` + constants.CLIExtensionPrefix + ` logs --start-date 2024-01-01 # Download all runs after date
325325
` + constants.CLIExtensionPrefix + ` logs --end-date 2024-01-31 # Download all runs before date
@@ -345,8 +345,8 @@ Examples:
345345
Run: func(cmd *cobra.Command, args []string) {
346346
var workflowName string
347347
if len(args) > 0 && args[0] != "" {
348-
// Convert agentic workflow ID to GitHub Actions workflow name
349-
// First try to resolve as an agentic workflow ID
348+
// Convert workflow ID to GitHub Actions workflow name
349+
// First try to resolve as a workflow ID
350350
resolvedName, err := workflow.ResolveWorkflowName(args[0])
351351
if err != nil {
352352
// If that fails, check if it's already a GitHub Actions workflow name
@@ -356,10 +356,10 @@ Examples:
356356
// It's already a valid GitHub Actions workflow name
357357
workflowName = args[0]
358358
} else {
359-
// Neither agentic workflow ID nor valid GitHub Actions workflow name
359+
// Neither workflow ID nor valid GitHub Actions workflow name
360360
fmt.Fprintln(os.Stderr, console.FormatError(console.CompilerError{
361361
Type: "error",
362-
Message: fmt.Sprintf("workflow '%s' not found. Expected either an agentic workflow ID (e.g., 'test-claude') or GitHub Actions workflow name (e.g., 'Test Claude'). Original error: %v", args[0], err),
362+
Message: fmt.Sprintf("workflow '%s' not found. Expected either a workflow ID (e.g., 'test-claude') or GitHub Actions workflow name (e.g., 'Test Claude'). Original error: %v", args[0], err),
363363
}))
364364
os.Exit(1)
365365
}

pkg/cli/update_command.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import (
1818
// NewUpdateCommand creates the update command
1919
func NewUpdateCommand(validateEngine func(string) error) *cobra.Command {
2020
cmd := &cobra.Command{
21-
Use: "update [workflow-name]...",
21+
Use: "update [workflow-id]...",
2222
Short: "Update workflows from their source repositories and check for gh-aw updates",
2323
Long: `Update one or more workflows from their source repositories and check for gh-aw updates.
2424

0 commit comments

Comments
 (0)