Skip to content

Get started

Most read

The postship command

The official CLI — installs in one line, signs in to your account from the browser, checks a URL, waits for a ship, blocks a merge. One page per command.

Updated on 28 September 2026

On this page

A binary that talks to https://postship.fr/api/v1 the way you would talk to the Overview. Node 18 or newer, no dependency. The npm package is postship, published by PostShip; the GitHub action is titilyonnais/postship-check@v1, public repository github.com/titilyonnais/postship-check. Nothing else comes from us.

Install and sign in

npm i -g postship
postship login

login shows an eight-character code and opens the browser on postship.fr. You check the code is the same, you click “Authorize this terminal”: the CLI receives its key and writes it to ~/.config/postship/config.json (mode 0600, readable by you only). You never see the key, you never paste it anywhere. The link is valid for 10 minutes.

Every connected device shows up in Workspace settings → API, “Connect the CLI” card, with the machine name, its last use and its expiry: a CLI key expires after 90 days without use, and can be revoked at any time. 10 active keys per person and per workspace at most.

Then, in a site's folder:

postship init
postship

init picks the project from the list (arrows, Enter) and writes ./.postship.json — committable, no key in it. postship typed alone opens the full-screen interface: signing in on first launch, then your projects and their incidents, from the keyboard.

Day to day

git push && postship wait --head --notify   # the pushed commit's verdict, as a notification
postship watch --notify                     # every project's incidents, live
postship check example.com                  # one address, one verdict

wait --head waits for the ship of the repository's current commit; watch without a project follows all your active projects and rings when an incident opens or closes. In a terminal, verdicts get their symbol (✓ pass, × fail), the Ship Score its gauge, and a spinner turns while waiting — none of it in CI, in a pipe or with --json.

The interface

Typed alone in a terminal, postship opens a full-screen interface — a window of its own, like vim or htop: what was on screen before comes back untouched when you quit.

On first launch, three questions: how to sign in — with this computer's browser (the /cli/autoriser page shows the code, you authorize), or by pasting an API key created in Workspace settings → API —, the project to show first, and desktop notifications.

Then, two panels: your projects on the left — those with an open incident first —; the chosen project on the right, in five views: Overview, Incidents, Deploys, URLs, Output. The Overview first answers “clear to ship?”, like postship gate: an open incident, a failed last ship or a score below the ./.postship.json threshold block it. Everything is done with the keyboard:

KeyWhat it does
↑ ↓Choose a project
← → or 1 to 5Switch view
TabPick a line of the view (incident, URL, deploy): c checks it alone, o opens it
fFilter projects by name or address
cCheck the project (1 of quota) — the result shows in Output
wWait for the project's next ship
oOpen the page in the browser; s the public status page
rRead again now
dMake it the default project; n: desktop notifications, on or off
/Type a full command — check example.com, wait --head, whoami, logout… — with the list and Tab to complete
?Help
Esc, Ctrl+CCancel what is running, go back; q or Ctrl+C quits

The interface reads your projects every 30 seconds: an incident opening or closing, a ship just checked, show up in the bottom line with a ring, and in the Overview's “This session” feed. Colours follow the terminal's background, light or dark, when it says so; otherwise /theme clair or /theme sombre. update, uninstall and init, typed in the interface, close it and then run in the terminal.

Outside a terminal — a script, a pipe, a CI —, postship without a command shows the help and exits with 2, as before.

In a CI

No browser on a runner: the key comes from a secret, in POSTSHIP_TOKEN. Create it in Workspace settings → API (“Create a key”, psk_…, shown once). It never goes on the command line — the --token flag does not exist, and any token that would leak to the output is masked. Complete workflows are in CI recipes.

What PostShip does

The commands

Every command has its page — options, examples, exit codes, troubleshooting — and postship help <command> says the same in the terminal. postship docs <command> opens the page.

CommandWhat it doesQuota
loginConnects this terminal to the account, from the browser.no
logoutRevokes this device's key and forgets it.no
statusThe dashboard at once: your projects, their open incidents, the last ship.no
checkChecks a URL as after a deploy: table, score, quota. postship check example.com is enough.1 per URL
projectsYour projects, their state, their last run.no
incidentsWhat is down, since when.no
shipThe last production deploy and its score.no
shipsThe last production deploys.no
urlsThe project's monitored URLs.no
waitWaits until the last ship — or yours, --head or --sha — is concluded, then returns its verdict.no
gateOpen incidents + last ship: is production shippable?no
watchOpen incidents live, for one project or all, with a ring on every change.no
openOpens the project in the browser — Overview, incidents, deploys…no
whoamiPlan, month's quota, key.no
doctorNode, network, PostShip reachable, key accepted.no
initWrites ./.postship.json (project, threshold).no
updateUpdates the CLI, with the package manager that installed it.no
uninstallRevokes the key, deletes the configuration, uninstalls the CLI.no
completionCompletion for bash, zsh, fish, PowerShell.no
docsOpens this documentation.no

