Skip to content

Quick start

Run a lint

Point ryl at a file or directory:

# Lint a single file
ryl path/to/file.yaml

# Lint a project (recursively scans .yml/.yaml, honouring .gitignore)
ryl .

Exit codes:

  • 0 — no problems found.
  • 1 — lint errors, invalid YAML, or a path that could not be read (including nonexistent files).
  • 2 — CLI usage error (no inputs provided, bad flags) or --strict was set and only warnings were produced.

Apply auto-fixes

ryl can automatically fix a subset of rules:

ryl --fix .

See the Rules reference for which rules are fixable.

Configure for your project

Drop a .ryl.toml (or ryl.toml) at the root of your repo. TOML configuration is flat — copy the preset you want from Configuration presets and customise from there:

yaml-files = ["*.yaml", "*.yml", ".yamllint"]

# ... rule enable/disable table from the preset ...

[rules.line-length]
max = 120
allow-non-breakable-words = true

YAML configuration is also accepted for parity with yamllint and supports extends: for selecting a preset. Both .yamllint and .ryl.toml are discovered automatically. TOML is the recommended format for ryl-specific features (such as fix selection) that have no upstream yamllint equivalent.

If you already have a yamllint configuration, use the built-in converter:

ryl --migrate-configs --migrate-write

See Migrating from yamllint for details.