This guide explains how to access and use the Hatch Schemas in your projects.
Hatch Schemas are distributed through multiple channels:
- GitHub Repository - Direct access to schema files via raw.githubusercontent.com
- GitHub Releases - Versioned releases with metadata and direct downloads
- GitHub API - Programmatic discovery of latest versions and releases
You can visit the release page: https://github.com/CrackingShells/Hatch-Schemas/releases
Download schema files from specific GitHub releases:
# Download schema files from specific releases
https://github.com/crackingshells/Hatch-Schemas/releases/download/schemas-package-v1.2.0/hatch_pkg_metadata_schema.json
https://github.com/crackingshells/Hatch-Schemas/releases/download/schemas-registry-v1.2.0/hatch_all_pkg_metadata_schema.jsonAccess schema files directly from the GitHub repository:
# Direct access to schema files (always current from main branch)
https://raw.githubusercontent.com/crackingshells/Hatch-Schemas/main/package/v1.2.2/hatch_pkg_metadata_schema.json
https://raw.githubusercontent.com/crackingshells/Hatch-Schemas/main/package/v1.2.1/hatch_pkg_metadata_schema.json
https://raw.githubusercontent.com/crackingshells/Hatch-Schemas/main/registry/v1.2.0/hatch_all_pkg_metadata_schema.jsonYou can reference these schemas in your JSON files using the $schema property:
{
"$schema": "https://raw.githubusercontent.com/crackingshells/Hatch-Schemas/main/package/v1.2.2/hatch_pkg_metadata_schema.json",
"package_schema_version": "1.2.2",
"name": "my_package",
"version": "1.0.0",
"description": "My awesome package",
"tags": ["example"],
"author": {"name": "John Doe"},
"license": {"name": "MIT"},
"entry_point": "server.py"
}This reference:
- Provides editors with schema information for autocompletion and validation
- Documents which schema version the file adheres to
- Creates a clear contract for validation tools
Consider implementing local caching of schemas. The examples/schema_updater.py utility provides this functionality:
from examples.schema_updater import configure_cache, update_schemas
# Configure local cache location (optional)
configure_cache(cache_dir="./schemas_cache")
# Update local schema cache
update_schemas()