For developers
Publishing from the command line
One command publishes a folder. The CLI has zero dependencies, so npx downloads one package and runs it.
npx lemonade-host@latest deploy ./dist
lemonade-host, not lemonade. The bare name belongs to somebody else. Installing the wrong one and handing it a deploy token gives a stranger's package your credential.Commands
| Command | What it does |
|---|---|
lemonade deploy [folder] | Zip the folder and publish it. Defaults to your built output. |
lemonade status | The last few deploys for this site. |
lemonade login | Approve this computer in your browser. Nothing to paste. Or --token to save one you made. |
lemonade whoami | Check the token, and which site it reaches. |
Options
| Flag | Meaning |
|---|---|
--token lm_… | A deploy token. Or set LEMONADE_TOKEN. |
--dir FOLDER | Which folder to publish. Same as the positional argument. |
--site st_… | Which site. Only needed if the token reaches more than one. |
--origin URL | Point at another instance, e.g. staging. |
--yes, -y | Do not ask before publishing. Use this in CI. |
--json | Machine-readable output. |
--include-hidden | Publish dotfiles and node_modules too. |
--version, -v | Print the version. |
--help, -h | Usage. |
What gets left behind
By default the CLI skips dotfiles, node_modules, and the usual build detritus - so a stray .env in your output folder is not published by accident. --include-hidden turns that off, and you should know why you are reaching for it.
Symlinks are skipped, never followed. A link pointing outside your folder cannot drag anything in with it.
In CI
- name: Publish
run: npx lemonade-host@latest deploy ./dist --yes --json
env:
LEMONADE_TOKEN: ${{ secrets.LEMONADE_TOKEN }}
--yes because there is nobody to answer a prompt, and --json so a failing step gives your logs something parseable. The command exits non-zero when a publish is refused.
Logging in
Run lemonade login. It prints a short code and a page to open; sign in there, check the code, pick the one site and approve with the code we email you. The terminal picks it up by itself. At a terminal, lemonade deploy with no login does the same. See Approve in your browser.
What it saves can publish to that one site and read what is live. It stops working after 90 days unused.
Getting a token for CI
Portal → Developers → Tokens → make a token for the site. It is shown once; if you lose it, revoke it and make another. See deploy tokens for what one can and cannot reach.