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.0.tar.gz (48.2 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.0-py3-none-any.whl (93.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: aivane_template_linter-0.1.0.tar.gz
  • Upload date:
  • Size: 48.2 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.0.tar.gz
Algorithm Hash digest
SHA256 e324358bc778d8d9ba3ec2ad3ee3196973fec6840b4d74d429ecbd7121167099
MD5 a53fad296218ca280af2d259e22656c0
BLAKE2b-256 a19891368e53af75191a90e9cc59fdd1e3eb665ad4eda46c5194e31bffdf3af2

See more details on using hashes here.

Provenance

The following attestation bundles were made for aivane_template_linter-0.1.0.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.0-py3-none-any.whl.

File metadata

File hashes

Hashes for aivane_template_linter-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 98333e28519f84bacbbb0db875c1873f45371f5f942c7d2cddc1e04508d560d2
MD5 db25abdb331df451ee249fe09a1c1eb0
BLAKE2b-256 7b0e8a84b73cbfbfba989c5e7ce35ac00d200edf4a0be66a77fed986747d512d

See more details on using hashes here.

Provenance

The following attestation bundles were made for aivane_template_linter-0.1.0-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