The project is looked up in order: --project, then ./.postship.json, then POSTSHIP_PROJECT. The key: POSTSHIP_TOKEN first, otherwise the one from postship login. --json writes the raw response, nothing else. Help and errors are in French when LANG starts with fr — or, without LANG (Windows), when the system is in French —, English otherwise; colors are only written to a terminal (NO_COLOR and CI=true respected). Once a day, the CLI mentions a newer version on npm (POSTSHIP_NO_UPDATE_NOTICE=1 to silence it; never in CI nor with --json).

Exit codes

CodeMeaning
0The site (or the read) is good, the threshold is met
1The site has a problem: fail, score below threshold, open incidents with --fail-if-open
2The tool could not tell: key, quota, network, usage, project not found

1 and 2 are not the same thing: a workflow that blocks a merge on the site's state must not block on a PostShip outage.

In GitHub Actions

On GitHub Actions, check writes one ::error annotation per failing check: they show up on the pull request, without any GitHub API. The composite action does the same without installing anything:

- uses: titilyonnais/postship-check@v1
  with:
    url: ${{ steps.preview.outputs.url }}
    token: ${{ secrets.POSTSHIP_TOKEN }}
    min-score: 80

The token is an input of the action, passed from a repository secret: GitHub masks it in the logs, and it never lands in the runner's process list. Production, next, in 2 reads that consume nothing:

postship wait --sha "$GITHUB_SHA" --timeout 600
postship gate --min-score 80

Limits and plans

DiscoverProPro Plus
check per month305003000
Reads (projects, incidents, ship, wait, gate…)unlimitedunlimitedunlimited
Active keys (app and CLI)101010

Beyond that, check is refused (429, exit 2) with the exact count — never a degraded result.

Troubleshooting

“No key: postship login, or set POSTSHIP_TOKEN.”

Neither POSTSHIP_TOKEN in the environment nor a key from postship login. Locally, postship login; in a workflow, env: POSTSHIP_TOKEN: ${{ secrets.POSTSHIP_TOKEN }} on the step.

“Clé d'API invalide ou révoquée. Run postship login again.”

The key is no longer accepted: revoked from Workspace settings → API, or expired after 90 days without use. postship login issues a new one; in a CI, create a key and replace the secret.

“Project not found.”

The API key has no access to this project, or the id is wrong — the answer is the same in both cases, on purpose. postship projects lists what the key can see.

watch refuses to start

CI=true: a watch in a workflow runs for nothing. Use incidents --fail-if-open or gate.

Check from your CI

Check a URL before merging or after a build, with an HTTP call from GitHub Actions or GitLab CI, and fail the step on the verdict or the score.

The GitHub Check arrives after the deploy. The API, for its part, runs when you decide: before a merge, after a build, on a preview. Same engine, same checks, same Ship Score. Nothing to install: an HTTP call with curl, and jq to read the response — both are already on GitHub runners.

The token

Workspace settings → API → Create a key. It's shown only once: PostShip only keeps its fingerprint and can't give it back to you. Lost, you revoke it and mint another one. 10 active keys at most.

Put it in a secret of your CI (GitHub: Settings → Secrets and variables → Actions; GitLab: Settings → CI/CD → Variables, masked and protected). It goes through an environment variable, never as a command argument: CIs mask secrets in logs, but an argument ends up in the runner's process list, where masking doesn't apply.

The call

From a terminal
export POSTSHIP_TOKEN=psk_…

curl -sS -X POST https://postship.fr/api/v1/check \
  -H "Authorization: Bearer $POSTSHIP_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://your-site.com"}'

The response carries outcome (pass or fail), score, reason, checks[] and quota — each field is described in the route reference. Fail your step on an outcome other than pass, or on a score under your threshold.

Exit codes, and why 1 isn't 2

