Skip to content

Latest commit

Β 

History

History
121 lines (78 loc) Β· 2.5 KB

File metadata and controls

121 lines (78 loc) Β· 2.5 KB

Lando Headless CLI

The Lando Headless CLI is a command-line tool for interacting with Lando via the automation API.

πŸ› Bug Reports

Please file bugs in Bugzilla under Conduit :: Lando

Report issues or request enhancements in #engineering-workflow on Slack or #conduit on Matrix.

πŸ”§ Installation

Install the CLI tool from PyPI using uv, pip, or pipx.

uv tool install lando_cli

Confirm the tool is installed locally.

lando --version

πŸ› οΈ Development

This project uses uv for package and virtual environment management.

Install all dependencies, including dev and test groups:

uv sync --group code-quality --group testing

Run the test suite:

uv run pytest

Run the linter and formatter:

uv run ruff check .
uv run black --check .

πŸ” Configuration

The CLI expects a config file at ~/.mozbuild/lando.toml with the following options:

[auth]
api_token = "TOKEN"
user_email = "ldap_user@mozilla.com"

Alternatively, you can supply the values as environment variables:

  • LANDO_HEADLESS_API_TOKEN
  • LANDO_USER_EMAIL
  • LANDO_URL (optional, defaults to https://lando.moz.tools)

πŸš€ Usage

Run lando --help for an overview of available commands.

Run lando <COMMAND> --help for help with each command, including examples.

push-commits

Push new commits to a Lando repo.

Create new commits against the specified branch locally. The currently checked out branch will be used for the push, and the upstream branch will be used as the base.

lando push-commits --lando-repo firefox-autoland

With a release branch:

lando push-commits --lando-repo firefox-beta --relbranch FIREFOX_64b_RELBRANCH

push-tag

Push new tags to the specified repository.

lando push-tag --lando-repo firefox-main --tag-name TAG_NAME --tag-sha sha12345

push-merge

Push merge actions to the specified repository.

Running without any options will detect the merge target and commit message using the current HEAD.

lando push-merge --lando-repo firefox-main

Use --target-commit and --commit-message to create the merge in Lando without detecting the change in your local repo.

lando push-merge --lando-repo firefox-main --target-commit SHA --commit-message "Merge"

check-job

Check the status of a previously submitted job.

lando check-job 123