CLI

lawn compose

Work with Lawn compose files from the command line.
lawn compose is not available in the public beta. The commands below describe planned functionality.

The lawn compose command group lets you work with Lawn compose files directly — validate syntax, check for common mistakes, and test templates locally before publishing.

CommandDescription
lawn compose validateValidate a compose file
lawn compose testBuild and run a template locally

lawn compose validate

Check a compose file for syntax errors, missing variables, and misconfigured x-lawn extensions.

lawn compose validate <path>
# Validate the current directory's template
lawn compose validate .

# Validate a specific file
lawn compose validate lawn-compose/v1.0.0.yaml

lawn compose test

Build a template from a local directory and run it as an instance for testing. Ports are automatically assigned to avoid conflicts.

lawn compose test <path>
OptionDescription
--name <name>Custom name for the test instance
--var <assignment>Variable value as NAME=VALUE (repeatable)
--no-startCreate the instance without starting it
# Test the template in the current directory
lawn compose test .

# Supply variables for testing
lawn compose test . --var ADMIN_PASSWORD=test123