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
{{ message }}
Repository navigation
Commit 8dcc371
Browse filesBrowse the repository at this point in the historyBrowse files
Two flags control the workflow directory location, with different purposes:
471
-
- `--dir` (`-d`): overrides the **local** workflow directory. Applies only when `--repo` is not set.
472
-
- `--path`: specifies the workflow directory path in a **remote** repository. Use together with `--repo`.
470
+
`--dir`(`-d`) overrides the local workflow directory and applies only when `--repo` is not set. `--path` specifies the workflow directory in a remote repository and is used with `--repo`.
473
471
474
-
Fast enumeration without GitHub API queries. For detailed status including enabled/disabled state and run information, use `status` instead.
472
+
`list`enumerates workflows locally without GitHub API queries. For enabled/disabled state and run information, use `status` instead.
475
473
476
474
For local workflows, `compiled` is `Yes` when the source frontmatter matches the generated `.lock.yml`, `No` when the hashes differ, and `N/A` when the lock file is missing. JSON output is a top-level array with one object per workflow and the same values in each object's `compiled` field. Use `--stale` to inspect only stale or missing lock files:
477
475
@@ -521,7 +519,7 @@ To diagnose an actual download failure, enable the logs API and download debug n
521
519
DEBUG=cli:logs_github_api,cli:logs_download gh aw logs --verbose --json
522
520
```
523
521
524
-
**Workflow name matching**: The logs command accepts both workflow IDs (kebab-case filename without `.md`, e.g., `ci-failure-doctor`) and display names (from frontmatter, e.g., `CI Failure Doctor`). Matching is case-insensitive for convenience:
522
+
`logs`accepts both workflow IDs (kebab-case filename without `.md`, for example `ci-failure-doctor`) and display names from frontmatter (for example `CI Failure Doctor`); matching is case-insensitive.
525
523
526
524
```bash wrap
527
525
gh aw logs ci-failure-doctor # Workflow ID
@@ -530,7 +528,7 @@ gh aw logs "CI Failure Doctor" # Display name
530
528
gh aw logs "ci failure doctor" # Case-insensitive display name
531
529
```
532
530
533
-
**`--cache-before` flag (cache cleanup):** Deletes cached run folders in the output directory whose run creation date is older than the specified cutoff. Accepts the same date/time delta formats as `--start-date` and `--end-date` (e.g. `-1d`, `-1w`, `-1mo`) as well as absolute dates (`YYYY-MM-DD`). Cleanup runs before the download step to free disk space first; failures are non-fatal and logged as warnings. The previous `--after` spelling is kept as a hidden, deprecated alias.
531
+
`--cache-before`deletes cached `run-{ID}` folders older than a cutoff before downloading. It accepts the same relative and absolute dateformats as `--start-date` and `--end-date`; the deprecated hidden alias `--after` still works. The command reads the run creation time from `run_summary.json` when present, otherwise it falls back to the directory modification time.
534
532
535
533
```bash wrap
536
534
gh aw logs --cache-before -1w # Evict local cache older than 1 week, then proceed with normal run download
@@ -539,16 +537,14 @@ gh aw logs --cache-before 2024-01-01 # Evict local cache entries
539
537
gh aw logs my-workflow --cache-before -1mo -c 20 # Evict local cache older than 1 month, then download 20 runs of a specific workflow
540
538
```
541
539
542
-
Only directories matching the `run-{ID}` naming pattern inside the output directory are considered. The run's creation timestamp is read from `run_summary.json` inside each folder; if that file is absent (e.g., incomplete download), the directory's modification time is used as a fallback.
543
-
544
-
**`--train` flag:** Trains log template weights from the downloaded runs and writes `drain3_weights.json` to the logs output directory. The trained weights improve anomaly detection accuracy in subsequent `gh aw audit` and `gh aw logs` runs. To embed weights into the binary as defaults, copy the file to `pkg/agentdrain/data/default_weights.json` and rebuild.
540
+
`--train`writes `drain3_weights.json` to the logs output directory using downloaded runs. Those weights improve anomaly detection in later `gh aw audit` and `gh aw logs` runs. To embed them as defaults, copy the file to `pkg/agentdrain/data/default_weights.json` and rebuild.
545
541
546
542
```bash wrap
547
543
gh aw logs --train # Train on last 10 runs
548
544
gh aw logs my-workflow --train -c 50 # Train on up to 50 runs of a specific workflow
549
545
```
550
546
551
-
**`--stdin` flag:** Reads run IDs or URLs from stdin (one per line) instead of discovering runs from the GitHub API. Mutually exclusive with the workflow-name positional argument. Date, count, and workflow-name filters are ignored when `--stdin` is set; content filters (`--engine`, `--firewall`, `--safe-output`, etc.) still apply. Blank lines and `#`-prefixed comment lines are ignored. Bare numeric IDs require `--repo owner/repo` because they carry no embedded repo context. Full run URLs are self-contained and do not require `--repo`.
547
+
`--stdin`reads run IDs or URLs from standard input, one per line, instead of discovering runs from the GitHub API. It cannot be combined with a workflow-name positional argument. Date, count, and workflow-name filters are ignored in this mode, but content filters such as `--engine`, `--firewall`, and `--safe-output`still apply. Blank lines and `#` comments are ignored. Bare numeric IDs require `--repo owner/repo`; full run URLs do not.
Org mode (`--org`) previews or creates workflow update pull requests across every repository in an organization. Use `--repos` to limit org mode to repositories matching one or more glob patterns, `--create-issue` to open an issue in each repository that has pending updates (requires `--org`), and `--yes/-y` to auto-accept per-repository confirmations (required in CI).
829
-
830
-
The `--no-redirect` flag causes `update` to fail when the source workflow has a [`redirect`](/gh-aw/reference/frontmatter/) field, rather than following the redirect to its new location. Use this when you want explicit control over redirect handling.
824
+
Org mode (`--org`) previews or creates workflow update pull requests across every repository in an organization. Use `--repos` to limit matches, `--create-issue` to open an issue in each repository with pending updates, and `--yes/-y` to auto-accept per-repository confirmations in CI.
831
825
832
-
The `--repo/-r` flag runs the update against a different repository. The target repository is checked out in an isolated shallow clone under `.github/aw/updates/<sanitized-repo-id>`. When combined with `--create-pull-request`, the resulting PR is opened against the target repository instead of the current one.
826
+
`--no-redirect`makes `update` fail when the source workflow has a [`redirect`](/gh-aw/reference/frontmatter/) field instead of following it. `--repo/-r` runs the update against a different repository by checking out an isolated shallow clone under `.github/aw/updates/<sanitized-repo-id>`; with `--create-pull-request`, the PR targets that repository instead of the current one.
833
827
834
828
#### `deploy`
835
829
@@ -1077,7 +1071,7 @@ gh aw logs workflow --repo github.enterprise.com/owner/repo # Use with comm
1077
1071
1078
1072
For GHE Cloud with data residency (`*.ghe.com`), see the dedicated [Debugging GHE Cloud guide](/gh-aw/troubleshooting/debug-ghe/).
1079
1073
1080
-
Commands that support `--create-pull-request` — including `gh aw add`, `gh aw init`, `gh aw update`, and `gh aw upgrade` — automatically detect the enterprise host from the git remote and route PR creation to the correct GHES instance. `gh aw audit` and `gh aw add-wizard` do the same, so running them inside a GHES repository usually does not require setting `GH_HOST` manually.
1074
+
Commands that support `--create-pull-request`, including `gh aw add`, `gh aw init`, `gh aw update`, and `gh aw upgrade`, auto-detect the enterprise host from the git remote and route PR creation to the correct GHES instance. `gh aw audit` and `gh aw add-wizard` do the same, so running them inside a GHES repository usually does not require setting `GH_HOST` manually.
1081
1075
1082
1076
#### Configuring `gh` CLI on GHES
1083
1077
@@ -1108,29 +1102,29 @@ The setup action installs the script at `/opt/gh-aw/actions/configure_gh_for_ghe
1108
1102
1109
1103
## Debug Logging
1110
1104
1111
-
Enable detailed debugging with namespace, message, and time diffs.
1105
+
Enable detailed debugging with namespace, message, and time diffs:
1112
1106
1113
1107
```bash wrap
1114
1108
DEBUG=* gh aw compile # All logs
1115
1109
DEBUG=cli:* gh aw compile # CLI only
1116
1110
DEBUG=*,-tests gh aw compile # All except tests
1117
1111
```
1118
1112
1119
-
Use `--verbose` flag for user-facing details.
1113
+
Use `--verbose` for user-facing detail.
1120
1114
1121
1115
## Smart Features
1122
1116
1123
1117
### Fuzzy Workflow Name Matching
1124
1118
1125
-
Auto-suggests similar workflow names on typos using Levenshtein distance.
1119
+
Typos in workflow names trigger suggestions based on Levenshtein distance.
1126
1120
1127
1121
```bash wrap
1128
1122
gh aw compile audti-workflows
1129
1123
# ✗ workflow file not found
1130
1124
# Did you mean: audit-workflows?
1131
1125
```
1132
1126
1133
-
Works with: compile, enable, disable, logs, mcp commands.
1127
+
Supported in `compile`, `enable`, `disable`, `logs`, and `mcp` commands.
1134
1128
1135
1129
## Troubleshooting
1136
1130
@@ -1147,9 +1141,9 @@ See [Common Issues](/gh-aw/troubleshooting/common-issues/) and [Error Reference]
1147
1141
1148
1142
## Learn More
1149
1143
1150
-
- [Quick Start](/gh-aw/setup/quick-start/) - Get your first workflow running
0 commit comments