Skip to content

hiraiship deploy

Uploads a directory, builds it, and publishes it to the linked project's production environment.

Terminal
hiraiship deploy [dir] [options]

dir defaults to the current directory.

What it does

  1. Links the directory if it isn't yet: asks which project to deploy to, or creates one. See link.
  2. Packs the directory, leaving out ignored files. See Ignoring files. The upload is limited to 25 MB; above that, the CLI lists the largest files so you can ignore them.
  3. Starts the deployment, recording the current Git commit and its message when the directory is a Git repository.
  4. Follows the build step by step, then prints the URL. See Build logs.

Options

OptionDescription
--project <slug>Deploy to this project, and link the directory to it. Required when there's no terminal to prompt in, like in CI.
--no-waitReturn once the build is started or queued, without following it.
--verbosePrint every log line, not just the steps.
--install-command <command>Install command for this deployment.
--build-command <command>Build command for this deployment.
--output-dir <dir>Output directory for this deployment.
--machine <machine>Build machine for this deployment: standard-1 to standard-4. Also read from HIRAISHIP_MACHINE.
--build-env <KEY=VALUE>A build variable for this deployment, over the project's own. Repeat it for several.
--build-env-file <path>Build variables for this deployment from a .env-format file, read on your machine. --build-env wins over it.

The build options apply to this deployment only, on top of the project's build settings and variables. The global options apply too.

Examples

Deploy the current directory:

Terminal
hiraiship deploy

Deploy a folder you built yourself, as a static site:

Terminal
hiraiship deploy ./dist

Deploy from CI, to a known project, on a bigger machine:

Terminal
HIRAISHIP_TOKEN=hsk_… hiraiship deploy --project my-app --machine standard-2

Build with a different API URL, this once:

Terminal
hiraiship deploy --build-env VITE_API_URL=https://staging-api.example.com

Output

On success, the last lines are the URL and a link to the deployment in the dashboard:

Output
✔ Deployed → https://my-app.hiraiship.app
  Inspect: https://app.hiraiship.com/my-team/my-app/3f6c…

On failure, the CLI prints the last 20 lines of the step that failed, and exits with code 1.

Errors

MessageMeaning
Deployment refused: …A plan limit. The message names it. See Limits.
Your role in … can't deployYou're a viewer in this workspace.
The linked project (…) no longer existsThe link points at a project you can't reach any more. Run hiraiship link --project <slug>.
This directory is not linked to a projectThere's no terminal to prompt in. Pass --project <slug>.
Build machine … refusedYour plan doesn't allow that machine. The message lists those it does.
… is reservedA --build-env key Hiraiship sets itself (HIRAISHIP_*) or the build machine needs (PATH, HOME, the proxy variables).