Skip to content

CLI

The CLI is the tori.host package. Nothing to install:

Terminal window
npx tori.host

npx tori.host with no arguments is tori deploy for the current project. Command pages under this section are generated from the same catalog as tori --help. Changing a flag description there updates the terminal and this site together. Each generated page names the tori.host package version it matches.

npx tori.host downloads the latest release whenever one is published, so there is nothing to update. A global install (npm install -g tori.host), a tori.host devDependency in a project, and the pnpm dlx and bunx caches stay on the version they installed.

From tori.host 0.11.0, those installs check npm at most once a day for a newer release. If there is one, the next command prints a single line on stderr after its own output, naming the release and the command that upgrades this install: for example npm install -g tori.host@latest for a global install, or npm install -D tori.host@latest for a devDependency. The line appears once per newer release npm reports, however long it is between your commands. The check runs in a separate background process, so it never delays a command or makes it fail; if npm is unreachable, nothing is printed and npm is asked again the next day. It is skipped:

  • under npx tori.host, which has just fetched the latest release;
  • when stderr is not a terminal (piped or redirected output);
  • in CI (the CI environment variable is set);
  • with TORI_NO_UPDATE_CHECK=1;
  • for tori --version and tori mcp.

The answer is cached in ~/.config/tori/update-check.json, next to the saved sign-in.

From 0.11.0, the CLI tells the API its version in the User-Agent header (tori.host/<version> (node/<version>; <platform>)). After a change that older CLIs cannot follow, the API refuses them. The CLI then prints one line with the upgrade command for how you ran it, and exits 1:

✗ tori.host 0.11.0 is too old for this API; upgrade: npm install -g tori.host@latest

Upgrade and run the command again. An MCP server started with tori mcp is refused the same way; restart it from the latest release. Your own scripts and curl calls to the API are never refused for their version.

Download this page as Markdown.