Skip to content
homeport

Docs · Deploy

The homeport CLI

The homeport command signs in from your terminal, deploys the folder you are in, rolls back, reads logs, sets variables and pulls a database’s credentials for local development. It is also an MCP server for coding agents.

Install

curl -fsSL homeport.sh/install | sh

On macOS you can use Homebrew instead: brew install homeport-sh/tap/homeport. The installer downloads the binary for your system and checks its checksum. homeport version prints the version you have.

Sign in

homeport login
  1. The CLI shows a short code and opens app.homeport.sh in your browser.
  2. Check the page shows the same code, then choose Approve.
  3. The CLI says who it signed in as, and your teams.

A code lasts 10 minutes and works once. If someone sent you a link or asked you for a code, choose Deny: approving would sign their terminal in as you.

  • Each device gets its own session, named after it (--name to choose). They are listed under Account → CLI sessions, where you can revoke any of them.
  • A session ends after 90 days unused, and at most a year after it was made.
  • homeport whoami says who you are signed in as. homeport logout revokes this device’s session.
  • No browser on this computer? --no-browser prints the address to open somewhere else.
homeport link

Pick the team, the app and the environment, or pass --team, --app and --env. The choice is saved in .homeport/link.json, with its own .gitignore, so nothing needs adding to your project. Commands look for it from the current folder up.

An --app the team doesn’t have yet is created, after asking (--yes creates it without asking). An uploaded site, or an app deployed from your own CI, is not deployed from the CLI.

Deploy

homeport deploy

deploy uploads your working tree, meaning what git would commit: tracked files and new ones that are not ignored, uncommitted changes included. homeport builds and releases it exactly as it would a pushed commit, and the CLI follows the build log until the app is live, then prints its address.

  • Outside a git checkout it uploads the folder, honouring its .gitignore files.
  • Files that look like secrets are left out even when git would commit them: .env and .env.* (but not .env.example), *.pem, SSH keys. The CLI says what it left out.
  • The upload may be up to 50 MB on Free, 500 MB on Starter and Growth, and 2 GB on Business. Past 50 MB the CLI warns that build output or dependencies are probably in it.
  • The deploys list shows it as a working tree rather than a commit. A push to the same branch and a CLI deploy replace each other’s queued builds: the newest wins.
homeport deploy options
OptionWhat it does
--run <cmd>Start the app with this command, for this deploy.
--release <cmd>Run this release command, for this deploy. Repeat it for more, run in order.
--no-releaseRun no release command: none detected, and homeport.yaml’s not run.
--process name=cmdRun these processes instead of the saved ones, for this deploy. Repeat it for more.
--saveKeep the options above for every deploy after this one.
--unset run|release|processes|octaneEmpty a saved setting. Needs --save.
--team--app, --env: deploy without a link.
--detachReturn once the build is queued, without following it.
--timeout 30mHow long to follow it before giving up. 30 minutes by default.
--yesCreate the app if the team doesn’t have it, without asking. Needed where there is no terminal, as in CI.
Exit codes
CodeMeaning
0Live
1An error: refused or unreachable
2A usage error
3Not signed in
4The build failed, was canceled or was replaced by a newer one
5The release failed
6The timeout ran out

Roll back: rollback

homeport rollback
homeport rollback 3f2a9c1

Alone, it lists the earlier releases the environment can roll back to, newest first: each one that went live, while its build is kept (30 days). Name one, by its deploy id (or its first 8 characters) or a commit (7 hex characters or more, its newest release), and that build ships again with no new build, as the dashboard’s Roll back to this does. It asks first.

  • Runtime variables and settings stay as they are now. Build variables keep the values it was built with.
  • Its release command is skipped, since migrations go forward: --run-release runs it.
  • --yes doesn’t ask (needed without a terminal), --detach doesn’t wait for it, and --timeout is how long to wait for it to go live (30 minutes by default).

Read logs: logs

homeport logs
homeport logs -f --errors
homeport logs --process worker --env staging

An environment’s runtime logs, what your app printed: its newest lines, up to 500. --follow (or -f) keeps reading what’s new until Ctrl-C. --process shows one process’s lines (web, or a process by name) and --errors errors alone, as the dashboard’s Logs tab does.

Variables: env

homeport env set API_URL=https://api.example.com MAIL_PASSWORD=…
homeport env set VITE_API_URL=https://api.example.com --build
homeport env set TLS_KEY --from-file ./key.pem
homeport env set LOG_LEVEL=debug --for worker
homeport env unset LOG_LEVEL
homeport env ls
homeport env get API_URL --resolved
homeport env rebuild
homeport env commands
CommandWhat it does
env set NAME=value…Sets variables, and waits for the app to restart with them (--no-wait doesn’t). A new value is a secret unless --plain; --secret makes one. Who sees it: --build (its build and the running app), --build-only or --runtime, else what its name says. A name alone with one of those flags changes that alone and keeps the value.
env set NAME --from-file <path>A file variable: the app reads it at /run/secrets/NAME, and $NAME holds that path.
env set NAME=value --for ROLEA value for one part of the app alone: web, release (the release command) or a process’s name. Once for each.
env unset NAME…Removes variables, and the app restarts without them. With --for, that part’s own value alone.
env lsEvery variable the environment gets, by name, never a value, and whether it needs a rebuild.
env get NAMEA variable’s value as written, or with --resolved as the app gets it, each ${{NAME}} replaced. Never a secret’s.
env rebuildBuilds the live commit again with the variables as they are now: for a change the build sees.
env pullA database’s and a bucket’s credentials into .env.local: below.

