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 | shOn 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- The CLI shows a short code and opens app.homeport.sh in your browser.
- Check the page shows the same code, then choose Approve.
- 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 (
--nameto 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 whoamisays who you are signed in as.homeport logoutrevokes this device’s session.- No browser on this computer?
--no-browserprints the address to open somewhere else.
Link a folder to an app
homeport linkPick 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 deploydeploy 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
.gitignorefiles. - Files that look like secrets are left out even when git would commit them:
.envand.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.
| Option | What 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-release | Run no release command: none detected, and homeport.yaml’s not run. |
--process name=cmd | Run these processes instead of the saved ones, for this deploy. Repeat it for more. |
--save | Keep the options above for every deploy after this one. |
--unset run|release|processes|octane | Empty a saved setting. Needs --save. |
--team | --app, --env: deploy without a link. |
--detach | Return once the build is queued, without following it. |
--timeout 30m | How long to follow it before giving up. 30 minutes by default. |
--yes | Create the app if the team doesn’t have it, without asking. Needed where there is no terminal, as in CI. |
| Code | Meaning |
|---|---|
| 0 | Live |
| 1 | An error: refused or unreachable |
| 2 | A usage error |
| 3 | Not signed in |
| 4 | The build failed, was canceled or was replaced by a newer one |
| 5 | The release failed |
| 6 | The timeout ran out |
Roll back: rollback
homeport rollback
homeport rollback 3f2a9c1Alone, 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-releaseruns it. --yesdoesn’t ask (needed without a terminal),--detachdoesn’t wait for it, and--timeoutis 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 stagingAn 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| Command | What 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 ROLE | A 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 ls | Every variable the environment gets, by name, never a value, and whether it needs a rebuild. |
env get NAME | A variable’s value as written, or with --resolved as the app gets it, each ${{NAME}} replaced. Never a secret’s. |
env rebuild | Builds the live commit again with the variables as they are now: for a change the build sees. |
env pull | A 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 stagingWrites 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.localis written readable by you alone. Only the keys pulled are replaced, every other line is kept, and it is added to.gitignoreif 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-actionsPrints 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.comFor 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 --remotestatus 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 4000Serves 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 csvLists 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-envsevery environment of the app.--app <name>shows an app’s, every environment of it (--envpicks one), including an app you have deleted.--teamon 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.
| Option | What 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 7d | From 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 50 | How many to show, up to 1,000. |
--json | Print the page as JSON. --cursor with its next reads the page after it. |
--export csv|json | Download 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-planReads 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.