Catalog PyPI
PACKAGE EXPLORERView in registry

aidecl

PyPI

Validate AI Declaration (aidecl) files

aicompliancedisclosuretransparencyvalidation
Versions collected1
Direct dependencies5From release 0.3.0
Last observed21 Oct, 10:26 UTC

README

Version 0.3.0 documentation

aidecl

Command-line tool for validating, converting, and creating AI Declaration (aidecl) files.

AI Declaration files describe how AI tools were used in the creation of software, datasets, documents, and other digital work. This CLI validates them against the schema with both structural (JSON Schema) and semantic checks.

Installation

pip install aidecl

For development:

git clone https://github.com/ai-declaration/cli.git
cd cli
pip install -e ".[dev]"

Quick Start

# Create a new declaration file
aidecl init --format yaml

# Edit aidecl.yaml with your project details

# Validate it
aidecl validate aidecl.yaml

Usage

validate

Check one or more declaration files against the schema:

aidecl validate aidecl.yaml
aidecl validate aidecl.json another.yaml
aidecl validate --verbose aidecl.yaml
aidecl validate --output-format json aidecl.yaml
aidecl validate --strict aidecl.yaml  # warnings become errors
aidecl validate --quiet aidecl.yaml    # only exit code, no output

Sample output:

PASS [yaml]: aidecl.yaml
FAIL [yaml]: aidecl.yaml
    Schema error at 'ai_usage.level': 'high' is not valid. Allowed values: 'none', 'minimal', 'moderate', 'significant', 'extensive'

convert

Convert between YAML and JSON:

aidecl convert aidecl.yaml -f json
aidecl convert aidecl.json -f yaml -o output.yaml

init

Create a template declaration file:

aidecl init
aidecl init --format json
aidecl init --output my-project.yaml

The init command auto-detects your project name and git config for sensible defaults.

Exit Codes

CodeMeaning
0All files valid
1Semantic errors found
2Schema validation errors
3File errors (not found, binary, too large)

Output Formats

text (default): Human-readable colored output.

json: Machine-readable output per file:

{
  "file": "aidecl.yaml",
  "passed": true,
  "schema_errors": [],
  "semantic_errors": [],
  "warnings": ["declaration date is in the future: 2099-01-01"]
}

github-actions: Annotation format for CI:

::error file=aidecl.yaml::used is false but tools are listed
::warning file=aidecl.yaml::declaration date is in the future

Validation Rules

Schema checks

Validates structure against JSON Schema Draft 2020-12: required fields, types, enum values, string formats, conditional requirements (e.g. summary required when used: true).

Semantic checks

#LevelRule
1warnAI usage declared but no tools listed
2errorused: false but tools present
3errorused: false but level is not none
4warncode_proportion percentages don't sum to ~100
5warnDeclaration date is in the future
6warnReview date is after declaration date
7warnSecurity review performed but no review type
8warnPersonal data sent without DPA
9warnLevel is extensive but no proportion data
10warnComponent references tool not in tools list
11warnSchema version newer than supported
12errorTool period end before start
13warnTool trains on data but no data handling section
14warnNext review date is in the past

Integration

GitHub Actions

- name: Validate AI Declaration Format
  run: |
    pip install aidecl
    aidecl validate --output-format github-actions aidecl.yaml

Pre-commit framework

Add to your .pre-commit-config.yaml:

repos:
  - repo: https://github.com/ai-declaration/cli
    rev: v0.1.0
    hooks:
      - id: aidecl

Git pre-commit hook

#!/bin/sh
aidecl validate aidecl.yaml --quiet
StandardRelationship
codemeta.jsonProject metadata; aidecl adds AI transparency
CITATION.cffCitation metadata; complementary
SPDX 3.0 AI ProfileLicense + AI BOM; aidecl is lighter for declarations
CycloneDX ML-BOMML component inventory; different scope
C2PAContent authenticity; media-focused
W3C PROVProvenance ontology; aidecl JSON-LD maps to PROV-O
  • schema: schema definition and examples
  • web: web-based generator and validator

Shell Completions

Bash:

eval "$(register-python-argcomplete aidecl)"

Or add to your .bashrc for persistent completions.

Fish and Zsh: use argcomplete or generate completions manually from the --help output.

Privacy Note

The declared_by field identifies who made the declaration. For public repositories, consider using team names or roles instead of individual names.

Compatibility

aidecl versionSupported schema versions
0.1.x1.0.0

Development

pip install -e ".[dev]"
pytest
pytest --cov

License

Apache-2.0. The bundled schema.json is from schema (CC BY-SA 4.0).

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 1

Collected releases
VersionPublishedDirect dependenciesOpen version
0.3.023 Sept 20265

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Repository

PENDING
ai-declaration/cli

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 21 Oct, 10:26 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:b950ee270f5c2bb25ca84c9f9fe17b7175616ce9f15f7e6d02d0e2d068410502