A site that has a problem and a tool that couldn't decide aren't the same thing. A workflow that blocks a merge on the site's state without blocking on a PostShip outage can only tell the difference by the exit code: 1 says “the site has a problem”, 2 says “the check didn't happen” — token refused, quota reached, PostShip unreachable. The script below makes that distinction and applies a minimum score.

One verdict, one threshold, two exit codes
set -u
MIN_SCORE="${MIN_SCORE:-80}"
response=$(curl -sS -w '\n%{http_code}' -X POST https://postship.fr/api/v1/check \
  -H "Authorization: Bearer $POSTSHIP_TOKEN" \
  -H "Content-Type: application/json" \
  -d "{\"url\":\"$URL\"}") || exit 2
status=$(printf '%s' "$response" | tail -n1)
body=$(printf '%s' "$response" | sed '$d')
echo "$body"
if [ "$status" != "200" ]; then
  echo "PostShip couldn't check ($status): $(echo "$body" | jq -r .error)"
  exit 2
fi
outcome=$(echo "$body" | jq -r .outcome)
score=$(echo "$body" | jq -r .score)
if [ "$outcome" != "pass" ]; then
  echo "$body" | jq -r '.checks[] | select(.outcome != "pass") | "\(.label): \(.detail)"'
  exit 1
fi
if [ "$score" -lt "$MIN_SCORE" ]; then
  echo "Ship Score $score under the $MIN_SCORE threshold ($(echo "$body" | jq -r .reason))"
  exit 1
fi
Exit codeMeaning
0Everything passed, and the threshold is met
1A check failed, or the score is under the threshold
2Token refused (401), quota reached (429), URL refused (400), or PostShip unreachable

On GitHub Actions, a code other than 0 fails the step in both cases; add continue-on-error: true on the step and test steps.<id>.outcome if you want to let a code 2 through. The threshold is set with the MIN_SCORE variable — it's the same figure as the GitHub Check's minimum score, applied here before the merge rather than after the deploy.

Quota

CI checks are counted per month and per workspace: 30 on Discover, 500 on Pro, 3000 on Pro Plus. Beyond that, the call is refused (429) with the exact count — never a degraded result: a CI that lies is worse than a CI that breaks. The month's counter is shown in Workspace settings → API. See the plans.

Troubleshooting

Why does the step fail with “Invalid or revoked API token”?

The secret isn't exposed to this job (on GitHub, a workflow triggered by a pull request from a fork has no access to secrets), or the token was revoked. Check the token's last use date in Workspace settings → API.

Why check the preview URL rather than production?

Because it's before the merge that the verdict is useful. GitHub's deployment_status event carries the preview URL in target_url; on Vercel, Netlify or Cloudflare Pages, PostShip can also check previews without going through your CI.

Why does the CI's score differ from my project's?

The CI checks a bare URL, without the payment pages assertions or the site checks. The project, for its part, grades everything it monitors.

CI recipes

Complete workflows to copy — GitHub Actions on a preview and on production, GitLab CI with JUnit, Vercel then wait, the Monday-morning script.

4 situations, 4 ready-made files. Everywhere, the key comes from a secret (POSTSHIP_TOKEN) and the project id from a committed ./.postship.json (postship init) or a POSTSHIP_PROJECT variable. Never a key in clear text, never as an argument.

GitHub Actions: a pull request's preview

Check the preview URL before merging, with a threshold, and see the failures annotated on the pull request. check counts one check per URL toward the quota.

name: PostShip
on: [pull_request]
jobs:
  preview:
    runs-on: ubuntu-latest
    steps:
      - uses: titilyonnais/postship-check@v1
        with:
          url: ${{ steps.preview.outputs.url }}
          token: ${{ secrets.POSTSHIP_TOKEN }}
          min-score: 80

steps.preview.outputs.url is the address your preview deployment step produced (Vercel, Netlify…). Without the action, the same thing in 2 lines:

      - run: npm i -g postship
      - run: postship check --url "${{ steps.preview.outputs.url }}" --min-score 80
        env:
          POSTSHIP_TOKEN: ${{ secrets.POSTSHIP_TOKEN }}

GitHub Actions: production, after a deployment

Wait until PostShip has checked this commit in production, then decide. Nothing is consumed: wait and gate are reads.

  production:
    runs-on: ubuntu-latest
    needs: deploy
    steps:
      - uses: actions/checkout@v4
      - run: npm i -g postship
      - run: postship wait --sha "$GITHUB_SHA" --timeout 600
        env:
          POSTSHIP_TOKEN: ${{ secrets.POSTSHIP_TOKEN }}
      - run: postship gate --min-score 80
        env:
          POSTSHIP_TOKEN: ${{ secrets.POSTSHIP_TOKEN }}

