Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions docs/src/content/docs/setup/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -517,6 +517,19 @@ gh aw logs --format markdown --repo owner/repo --count 10 # Specify repository
See [Audit Commands](/gh-aw/reference/audit/) for the full reference.
:::

#### `outcomes`

Check what happened to a workflow run's safe outputs (accepted, rejected, ignored, or pending).

```bash wrap
gh aw outcomes 1234567890 # Check outcomes for a specific run
gh aw outcomes 1234567890 --json # JSON output
gh aw outcomes 1234567890 --repo owner/repo # Specify repository
gh aw outcomes 1234567890 --outcomes-dir ./otlp # Write outcome JSONL for OTLP export
```

**Options:** `--json/-j`, `--repo/-r`, `--output/-o`, `--outcomes-dir`

#### `health`

Display workflow health metrics and success rates.
Expand Down Expand Up @@ -731,11 +744,13 @@ Create a new GitHub Project V2 owned by a user or organization with optional rep
gh aw project new "My Project" --owner @me # Create user project
gh aw project new "Team Board" --owner myorg # Create org project
gh aw project new "Bugs" --owner myorg --link myorg/myrepo # Create and link to repo
gh aw project new "Project Q1" --owner myorg --with-project-setup # Create with standard views and fields
```

**Options:**
- `--owner` (required): Project owner - use `@me` for current user or specify organization name
- `--link`: Repository to link project to (format: `owner/repo`)
- `--with-project-setup`: Create standard project views and custom fields

**Token Requirements:**

Expand Down
6 changes: 3 additions & 3 deletions pkg/cli/forecast_command.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ func NewForecastCommand() *cobra.Command {
recent run history and projecting forward on a per-week or per-month basis.

The forecaster downloads a sample of recent completed workflow runs and derives
per-run metrics (effective tokens, duration, success rate). When runs have been
previously processed by 'gh aw logs', cached token-usage data is used. The
per-run metrics (effective tokens, duration, success rate). When runs have been
previously processed by 'gh aw logs', cached token-usage data is used. The
observed run frequency is then projected to the target period using a Monte Carlo
simulation that models three sources of uncertainty: run count (Poisson), per-run
token usage (bootstrap resampling), and per-run success (Bernoulli).
Expand All @@ -57,7 +57,7 @@ Backtesting (--eval):
Shifts the training window back by one projection period, builds the forecast,
then measures actual runs in that period and computes quality metrics:
P50 absolute/percentage error and whether the actual value fell inside the
P10–P90 confidence interval. Use this to validate the model before relying on
P10–P90 confidence interval. Use this to validate the model before relying on
forward projections.

` + WorkflowIDExplanation + `
Expand Down
3 changes: 3 additions & 0 deletions pkg/cli/forecast_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ func TestNewForecastCommand_DaysFlagDocumentsAllowedValues(t *testing.T) {
daysFlag := cmd.Flags().Lookup("days")
require.NotNil(t, daysFlag, "forecast command should register --days")
assert.Equal(t, "Historical window in days to sample run history (allowed values: 7, 30)", daysFlag.Usage)
assert.NotContains(t, cmd.Long, "). When runs have been", "Long description should not contain duplicate spacing")
assert.NotContains(t, cmd.Long, "used. The", "Long description should not contain duplicate spacing")
assert.NotContains(t, cmd.Long, "interval. Use this", "Long description should not contain duplicate spacing")
}

// ── Duration enrichment ───────────────────────────────────────────────────────
Expand Down
2 changes: 1 addition & 1 deletion pkg/cli/mcp_server_command.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ an HTTP server with SSE (Server-Sent Events) transport instead.
Examples:
gh aw mcp-server # Run with stdio transport (default for MCP clients)
gh aw mcp-server --validate-actor # Run with actor validation enforced
gh aw mcp-server --port 8080 # Run HTTP server on port 8080 (for web-based clients)
gh aw mcp-server --port 8080 # Run HTTP server on port 8080 with SSE transport (for web-based clients)
gh aw mcp-server --cmd ./gh-aw # Use custom gh-aw binary path
GITHUB_ACTOR=octocat gh aw mcp-server # Set actor via environment variable for access control
DEBUG=mcp:* GITHUB_ACTOR=octocat gh aw mcp-server # Run with verbose debug logging and actor set via environment variable`,
Expand Down
17 changes: 17 additions & 0 deletions pkg/cli/mcp_server_command_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
//go:build !integration

package cli

import (
"testing"

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)

func TestNewMCPServerCommand_PortExampleMentionsSSE(t *testing.T) {
cmd := NewMCPServerCommand()
require.NotNil(t, cmd)

assert.Contains(t, cmd.Long, "Run HTTP server on port 8080 with SSE transport", "Port example should match SSE transport behavior")
}
2 changes: 1 addition & 1 deletion pkg/cli/project_command.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ The project can optionally be linked to a specific repository.

Authentication Requirements:
The default GITHUB_TOKEN cannot create projects. You must use additional authentication.
See https://github.github.io/gh-aw/reference/auth-projects/.
See https://github.github.com/gh-aw/reference/auth-projects/.

Project Setup:
Use --with-project-setup to automatically create:
Expand Down
2 changes: 2 additions & 0 deletions pkg/cli/project_command_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ func TestNewProjectNewCommand(t *testing.T) {
require.NotNil(t, cmd, "Command should be created")
assert.Equal(t, "new <title>", cmd.Use, "Command usage should be 'new <title>'")
assert.Contains(t, cmd.Short, "Create a new GitHub Project V2 board", "Short description should mention board creation")
assert.Contains(t, cmd.Long, "https://github.github.com/gh-aw/reference/auth-projects/", "Long description should reference the configured docs host")
assert.NotContains(t, cmd.Long, "https://github.github.io/gh-aw/reference/auth-projects/", "Long description should not reference the old docs host")

// Check flags
ownerFlag := cmd.Flags().Lookup("owner")
Expand Down