Skip to main content

schemify-cli

Build JSON Schemas interactively, and fill JSON data from them, from the command line.

Source: github.com/aaltatan/schemify-cli

A web version runs at schemify.surge.sh (source): the same questions as fields, with the schema updating as you type.

Install

uv tool install schemify-cli

Usage

schemify generate -t Person -o person.schema.json   # ask for the properties, write the schema
schemify fill person.schema.json -o person.json     # ask for one object matching it
schemify list person.schema.json -f python          # ask for a list of them

generate: a Person with first, last and an optional age

schemify generate

fill: one object matching it

schemify fill

list: several objects, printed as Python

schemify list

Command Alias Does
generate g Asks for the properties of an object and builds its JSON Schema (Draft 2020-12)
fill f Asks for data matching a schema file, checked against it
list l Asks for a list of items, each matching the schema
  • -o, --output saves to a file (asks before overwriting); without it the result is printed.
  • -f, --format picks the output of fill and list: json, python or javascript.

Types: string, integer, number, boolean, array, object, each with its constraints (length, pattern, range, items, ...) and an optional default. A string can have a format (date, date-time, email, uuid), and a string or number can be limited to choices.

Reusing it in a typer app

schemify.cli.dependencies.schema exposes typer-di dependencies that load a schema file and ask for its data: FilledDataArgumentDI and FilledListArgumentDI take the path as an argument, FilledDataOptionDI and FilledListOptionDI as --js. When the path is optional or comes from elsewhere, call load_schema(path) and ask_or_abort(schema, ask_data) directly: both report failures as typer errors.

Development

uv sync
uv run pytest
uv run ruff check . && uv run mypy src

The demo GIFs are recorded with VHS (scoop install vhs or brew install vhs) and PowerShell (pwsh), from the repository root, generate first since the others use its schema:

vhs docs/demo/generate.tape && vhs docs/demo/fill.tape && vhs docs/demo/list.tape

After changing generators.py or validators.py, run pnpm sync && pnpm check in the schemify editor so it stays in step.

Metadata

Release files for schemify-cli 0.5.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for schemify-cli 0.5.1
File Size Uploaded Provenance Actions
schemify_cli-0.5.1.tar.gz 13.3 kB Without provenance Details for schemify_cli-0.5.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for schemify-cli 0.5.1
File Interpreter ABI Platform Actions
schemify_cli-0.5.1-py3-none-any.whl Python 3 none any Details for schemify_cli-0.5.1-py3-none-any.whl

Total release size: 30.7 kB

Release files / schemify_cli-0.5.1.tar.gz

Download URL schemify_cli-0.5.1.tar.gz
Size 13.3 kB
Tags Source
SHA-256 checksum
How to use checksums
4156fe4e26c412fb9f587cd39a262d28844ae2c96bac031585d06d2899ebf2c2
BLAKE2b-256 checksum
How to use checksums
508980aa2c98710ef5bcd42eba551bcb3c1f39a544b4c67ca078389f3c83d5b7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / schemify_cli-0.5.1-py3-none-any.whl

Download URL schemify_cli-0.5.1-py3-none-any.whl
Size 17.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3143708c9f29905b00b9780599216f8ef8143324c063cb3c4ae43e2e08c04965
BLAKE2b-256 checksum
How to use checksums
236dcaa1d403ca7fcf06872091d70a4f9f088ebb7c40650843b1291627ff60d8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.9 {"installer":{"name":"uv","version":"0.13.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for schemify-cli 0.5.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page