Skip to main content

Static linter for AIVane templates and application bundles

Project description

AIVane Template Linter

aivane-template-linter is a Python CLI for validating AIVane template JSON files and application bundles before they are sent to the Android REPL runtime.

It checks single templates, recursive template directories, and application directories that contain app.json, __main__.json, and child templates.

Install

uv tool install aivane-template-linter

Or with pipx:

pipx install aivane-template-linter

Run

Lint one template:

aivane-template-lint template.json

Lint an application bundle directory:

aivane-template-lint path/to/my-app -r

Emit machine-readable JSON:

aivane-template-lint path/to/my-app -r --json

Treat warnings as failures:

aivane-template-lint path/to/my-app -r --strict

Use a custom OperationType schema directory:

aivane-template-lint path/to/my-app -r --docs-dir path/to/operation-types

By default, the package uses the OperationType schema snapshot bundled with the installed wheel.

What It Checks

  • JSON parse errors
  • Required template and operation fields
  • Unknown OperationTypes
  • Missing, unknown, deprecated, mistyped, or invalid enum parameters
  • Variable references that are not declared in the current template scope
  • break and continue outside loop context
  • Nested operation structure
  • Application-level relationships when app.json is present
  • template.execute targets and parameter contracts across templates

Application Checks

When a directory contains app.json, the linter also checks the template graph:

  • app.mainTemplateId resolves to exactly one template
  • template IDs and file aliases are not duplicated
  • every template.execute.templateId target exists
  • required child template input parameters are passed
  • extra parameters passed to child templates are reported as warnings

Exit Codes

  • 0: no errors
  • 1: one or more errors, or warnings when --strict is used

The same exit-code behavior applies to --json.

Development

From this directory:

python -m pip install -e . pytest
python -m pytest tests

Build a local distribution:

python -m pip install build
python -m build

Related Docs

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aivane_template_linter-0.1.1.tar.gz (48.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aivane_template_linter-0.1.1-py3-none-any.whl (93.4 kB view details)

Uploaded Python 3

File details

Details for the file aivane_template_linter-0.1.1.tar.gz.

File metadata

  • Download URL: aivane_template_linter-0.1.1.tar.gz
  • Upload date:
  • Size: 48.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for aivane_template_linter-0.1.1.tar.gz
Algorithm Hash digest
SHA256 962d4bc190054e98ce6e13a186ddcf9294473df7f3eb0efd85b6161f588ff867
MD5 ba41a8e50ff718afe66306ce3c881f80
BLAKE2b-256 dfc848de97cdfc16596d2a4a3c06e4be1316812d9ee045c124364473a201094e

See more details on using hashes here.

Provenance

The following attestation bundles were made for aivane_template_linter-0.1.1.tar.gz:

Publisher: template-linter-publish.yml on aivanelabs/ai-rpa

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file aivane_template_linter-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for aivane_template_linter-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7ffec8c46785a862d91d506511db130045d3fe5ac1b86595bb1405f29e34c1bb
MD5 3af55f091edf1a8668c2a927f822e240
BLAKE2b-256 a767190a3c323af4da1d156350964d80d1e5b19d972cb277c726f7b00d5b991d

See more details on using hashes here.

Provenance

The following attestation bundles were made for aivane_template_linter-0.1.1-py3-none-any.whl:

Publisher: template-linter-publish.yml on aivanelabs/ai-rpa

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page