Skip to content
homeport

Docs · Deploy

The homeport CLI

The homeport command signs in from your terminal, deploys the folder you are in, 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.

The app is one you created in the dashboard from a repository. 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.
--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.
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

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 token once. Set it as HOMEPORT_TOKEN in your CI and homeport deploy runs there without a sign-in. It is listed and revoked under Account → CLI sessions like any session, and it cannot make tokens of its own. To deploy a binary your CI built, see Deploy from your own CI.

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.