Introduction

Install lly, sign in and learn how commands select workspaces, projects and apps.

lly is the LILY command line. It deploys GitHub repositories, follows builds, reads logs and manages environment variables, domains and networking. Commands run with your account in one of your workspaces.

lly login                # sign in
lly deploy               # deploy the repository in this directory
lly ls                   # list projects and apps
lly attach copperfox     # stream the log of the app copperfox

Installation

On macOS and Linux:

curl -fsSL https://get.lilylabs.io/install.sh | sh

The script downloads the latest version for your platform, verifies its checksum and installs lly to ~/.local/bin. If that directory is not on your PATH, the script prints the line to add to your shell profile.

Options go after sh -s --:

curl -fsSL https://get.lilylabs.io/install.sh | sh -s -- --release 0.2.0
OptionDescription
--release <VERSION>Install a specific version
--dir <DIR>Install to another directory
--systemInstall to /usr/local/bin, with sudo if needed

On Windows, download https://get.lilylabs.io/lly/<VERSION>/lly-<VERSION>-x86_64-pc-windows-gnu.zip and put lly.exe in a directory on your PATH. The latest version number is at get.lilylabs.io/lly/LATEST.

Supported platforms are macOS (Apple Silicon and Intel), Linux (x86-64 and ARM64) and Windows (x86-64).

lly --version

To update, run the install command again. It replaces lly with the latest version.

Sign in

lly login

lly login opens the browser and shows a code to confirm. The session is stored for this machine and starts in your personal workspace. See login for SSH and machines without a browser.

First deploy

Push your latest commit, then run in a clone of a GitHub repository:

lly deploy

lly uses the origin repository and the checked-out branch. It creates a project named after the repository, asks which detected apps to deploy and follows the build until all apps are live. The directory is then linked to the project, so later commands in it need no names.

Builds use GitHub

LILY fetches the code from GitHub, not from your local files. lly deploy warns about uncommitted changes and unpushed commits.

Working with a coding agent? See LILY for agents.

Selecting project and app

Most commands act on one app in one project. lly resolves them in this order:

Command line
lly stop copperfox, --project shop
Environment
LLY_PROJECT, LLY_APP
Linked directory
lly project link
Single match
only one project or app exists
Prompt
interactive terminals only
Resolution order for project and app. The first match applies.

Apps are addressed by their slug, for example copperfox. lly apps lists the slugs. The slug follows the command, before the subcommand:

lly env copperfox set LOG_LEVEL=debug
lly domain copperfox add shop.example.com
lly restart copperfox

Without a terminal, lly does not prompt. If a choice is open, it exits with code 2 and names the flag to set. See CI/CD.

Linked directories

lly project link shop --app copperfox

A link stores the project, and optionally the app, for a directory and its subdirectories up to the git root. Links are stored in the CLI configuration, not in the repository. lly deploy creates the link on the first deploy from a directory. lly project unlink removes it.

Workspaces

Commands run in the current workspace. lly workspace <name> changes it. -w <name> selects another workspace for one command. See Workspaces.

Global options

Global options work with every command and in any position.

OptionEnvironment variableDescription
-w, --workspace <NAME|ID>LLY_WORKSPACEWorkspace for this command
-p, --project <NAME|ID>LLY_PROJECTProject
-a, --app <SLUG|ID>LLY_APPApp. Usually given right after the command instead.
-y, --yesAccept defaults, never prompt
--jsonJSON output on stdout
--no-colorNO_COLORDisable colors
--profile <NAME>LLY_PROFILEConfiguration profile
-h, --helpShow help
-V, --versionShow version

lly --help lists all commands. lly <command> --help shows the options of a command.

Output

Results go to stdout. Progress, notes and errors go to stderr. Commands that act on a project or app first print a context line to stderr with workspace, project, app and source:

❯ Acme ❯ shop ❯ copperfox ❯ acme/shop@main a1b2c3d

With --json, results and errors are printed as JSON to stdout. Errors have the form {"error", "hint", "exit_code"}. Each command page describes its JSON output.

Exit codes

CodeMeaning
0Success
1Unexpected error
2Usage error: invalid flag, open choice without a terminal, or declined confirmation
3Not signed in or session ended
4Not found: unknown workspace, project or app
5Conflict, for example a taken name or a busy app
6Temporarily unavailable: service or network unreachable, or wait timed out
7Failed: build or deployment failed, or GitHub not connected
130Interrupted with Ctrl-C. Work already accepted by LILY continues.

Configuration

The configuration is stored in ~/.config/lly, on Windows in %APPDATA%\lly, or in LLY_CONFIG_DIR. Credentials are stored in the system keychain.

Environment variableDescription
LLY_WORKSPACE, LLY_PROJECT, LLY_APPSame as -w, -p, -a
LLY_PROFILESame as --profile
LLY_CONFIG_DIRConfiguration directory
LLY_ACCESS_TOKENAccess token to use instead of a stored session. See CI/CD.
LLY_INSECURE_STORE=1Store credentials in a 0600 file instead of the keychain
LLY_NO_BROWSERlly login prints the link instead of opening a browser
NO_COLORDisable colors

Deployment settings such as apps, variables, ports and databases can be stored in a lily.toml in the repository.

On this page