The project comes from the committed ./.postship.json. wait exits 2 if 10 minutes pass without a concluded ship — the job fails, but not because the site is broken: steps.<id>.outcome tells the two apart if you want to let a 2 through.

GitLab CI: the JUnit report

--junit writes a report that GitLab's Tests tab displays, one line per check.

postship:
  image: node:20
  script:
    - npm i -g postship
    - postship check --url "$CI_ENVIRONMENT_URL" --min-score 80 --junit postship.xml
  artifacts:
    when: always
    reports:
      junit: postship.xml

POSTSHIP_TOKEN is a masked and protected CI/CD variable (Settings → CI/CD → Variables).

Vercel from the command line, then wait

A deployment started by hand, and the certainty it was checked before you close the terminal.

vercel deploy --prod
postship wait --head --timeout 600 && postship open

postship open opens the project's Overview in the browser.

The Monday-morning script

A glance at every site without opening the app — and an exit code 1 that can ring something else.

#!/usr/bin/env bash
set -euo pipefail
postship projects --fail-if-red
for id in $(postship projects --json | jq -r '.projects[].id'); do
  postship incidents -p "$id" --fail-if-open
done

See also

The postship command — every command · postship check · postship wait · postship gate · Checking from your CI — the same thing with curl, nothing to install.

postship login

Connect the CLI to your account, from the browser.

Shows an eight-character code and opens postship.fr/cli/autoriser. You sign in (or already are), compare the code with the terminal's, and authorise. The CLI receives an API key in your name — “CLI · <machine>”, visible and revocable in Workspace settings → API, expiring after 90 days without use — and writes it to ~/.config/postship/config.json (mode 0600). 10 minutes to do it all; the code is single-use. In the interface (postship typed alone), two ways to sign in: the browser, or a pasted API key.

This command does not consume the quota: it is a read.

What PostShip does

Usage

postship login [--machine <nom>] [--no-browser]

Options

OptionWhat it does
--machine <nom>This device's name in Workspace settings → API (default: the machine's hostname).
--no-browserDo not open the browser: only print the address and the code, for a remote machine.

Examples

postship login

On your computer: the browser opens, you authorise, done.

postship login --no-browser --machine "serveur de build"

On a server over SSH: paste the address into a browser elsewhere.

Exit codes

0 key received and written · 2 refused, expired (10 minutes), or PostShip unreachable.

Troubleshooting

“This code is no longer valid” in the browser

10 minutes went by, or the code was already used. Run postship login again.

The CLI waits forever

You did not click “Authorize this terminal”, or did it on another account than the one open in the browser. The terminal shows the code: compare.

See also

The postship command — every command, installation and sign-in · CI recipes — complete workflows to copy.

In the terminal, postship help login says the same; postship docs login opens this page.

postship logout

Revoke this device's key and clear the configuration.

The speaking key is revoked on PostShip's side (it disappears from Workspace settings → API), then removed from ~/.config/postship/config.json. A key set in POSTSHIP_TOKEN is left alone: the CLI did not put it there.

This command does not consume the quota: it is a read.

What PostShip does

Usage

postship logout

Options

No option.

Examples

postship logout

Before returning a borrowed computer.

Exit codes

0 signed out · 2 no key, or PostShip unreachable (the local config is cleared anyway).

See also

The postship command — every command, installation and sign-in · CI recipes — complete workflows to copy.

In the terminal, postship help logout says the same; postship docs logout opens this page.

postship status

Account, projects, open incidents and last ship on one screen.

The dashboard, at once, then back to the shell — typed alone, postship opens the full-screen interface, which follows the same things live. Who is speaking (plan, quota, key), each project with its state and number of open incidents, and for the current project — the one in ./.postship.json or --project — open incidents and the last production deploy.

This command does not consume the quota: it is a read.

What PostShip does

Usage

postship status [--project <id>] [--json]

Options

OptionWhat it does
--project, -p <id>The project to detail.
--jsonEverything, raw.

Examples

postship status -p 3f1c…

One project in detail: open incidents and last ship.

postship status --json | jq '.projects[] | select(.openIncidents > 0) | .name'

The projects with an open incident.

Exit codes

0 · 1 an open incident or a failing ship on the current project · 2 token, network.

See also

The postship command — every command, installation and sign-in · CI recipes — complete workflows to copy.

