Foyer Docs

CLI reference

Local pre-PR review with @getfoyer/cli.

@getfoyer/cli runs the same verification locally that the Foyer GitHub App runs on PRs. Catch failures before you push.

Install

npm i -g @getfoyer/cli
foyer login

foyer login opens a browser and authenticates via RFC 8628 device-code flow. No token copy-paste.

Verify

foyer status

Prints your org, scopes, and token expiry. Exits 0 on a valid token, 2 if the token is missing or rejected.

Common commands

foyer review                     # review HEAD vs main
foyer review --since origin/main # review against a different base
foyer review --linear ENG-123    # pull intent from a Linear issue
foyer plan save                  # save the approved plan-mode plan
foyer logout                     # clear saved credentials

Run foyer --help for the full command list against your installed version.

Where the credentials live

After foyer login, the token is stored at ~/.foyer/credentials as JSON:

{ "token": "...", "expires_at": "..." }

If you need the raw token (for example, to wire it into an MCP server), read it with jq so trailing newlines don't sneak in:

jq -r .token ~/.foyer/credentials

See the MCP install page for the full pattern.