gh-velocity config preflight#

Analyze a repo and recommend a .gh-velocity.yml configuration

Synopsis#

Preflight queries your repository to build a smart starting configuration.

It inspects:

  • Labels (to detect bug, feature, and status labels)
  • A specific Projects v2 board (to find status fields and lifecycle mapping)
  • Recent merged PRs (to gauge activity and linking patterns)
  • Recent closed issues (to check label usage)

Use --project-url to include a project board in the analysis. Copy the URL from your browser when viewing the project board.

The output is a recommended .gh-velocity.yml with comments explaining each choice. Use --write to save it directly.

gh-velocity config preflight [flags]

Examples#

  # Analyze repo with a project board
  gh velocity config preflight -R owner/repo --project-url https://github.com/orgs/myorg/projects/1

  # Without a project board (label-based analysis only)
  gh velocity config preflight -R cli/cli

  # Write config directly to .gh-velocity.yml
  gh velocity config preflight --write --project-url https://github.com/users/me/projects/3

  # Write config to a custom path
  gh velocity config preflight -R cli/cli --write=output/configs/cli-cli.yml

  # JSON output for tooling
  gh velocity config preflight -R owner/repo -f json

Options#

  -h, --help                                help for preflight
      --project-url string                  Project board URL (e.g., https://github.com/orgs/myorg/projects/1)
      --write string[=".gh-velocity.yml"]   Write config to path (default: .gh-velocity.yml)

Options inherited from parent commands#

      --config string   Path to config file (default: .gh-velocity.yml)
      --debug           Print diagnostic info to stderr
  -f, --format string   Output format: json, pretty, markdown (default "pretty")
      --new-post        Force a new post (skip idempotent update; implies --post)
      --post            Post output to GitHub (dry-run by default; set GH_VELOCITY_POST_LIVE=true for live)
  -R, --repo string     Repository in owner/name format
      --scope string    Additional GitHub search qualifier(s) ANDed with config scope

SEE ALSO#