Now open - put your site online for 99¢ a month. Get started
Home/Documentation/Using the CLI

Documentation

Using the CLI

Run npx lemonade-host deploy from your project folder and the site publishes - nothing to install first, and it prints the live URL when it's done.

Quick factsthe numbers
99¢a month
1 GBstorage
250 GBtraffic
99%uptime target

The CLI is one command: npx lemonade-host deploy, run from the folder that holds your finished site. npx fetches it for that single run, so there's nothing to install globally and nothing to add to your project first. This page walks through it step by step; for an overview of the command line route and when to choose it, see the CLI deploy page.

Run it from your project folder

# from your project folder
npx lemonade-host deploy

# point at a specific folder, if it's not the current one
npx lemonade-host deploy --dir dist

Run it from the project root, or use --dir to point at wherever the finished files actually are - a build output folder like /dist or /public, for instance. Whatever folder you point it at is deployed exactly as it stands; the CLI doesn't build anything, it publishes what's already there.

Authenticating with a token

Generate a token from your account and either pass it directly or set it once as an environment variable:

# pass it directly
npx lemonade-host deploy --token lm_xxxxxxxxxxxxxxxx

# or set it once in your shell
export LEMONADE_TOKEN=lm_xxxxxxxxxxxxxxxx
npx lemonade-host deploy

The CLI reads LEMONADE_TOKEN from the environment automatically, so most people set it once and never touch --token again. Like every Lemonade Host token, it's scoped to deploying - publishing a build and checking its status - and can't touch billing or delete the account.

Running it in CI

Add the token as a secret in your CI provider, export it as LEMONADE_TOKEN, and run the same command as a build step:

# example CI step, any provider that runs a shell command
- run: npx lemonade-host deploy --dir dist
  env:
    LEMONADE_TOKEN: $LEMONADE_TOKEN

A deploy triggered from CI works the same as one run from a laptop, so a pipeline firing on every commit still publishes in order.

What it prints

The command prints its progress as it runs - files found, upload size, queue position - and finishes by printing the live URL. That's the signal the deploy is done; there's no dashboard you have to open to confirm it.

Every command and flag, and where to keep the token, is in the help center: publishing from the command line.

Keep reading

Other ways to get files onto a live URL

Put your site online today

A real website for 99¢ a month. Start from a template or bring your own.

Get started