Each takes --env, and --team with --app, else the folder’s link. See Environments and variables.

Develop against a database: env pull

homeport env pull --env staging

Writes an environment’s database and storage credentials (DATABASE_URL and its parts, the AWS_ keys and the bucket) into .env.local, so you can run your app locally against them.

  • Never production’s. There is no flag to ask for it. A database that production shares with another environment counts as production’s, and the CLI says which variables it held back.
  • Never your app’s own variables. Those stay write-only. Only what a database or bucket set is pulled.
  • .env.local is written readable by you alone. Only the keys pulled are replaced, every other line is kept, and it is added to .gitignore if nothing there covers it. Names are printed, never values.
  • Each pull is recorded for your team. A CI token cannot pull.

Tokens for CI

homeport token create --name github-actions

Prints a team API token once, for one environment (--team, --app and --env, else the link’s), with every app permission there. Set it as HOMEPORT_TOKEN in your CI and homeport deploy runs there without a sign-in. It is listed and revoked on the team’s API tokens page, and it cannot make tokens of its own. To deploy a binary your CI built, see Deploy from your own CI.

Platform domains: domains

homeport domains ls
homeport domains add shop.customer.com
homeport domains get shop.customer.com
homeport domains remove shop.customer.com

For a platform: its customers’ own domains, which your app adds through the Domains API. ls lists the app’s own domains, then every platform domain with its status and why it isn’t live, and how many the bill counts. add adds one and prints the DNS records to set; a root domain’s www. comes with it, redirecting to it and not billed, unless --no-www. get shows one’s status and records. remove stops serving it, and asks first (--yes doesn’t).

domains connect <domain> opens its DNS provider’s page to set its records in one sign-in there, and domains proxy <domain> on|off puts one of the app’s own live domains behind its DNS provider’s proxy or takes it out. Both print the link instead with --no-browser.

Background jobs: queue

homeport queue status
homeport queue drain --remote
homeport queue retry-failed --remote

status says how the environment’s background jobs run, what the last drain said is waiting, and its recent drains. drain and retry-failed run the app’s own drain or retry command here, with its .env; with --remote they start one on homeport.

Develop an api/ folder: dev

homeport dev
homeport dev --port 4000

Serves the folder’s api/ handlers on port 3000 (or --port) as a deploy builds them, reloading as you edit them, and prints the line that sends your frontend’s /api to it. It serves the API alone: run your frontend’s own dev server beside it. It needs Bun.

See who changed what: audit

homeport audit
homeport audit --app blog --actor github-actions
homeport audit --team acme --kind people --since 7d
homeport audit --team acme --export csv

Lists your team’s activity, newest first: who did what, to which app, and from where (the dashboard, the CLI or the API). Each line reads as a sentence, such as “Ana ([email protected]) removed member [email protected]”. It is the same record as Settings → Activity in the dashboard.

  • In a linked folder it shows that environment’s activity: --env <name> shows another environment’s, and --all-envs every environment of the app. --app <name> shows an app’s, every environment of it (--env picks one), including an app you have deleted. --team on its own, or a folder that is not linked, shows the whole team’s.
  • Only the team’s owner can read it, or a team API token with the Read activity permission (audit:read). That permission reads the whole team’s activity, and is enough to name an app, an environment or a token: it needs no other permission.
  • It goes back as far as your plan keeps activity.
homeport audit options
OptionWhat it does
--actor <who>A person’s email, an API token’s name, support (Homeport support) or homeport (homeport itself). If two tokens share a name, it says so and lists them.
--kind <kind>people, access, billing, apps, data, domains, jobs, support or homeport.
--since 7dFrom a time (2026-11-15T09:00:00Z), a day (2026-11-15, UTC) or an age (12h, 7d).
--until <when>To a time, a day or an age. A day includes that day.
--limit 50How many to show, up to 1,000.
--jsonPrint the page as JSON. --cursor with its next reads the page after it.
--export csv|jsonDownload every entry that matches, up to 100,000, to activity-<date>.csv (or .json): the same file as the dashboard’s Activity export. It never overwrites a file. If it stops at 100,000, it says so, and which --until gets the older ones.
--output <file>Where --export writes. - prints it.
--team--app, --env, --all-envs: choose whose activity.

See what a build will do

homeport build-plan

Reads the folder and prints, as JSON, how homeport will build it: the same detection the builders run. It needs no sign-in. See What homeport detects.