Infaris

Hosting fromyour terminal.

infaris-guard is the Infaris CLI. One command puts your app online, and everything after that happens in the terminal too: logs, variables, previews and rollbacks. Pleasant for you, and just as pleasant for your CI or an AI agent.

$ npm install -g @infaris/guard-cli
$ infaris-guard login
$ infaris-guard hosting up --server infaris-cloud
$ infaris-guard hosting logs -f
Install, sign in, online.

The everyday commands

In a linked folder you never need --site. Elsewhere --site takes a name, a domain or an id.

CommandWhat it does
hosting upCreates the site if it does not exist yet, builds it and puts it online
hosting link my-shopLinks this folder to an existing site without publishing anything
hosting logs -fFollows the logs until Ctrl+C; with --json one JSON line per log line
hosting env pullWrites the non-secret variables to .env.local, like vercel env pull
hosting env add NAME --value-stdinSets a variable; the value only comes from stdin or a file
hosting promote <previewId>Makes a preview the live release
hosting open --dashboardOpens the site in Guard
hosting commandsEvery command

Local first, no account needed

hosting dev runs the whole stack on your own machine: Postgres with row-level security, sign-in with a local mail inbox, the Data API, Realtime and storage. When it works, dev push creates exactly the same configuration in Hosting.

infaris-guard hosting init --template realtime-todo todo-app --local
cd todo-app && npm install
infaris-guard hosting dev
infaris-guard hosting dev push   # Auth, database, policies, bucket and functions
infaris-guard hosting up

Built for scripts and agents

An AI agent or CI script needs to know for sure whether something worked. So every failure has its own exit code, --json returns a single JSON result, and a mistyped command names the closest one (linkk becomes hosting link) with exit code 2 instead of a silent success.

Exit codeMeaning
2Wrong usage: unknown command or missing flag
3Not signed in
4Not found
5Conflict, already exists
6Forbidden
7Network error or timeout

What hosting up does and does not upload

  • node_modules, .git and .env never go up. Before the upload you see how many files and MB it is.
  • At the root of a monorepo, or in a folder with more than 2,000 files or 200 MB, up asks first. Without a terminal it stops unless you pass --yes.
  • Secrets go in through stdin or a file, never as an argument. That keeps them out of your shell history and out of an AI assistant's transcript.

Questions

Which Node version do I need?
Node 18 or later. Without installing: npx @infaris/guard-cli.
Does it work in GitHub Actions or another CI?
Yes, with a deploy token. Use the site's id in --site then; names and domains only work with a regular sign-in.
Is there tab completion?
Yes, for bash, zsh and fish: infaris-guard completion bash, zsh or fish. New commands work without a new script.
Can I do the same things in a dashboard?
Yes, everything is also in Guard under Hosting. The CLI and the MCP server use the same API.