In the terminal, postship help status says the same; postship docs status opens this page.

postship check

Check a URL (or a project's production URL). Counts toward the quota.

The core: the same check PostShip runs after a deploy (the address can be typed alone, without --url or https:// — postship check example.com) — HTTP and assets, indexability, social card, sitemap, certificate, AI visibility — with the same Ship Score. One URL, several, or a project's production URL. Exits 1 when a check fails or the score is below the threshold: that is what blocks a merge.

This command counts toward the month's check quota (one per URL). The other commands are reads, unlimited.

What PostShip does

Usage

postship check [<url>] [--url <https://…>] [--url …] [--project <id>] [--min-score <n>] [--json] [--quiet] [--junit <fichier>] [--github-annotations]

Options

OptionWhat it does
--url <https://…>The address to check, public, https. Repeatable: each URL counts 1 toward the quota.
--project <id>Instead of --url: reads the project's production URL (one free GET /projects call) then checks it.
--min-score <n>Exit 1 when the Ship Score is below this threshold, even if everything passed. Also read from ./.postship.json.
--jsonThe raw server response on stdout, nothing else — for jq or a script.
--quietNothing on stdout when everything passes; failures on stderr.
--junit <fichier>Write a JUnit report (one case per check), for GitLab's Tests tab.
--github-annotationsOne ::error annotation per failure, on the pull request. Automatic when GITHUB_ACTIONS=true; --github-annotations false turns it off.

Examples

postship check example.com

The shortest: one address, one verdict.

postship check --url https://preview-abc.vercel.app --min-score 80

A pull request's preview, with a threshold.

postship check --project 3f1c… --json | jq .score

The project's production, the score alone.

postship check --url https://a.fr --url https://b.fr --quiet

2 sites at once, silent when all is well.

Exit codes

0 everything passed and the threshold is met · 1 a check failed or the score is below the threshold · 2 token, quota (429), refused URL (400), or PostShip unreachable.

Troubleshooting

“Monthly quota reached”

The month's counter is full for your plan (30, 500 or 3000). It resets on the first of the month; reads (projects, incidents, ship, wait, gate) stay unlimited.

The score is fine but the code is 1

A check failed: the table marks it fail. Score and verdict are 2 different things.

See also

The postship command — every command, installation and sign-in · CI recipes — complete workflows to copy.

In the terminal, postship help check says the same; postship docs check opens this page.

postship projects

List your projects and their state.

What your key may see: the projects you own, and those where you are an accepted member. One line per project — short id, name, URL, last run's verdict, when.

This command does not consume the quota: it is a read.

What PostShip does

Usage

postship projects [--json] [--fail-if-red]

Options

OptionWhat it does
--jsonThe raw list.
--fail-if-redExit 1 if at least one project is failing — for a watchdog script.

Examples

postship projects

The table.

postship projects --json | jq -r '.projects[].id'

The ids, for the other commands.

Exit codes

0 · 1 with --fail-if-red when a project is red · 2 token refused or PostShip unreachable.

Troubleshooting

“No project.”

The key belongs to an account without projects, or you are a member of none. Check with postship whoami.

See also

The postship command — every command, installation and sign-in · CI recipes — complete workflows to copy.

In the terminal, postship help projects says the same; postship docs projects opens this page.

postship incidents

What is down on a project, and since when.

The project's URLs whose last verdict is bad — incidents in the app's sense, the raw fact, not what the status page tells. One line per URL: address, check type, verdict, since when.

This command does not consume the quota: it is a read.

What PostShip does

Usage

postship incidents --project <id> [--fail-if-open] [--json]

Options

OptionWhat it does
--project, -p <id>The project. Or ./.postship.json, or POSTSHIP_PROJECT.
--fail-if-openExit 1 when at least one incident is open.
--jsonThe raw list.

Examples

postship incidents -p 3f1c…

“Nothing open.” or the table.

postship incidents --fail-if-open

In a repo with ./.postship.json: block when something is down.

Exit codes

0 · 1 with --fail-if-open when an incident is open · 2 project not found, token, network.

Troubleshooting

“Project not found.”

The API key has no access to this project, or the id is wrong — the answer is the same in both cases, on purpose.

See also

The postship command — every command, installation and sign-in · CI recipes — complete workflows to copy.

In the terminal, postship help incidents says the same; postship docs incidents opens this page.

postship ship

The last production deployment and its score.

The last tracked production deploy — not a preview — with its origin (vercel, netlify, cloudflare, generic, fingerprint), the commit, the date, the verdict and the Ship Score.

This command does not consume the quota: it is a read.

What PostShip does

Usage

postship ship --project <id> [--require] [--min-score <n>] [--json]

Options

OptionWhat it does
--project, -p <id>The project.
--requireExit 2 when no deploy is tracked — a CI that refuses to merge without proof of a ship.
--min-score <n>Exit 1 when the ship's score is below this threshold.
--jsonThe raw response.

Examples

postship ship -p 3f1c…

One line: origin, commit, date, verdict, score.

postship ship -p 3f1c… --require --min-score 80

In a workflow: production must have a ship, and it must be good.

Exit codes

0 · 1 failing ship or score below threshold · 2 no ship with --require, project not found, token, network.

Troubleshooting

“No production deployment tracked.”

No host is connected on this project, or no release has been seen yet. Project → Settings → Integrations.

See also

The postship command — every command, installation and sign-in · CI recipes — complete workflows to copy.

In the terminal, postship help ship says the same; postship docs ship opens this page.

postship ships

The last production deployments.

The production history, most recent first, for humans: 20 by default, 100 at most. Previews are not in it.

This command does not consume the quota: it is a read.

What PostShip does

Usage

postship ships --project <id> [--limit <n>] [--json]

Options

OptionWhat it does
--project, -p <id>The project.
--limit <n>How many (20 by default, 100 at most).
--jsonThe raw list.

Examples

postship ships -p 3f1c… --limit 5

The last 5.

Exit codes

0 · 2 project not found, token, network.

See also

The postship command — every command, installation and sign-in · CI recipes — complete workflows to copy.

In the terminal, postship help ships says the same; postship docs ships opens this page.

postship urls

The URLs monitored on a project.

The project's detail: its URLs and controls (type, enabled or not, last verdict, last run), its status page, whether it is paused.

This command does not consume the quota: it is a read.

What PostShip does

Usage

postship urls --project <id> [--json]

Options

OptionWhat it does
--project, -p <id>The project.
--jsonThe raw detail.

Examples

postship urls -p 3f1c…

The table of targets.

Exit codes

0 · 2 project not found, token, network.

See also

The postship command — every command, installation and sign-in · CI recipes — complete workflows to copy.

In the terminal, postship help urls says the same; postship docs urls opens this page.

postship wait

Wait until the last ship is concluded (or carries a commit), then return its verdict.

Every 15 seconds, reads the last production ship. As soon as it is concluded — verdict set, score set — the command returns that verdict. With --sha, it waits for that commit's ship, not yesterday's; --head takes the commit of the current git repository — git push && postship wait --head. In a terminal, a spinner shows the wait and the terminal rings at the end. Read only: nothing is consumed.

This command does not consume the quota: it is a read.

What PostShip does

Usage

postship wait --project <id> [--head | --sha <abcdef>] [--timeout <s>] [--min-score <n>] [--notify] [--json]

Options

OptionWhat it does
--project, -p <id>The project.
--headWait for the repository's current commit (git rev-parse HEAD): the one just pushed.
--sha <abcdef>The beginning of the expected commit ($GITHUB_SHA). --sha HEAD equals --head.
--timeout <s>How many seconds to wait at most (600).
--min-score <n>Exit 1 when the ship's score is below this threshold.
--notifyA desktop notification when the ship is concluded (macOS, Windows, Linux with notify-send).
--jsonThe concluded ship's raw response.

Examples

git push && postship wait --head --notify

Day to day: push, move on, the notification tells you whether production is good.

postship wait -p 3f1c… --sha "$GITHUB_SHA" --timeout 600

After vercel deploy, in the same job.

postship wait --min-score 80

With ./.postship.json.

Exit codes

0 concluded and good · 1 failing ship or score below threshold · 2 timed out (could not conclude), project not found, token, network.

Troubleshooting

Timed out while the deploy is live

PostShip did not see this deploy: the host is not connected, or the commit does not match (--sha). Project → Deployments shows what was seen.

“--head: no git repository here”

The command runs outside a repository, or git is not installed. Run it from the project folder, or pass --sha.

See also

The postship command — every command, installation and sign-in · CI recipes — complete workflows to copy.

In the terminal, postship help wait says the same; postship docs wait opens this page.

postship gate

Open incidents + last ship: is production shippable? No quota.

One line in the workflow that answers “is current production shippable?”: exits 1 when an incident is open, 2 when no ship is tracked, otherwise the last ship's verdict (with the threshold). It is incidents --fail-if-open plus ship --require --min-score in one call, without burning quota.

This command does not consume the quota: it is a read.

What PostShip does

Usage

postship gate --project <id> [--min-score <n>] [--json]

Options

OptionWhat it does
--project, -p <id>The project.
--min-score <n>The ship's threshold.
--jsonIncidents and ship, raw.

Examples

postship gate -p 3f1c… --min-score 80

Before merging into main.

Exit codes

0 nothing open, good ship · 1 open incident, failing ship or below threshold · 2 no ship, project not found, token, network.

See also

The postship command — every command, installation and sign-in · CI recipes — complete workflows to copy.

In the terminal, postship help gate says the same; postship docs gate opens this page.

postship watch

Open incidents live, with a ring on every change. Terminal only.

The open incidents table, redrawn every 30 seconds until Ctrl+C — for one project, or all your active projects when none is chosen. When an incident opens or closes, the terminal rings and the line joins the session feed under the table; --notify also sends a desktop notification. Something to leave open in a tab. Refused when CI=true: a watch in a workflow runs for nothing — use incidents --fail-if-open or gate.

This command does not consume the quota: it is a read.

What PostShip does

Usage

postship watch [--project <id>] [--interval <s>] [--notify]

Options

OptionWhat it does
--project, -p <id>A single project (otherwise: all active projects, 20 at most).
--interval <s>How often to read again, in seconds (30 by default, 15 at least).
--notifyA desktop notification for every incident opened or resolved.

Examples

postship watch --notify

Every project, all day, in a tab.

postship watch -p 3f1c… --interval 15

During a delicate release.

Exit codes

0 on Ctrl+C · 2 CI=true, no terminal, project not found, token, network (on the first read; afterwards, an outage is shown without quitting).

Troubleshooting

No desktop notification

On Linux, install notify-send (libnotify); on Windows and macOS, check that the terminal's notifications are not muted. The terminal ring always goes off.

See also

The postship command — every command, installation and sign-in · CI recipes — complete workflows to copy.

In the terminal, postship help watch says the same; postship docs watch opens this page.

postship open

Open the project in the browser.

The current project's Overview in the browser — or a named page: incidents, deploys, urls, performance, reglages. Without a project, the app.

This command does not consume the quota: it is a read.

What PostShip does

Usage

postship open [--project <id>] [apercu|incidents|deploys|urls|performance|reglages]

Options

OptionWhat it does
--project, -p <id>The project.

postship open pages: apercu, incidents, deploys, urls, performance, reglages.

Examples

postship open

The Overview.

postship open incidents -p 3f1c…

This project's incidents.

Exit codes

0 · 2 project not found, or no browser to launch (the address is printed).

Troubleshooting

Over SSH, or in a script, I just want the address.

POSTSHIP_NO_BROWSER=1: the address is printed, nothing is launched, exit 0. The same variable applies to login (the link is printed) and docs.

See also

The postship command — every command, installation and sign-in · CI recipes — complete workflows to copy.

In the terminal, postship help open says the same; postship docs open opens this page.

postship whoami

The current plan, quota and key.

Who is speaking: the account's plan, this month's check quota (used, limit, remaining), and the key — its prefix, name, last use. Nothing of the account itself.

This command does not consume the quota: it is a read.

What PostShip does

Usage

postship whoami [--json]

Options

OptionWhat it does
--jsonRaw.

Examples

postship whoami

“plan pro · quota 12/500 · token psk_ab12cd…”

Exit codes

0 · 2 token refused or network.

See also

The postship command — every command, installation and sign-in · CI recipes — complete workflows to copy.

In the terminal, postship help whoami says the same; postship docs whoami opens this page.

postship doctor

Node, network, PostShip reachable, key accepted.

4 lines: the Node version (18 or newer), fetch, PostShip reachable (a 401 without a key is a good sign), and if a key is set, whether it is accepted and how many projects it reads. Never calls /check.

This command does not consume the quota: it is a read.

What PostShip does

Usage

postship doctor

Options

No option.

Examples

postship doctor

Before opening a ticket.

Exit codes

0 all good · 2 something is wrong (says which).

See also

The postship command — every command, installation and sign-in · CI recipes — complete workflows to copy.

In the terminal, postship help doctor says the same; postship docs doctor opens this page.

postship init

Write ./.postship.json: the project and the threshold. Never the key.

In a terminal, lists your projects and lets you pick with the keyboard; otherwise takes --project. Writes ./.postship.json — committable — with the project and the threshold (80 by default). The key stays in POSTSHIP_TOKEN or ~/.config/postship: never in a versioned file.

This command does not consume the quota: it is a read.

What PostShip does

Usage

postship init [--project <id>] [--min-score <n>]

Options

OptionWhat it does
--project <id>The project, skipping the list.
--min-score <n>The threshold to write (80).

Examples

postship init

Pick from the list, arrows and Enter.

postship init --project 3f1c… --min-score 90

No question asked, for a script.

Exit codes

0 file written · 2 no terminal and no --project, invalid id, token, network.

See also

The postship command — every command, installation and sign-in · CI recipes — complete workflows to copy.

In the terminal, postship help init says the same; postship docs init opens this page.

postship update

Update the CLI, with the package manager that installed it.

Reads the latest version published on npm and, when it is newer, reinstalls it with the package manager that installed the CLI — npm i -g postship@latest, or its pnpm, yarn or bun equivalent. You stay signed in: the key stays in ~/.config/postship. A CLI run through npx, from source or in the GitHub action is left alone: the command says what to do. From the interface (/update), it closes, the update runs, then run postship again.

This command does not consume the quota: it is a read.

What PostShip does

Usage

postship update [--check]

Options

OptionWhat it does
--checkOnly says whether a newer version exists, without installing anything.

Examples

postship update

The latest version, in one command.

postship update --check

Find out whether there is something new, without changing anything.

Exit codes

0 up to date, or updated · 2 npm registry unreachable, CLI not globally installed, or the package manager failed (permissions).

Troubleshooting

“The update failed” with EACCES

On macOS or Linux, npm's global folder often belongs to root: sudo npm i -g postship@latest, or a Node version manager (nvm, fnm) that installs in your home folder.

See also

The postship command — every command, installation and sign-in · CI recipes — complete workflows to copy.

In the terminal, postship help update says the same; postship docs update opens this page.

postship uninstall

Revoke the key, delete the configuration and uninstall the CLI.

Three steps, in order: this terminal's key is revoked on PostShip (like postship logout), ~/.config/postship is deleted (key, interface settings and history, version cache), then the package is removed with the package manager that installed it. A confirmation is asked in a terminal; --yes for a script. The ./.postship.json files in your repositories and a key set in POSTSHIP_TOKEN are left alone.

This command does not consume the quota: it is a read.

What PostShip does

Usage

postship uninstall [--yes]

Options

OptionWhat it does
--yesWithout confirmation (required outside a terminal).

Examples

postship uninstall

Remove everything, cleanly.

postship uninstall --yes

In a machine clean-up script.

Exit codes

0 uninstalled (or declined at the confirmation) · 2 outside a terminal without --yes, or the package manager failed.

Troubleshooting

“The batch file cannot be found” in cmd.exe

Harmless: cmd.exe reads again the postship.cmd shim that was just removed. PowerShell and Windows Terminal do not show it.

See also

The postship command — every command, installation and sign-in · CI recipes — complete workflows to copy.

In the terminal, postship help uninstall says the same; postship docs uninstall opens this page.

postship completion

Command and option completion for your shell.

Prints the completion script on stdout; source it from your profile. The commands, their options, and postship open's pages.

This command does not consume the quota: it is a read.

What PostShip does

Usage

postship completion bash|zsh|fish|powershell

Options

No option.

Examples

postship completion zsh >> ~/.zshrc

zsh.

postship completion bash >> ~/.bashrc

bash.

postship completion fish > ~/.config/fish/completions/postship.fish

fish.

postship completion powershell >> $PROFILE

PowerShell.

Exit codes

0 · 2 unknown shell.

See also

The postship command — every command, installation and sign-in · CI recipes — complete workflows to copy.

In the terminal, postship help completion says the same; postship docs completion opens this page.

postship docs

Open a command's documentation on postship.fr.

postship.fr/docs/cli, or the given command's page, in the browser. Without a browser, the address is printed.

This command does not consume the quota: it is a read.

What PostShip does

Usage

postship docs [commande]

Options

No option.

Examples

postship docs wait

wait's page.

Exit codes

0 · 2 unknown command.

See also

The postship command — every command, installation and sign-in · CI recipes — complete workflows to copy.

In the terminal, postship help docs says the same; postship docs docs opens this page.