Skip to content

tori login

sign in through the browser and save the token

npx tori.host login

Open a browser, sign in (or sign up — they are the same click), and save an API token named after this machine to ~/.config/tori/config.json. It shows up in the Console under Settings → API tokens; revoking it there stops this machine deploying.

A link with a short code in it is printed under the browser line. If the browser opened somewhere you are not looking, open the link on any signed-in device, check the code and approve, and the same command continues. Whichever finishes first signs you in, and only one token is saved.

Over SSH, in a container, or with no DISPLAY, the CLI does not open a browser and prints only the link and the code. --no-browser does the same on a machine that does have a browser. BROWSER=none does the same through the environment.

In CI there is nobody to approve a sign-in: set TORI_TOKEN to a token minted in the Console. Mint a deploy token there for a CI secret: it deploys one app and nothing else.

  • --no-browser — do not open a browser; sign in only with a code typed on another device (chosen automatically over SSH or with no DISPLAY)
  • TORI_TOKEN — API token (overrides the config file; for CI)
  • TORI_API_URL (default: https://api.tori.host) — API base URL
  • BROWSER — command used to open the browser; none = never
  • TORI_LOGIN_TIMEOUT_MS (default: 5m) — how long to wait for sign-in
Terminal window
npx tori.host login
Terminal window
npx tori.host login --no-browser

This reference matches tori.host@0.16.4.

Download this page as Markdown.