Templates

Testing

GitHub
How to test templates end-to-end before shipping.
The catalog is community-driven. Want to add an app? Open a PR on GitHub. Support for custom catalogs from other sources is coming soon.
lawn template is not yet available in the public beta. See the CLI reference for the planned commands.

lawn template test validates and tests a template end-to-end. A single command spins up an isolated engine, pulls images, creates a test instance, runs health checks, and tears everything down automatically.

lawn template test <path>
OptionDescription
--timeout <seconds>Timeout for the entire test (default: 300)
--keep-instanceKeep the test instance after completion for debugging
--var <assignment>Variable value as NAME=VALUE (repeatable)

What a test run does

  1. Validates the manifest and compose files
  2. Pulls all container images
  3. Allocates free ports dynamically to avoid conflicts
  4. Creates a test instance with generated credentials
  5. Starts the instance and waits for containers to be ready
  6. Runs all health checks (HTTP and command-based)
  7. Cleans up the test instance and shuts down the engine
# Test a template in the current directory
lawn template test .

# Test with a longer timeout
lawn template test . --timeout 600

# Keep the instance running after the test for manual inspection
lawn template test . --keep-instance

Templates with required variables

Templates that declare userProvided variables (like admin passwords or API tokens) cannot start without credentials. By default, lawn template test skips container startup for these templates — it still validates the manifest and pulls images.

To run the full test, supply the required values with --var:

lawn template test . --var REPO_URL=https://github.com/your-org/your-repo
Tests must be run one at a time. Each run spins up an isolated container engine — running multiple tests in parallel causes conflicts.