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 copperfoxInstallation
On macOS and Linux:
curl -fsSL https://get.lilylabs.io/install.sh | shThe 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| Option | Description |
|---|---|
--release <VERSION> | Install a specific version |
--dir <DIR> | Install to another directory |
--system | Install 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 --versionTo update, run the install command again. It replaces lly with the latest version.
Sign in
lly loginlly 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 deploylly 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:
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 copperfoxWithout 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 copperfoxA 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.
| Option | Environment variable | Description |
|---|---|---|
-w, --workspace <NAME|ID> | LLY_WORKSPACE | Workspace for this command |
-p, --project <NAME|ID> | LLY_PROJECT | Project |
-a, --app <SLUG|ID> | LLY_APP | App. Usually given right after the command instead. |
-y, --yes | Accept defaults, never prompt | |
--json | JSON output on stdout | |
--no-color | NO_COLOR | Disable colors |
--profile <NAME> | LLY_PROFILE | Configuration profile |
-h, --help | Show help | |
-V, --version | Show 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 a1b2c3dWith --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
| Code | Meaning |
|---|---|
0 | Success |
1 | Unexpected error |
2 | Usage error: invalid flag, open choice without a terminal, or declined confirmation |
3 | Not signed in or session ended |
4 | Not found: unknown workspace, project or app |
5 | Conflict, for example a taken name or a busy app |
6 | Temporarily unavailable: service or network unreachable, or wait timed out |
7 | Failed: build or deployment failed, or GitHub not connected |
130 | Interrupted 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 variable | Description |
|---|---|
LLY_WORKSPACE, LLY_PROJECT, LLY_APP | Same as -w, -p, -a |
LLY_PROFILE | Same as --profile |
LLY_CONFIG_DIR | Configuration directory |
LLY_ACCESS_TOKEN | Access token to use instead of a stored session. See CI/CD. |
LLY_INSECURE_STORE=1 | Store credentials in a 0600 file instead of the keychain |
LLY_NO_BROWSER | lly login prints the link instead of opening a browser |
NO_COLOR | Disable colors |
Deployment settings such as apps, variables, ports and databases can be stored in a lily.toml in the repository.