--- id: j2lint version: "1.3.0" license: MIT license_treatment: permissive maintenance: active --- # j2lint — Command-line utility that validates jinja2 syntax according to Arista's AVD style guide. License: permissive · Maintenance: active · Downloads: 115.4K/mo ## What it is and what it does j2lint is a command-line linter for Jinja2 templates that enforces style and syntax rules defined by Arista's AVD style guide. It checks for common issues like incorrect spacing around variables and operators, improper indentation in nested blocks, inconsistent use of tabs versus spaces, and variable naming conventions (lowercase with underscores for multi-word names). The tool runs as a standalone CLI utility or integrates into CI pipelines and pre-commit hooks. You use it by pointing it at a directory or file of Jinja2 templates, and it reports violations with configurable output formats (human-readable, JSON, or verbose). You can ignore specific rules globally or per-file, define custom rules, and filter by file extension. It depends on jinja2 for template parsing and rich for formatted terminal output. Use it for: - Enforce consistent Jinja2 style across a team's template codebase in CI/CD pipelines. - Validate template syntax before deployment to catch errors early. - Integrate into pre-commit hooks to catch style violations before code review. - Customize linting rules for organization-specific Jinja2 conventions. - Use as a VSCode extension (or IDE plugin) for real-time template feedback during editing. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. j2lint validates Jinja2 template syntax and style against Arista's AVD style guide, enforcing rules for spacing, indentation, naming conventions, and statement formatting. Yes, if you work with Jinja2 templates and want to enforce consistent style. The tool is actively maintained, has no known vulnerabilities, low install friction, and a permissive license. It's particularly valuable in team environments or CI pipelines where style consistency matters. Install it if your project uses Jinja2 and you lack a linting standard. ## Install pip install j2lint uv add j2lint poetry add j2lint ## Installing j2lint Before you install: Low install friction with only two runtime dependencies (jinja2 and rich). Actively maintained with a release 15 days ago; supports Python 3.10 through 3.14. License in practice: MIT license permits unrestricted use, modification, and distribution with minimal restrictions—suitable for both open-source and commercial projects. Quickstart: pip install j2lint j2lint /path/to/templates # With specific rules ignored: j2lint /path/to/templates --ignore S1 V2 # JSON output for CI: j2lint /path/to/templates --json Requires Python 3.10 or later. ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 115.4K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags jinja2 linter, jinja2 syntax validator, template style checker, jinja2 code quality, avd style guide linter, jinja2 formatting rules, template lint tool, jinja2, linting, ci-integration [View on SkillFed](https://skillfed.io/packages/j2lint) · [View on PyPI](https://pypi.org/project/j2lint/)