Skip to Content
flowpact

Quickstart

Run flowpact on a repository, read a finding, and check the calls into other repositories.

A few minutes, at the root of a repository with workflows, with Node.js 22 or newer. npx runs flowpact without installing it; to install it, or to start in the editor or in GitHub Actions instead, see Install.

Lint the repository

npx flowpact lint

There is nothing to configure. flowpact reads every workflow and every local action it reaches, and its own files when they exist:

ci.yml
release.yml
actions.lock
action.yml
flowpact.config.yml
remotes.lock.yaml
action.yml
FileWhat it is
.github/workflows/*.ymlYour workflows.
action.ymlYour local actions: under .github/actions/, the repository's own at the root, and any directory a uses: ./path points to.
.github/flowpact/flowpact.config.ymlThe config, when you need one.
.github/flowpact/remotes.lock.yamlThe interfaces of workflows and actions in other repositories (step 4).
.github/flowpact/contracts/Contracts, when you publish workflows.
.github/workflows/actions.lockGitHub's own lockfile, when you have one (what flowpact reads in it).

It always analyzes the whole repository, because most problems span files. A step's ./path is resolved through the job's actions/checkout steps, since it is relative to the runner's workspace. flowpact writes nothing unless you ask it to.

Read a finding

flowpact lint reporting FP401: input config is empty for the windows matrix combination
One matrix entry has no config, so its tests never run.

Each finding shows, top to bottom:

PartMeaning
✖ ERROR FP401 empty-binding-for-matrix-comboThe severity, the rule's stable code and its name.
messageWhat is wrong, in one sentence.
▶ file:line:col and the codeWhere, with the expression underlined.
matrixThe matrix combinations it affects (matrix rules only).
contextRelated places: the call chain from the top-level workflow, the include entry, the input that receives the value.
why / fixWhy it matters, and what to change.
docsThe rule's page (a link in terminals that support them).

The run ends with a summary: counts per severity, the files, jobs and matrix combinations, and the most frequent codes. npx flowpact explain FP401 prints a rule's page in the terminal.

A clean run

flowpact lint on a repository with no findings: the summary says No problems found
No findings: the summary alone, and exit code 0.

The exit code is 0 without errors and 1 with errors (or warnings, with --fail-on warning). See exit codes.

Check the calls into other repositories

A call to a workflow or action in another repository (uses: actions/setup-node@v6) is checked once flowpact knows its interface. Record the interfaces once, and commit the file:

npx flowpact remotes update     # writes .github/flowpact/remotes.lock.yaml
npx flowpact lint

remotes update reads each reference's workflow file or action.yml through the GitHub API, with GH_TOKEN, GITHUB_TOKEN or your gh sign-in (public repositories need none). After it, a call that passes an input the action no longer has is a finding like any other:

✖  ERROR  FP102 unknown-input
  actions/setup-node@v6 has no input "always-auth"

  ▶ .github/workflows/release.yml:10:11
     8 │         with:
     9 │           node-version: 24
    10 │           always-auth: true
       │           ━━━━━━━━━━━

Lint reads only the committed file, so it needs no network. Run remotes update again when you move a reference to another version, or on a schedule: it says what each change does to your calls (When a version changes).

Follow a value

npx flowpact trace pipeline.yml:config            # where does this input go?
npx flowpact trace run-suite.yml:config --up      # where does this value come from?
npx flowpact graph                                # which workflows call which

Follow a value shows how to read the output, and the same flow in the editor.

Narrow it down

npx flowpact lint .github/workflows/release.yml   # report on one file (all is analyzed)
npx flowpact lint --only FP401,FP101              # run some rules
npx flowpact lint --hide-info                     # list errors and warnings only

A first run on a large repository can list many findings: Adopt it in an existing repository says where to start.

Next steps

Install

Install has every way to install flowpact: npm, the GitHub Action, the editor extensions.

Exit codes

The exit codes are listed with the CLI reference.

On this page