tori login
sign in through the browser and save the token
npx tori.host loginOpen 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.
Options
Section titled “Options”--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)
Environment
Section titled “Environment”TORI_TOKEN— API token (overrides the config file; for CI)TORI_API_URL(default: https://api.tori.host) — API base URLBROWSER— command used to open the browser; none = neverTORI_LOGIN_TIMEOUT_MS(default: 5m) — how long to wait for sign-in
Examples
Section titled “Examples”Sign in
Section titled “Sign in”npx tori.host loginSign in from a machine with no browser
Section titled “Sign in from a machine with no browser”npx tori.host login --no-browserThis reference matches tori.host@0.16.4.
Download this page as Markdown.