Skip to content
Esc
  • Type what you're looking for in your own words: “Slack”, “503”, “price”.

postship login

Connect the CLI to your account, from the browser.

Updated on 17 September 2026

On this page

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 authorize. The CLI receives an API key in your name — “CLI · <machine>”, visible and revocable in Account → API, expiring after 90 days without use — and writes it to ~/.config/postship/config.json (mode 0600). Ten minutes to do it all; the code is single-use.

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 Account → 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 authorize, 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 (ten minutes), or PostShip unreachable.

Troubleshooting

“This code is no longer valid” in the browser

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

The CLI waits forever

You did not click “Authorize this device”, 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 login — Docs — PostShip