Skip to content
Latchkey

gh workflow list: Usage, Options & Common CI Errors

List the Actions workflows in a repository, with their states and IDs.

gh workflow list shows the workflows defined in a repository - their names, states (active/disabled), and IDs - which you need to dispatch, enable, or disable them.

What it does

gh workflow list enumerates the repository’s workflows. The output gives each workflow’s name, state, and numeric ID; --all includes disabled workflows. The ID or file name is what you pass to gh workflow run, enable, or disable.

Common usage

Terminal
# List active workflows
gh workflow list

# Include disabled workflows
gh workflow list --all

# JSON output for scripting
gh workflow list --json name,id,state --jq '.[] | [.name, .id] | @tsv'

Common error in CI: no workflows / wrong repo context

gh workflow list returns nothing when the repo has no workflows on the default branch, or errors with no repo context outside a clone. Fix: ensure .github/workflows/*.yml exists on the repo’s default branch (the Actions API only sees workflows there), and pass --repo owner/name in CI jobs that run outside a checkout. Use --all to surface disabled workflows you intend to enable. Token needs actions: read.

Key options

OptionPurpose
-a, --allInclude disabled workflows
--json FIELDSOutput JSON with chosen fields
-L, --limitMaximum number to list

Related guides

Run this faster and cheaper on Latchkey managed runners. Start free →