schemax
Infer JSON Schema from sample data. Feed it one or more JSON files and get a clean, mergeable schema back.
Install
pip install schemax-cli
Usage
# Infer schema from a single file
schemax infer data.json
# Infer from multiple examples (schemas are merged)
schemax infer example1.json example2.json example3.json
# Infer from a JSON array (each element = sample)
schemax infer users.json
# From stdin
cat data.json | schemax infer -
# With title and compact output
schemax infer data.json --title "User" --compact
# Disable format detection
schemax infer data.json --no-formats
# Different draft version
schemax infer data.json --draft 7
Commands
| Command | Description |
|---|---|
schemax infer |
Infer JSON Schema from sample data |
schemax diff |
Show property differences across array elements |
schemax validate |
Validate JSON and show structure summary |
Format Detection
Automatically detects and annotates string formats:
date-time— ISO 8601 timestampsdate— YYYY-MM-DD datestime— HH:MM:SS timesemail— Email addressesuri— HTTP(S) URLsuuid— UUIDsipv4— IPv4 addresses
Multi-File Merging
When given multiple files (or a JSON array), schemax merges schemas intelligently:
- Object properties from all samples are combined
required= intersection (only keys present in ALL samples)- Types are widened (integer + number → number)
- Nullable fields are detected
- Conflicting types produce
anyOf
For AI Agents
See SKILL.md for agent-optimized documentation.
License
MIT
Release files for schemax-cli 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| schemax_cli-0.1.0.tar.gz | 6.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| schemax_cli-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 13.7 kB
Release files / schemax_cli-0.1.0.tar.gz
| Download URL | schemax_cli-0.1.0.tar.gz |
|---|---|
| Size | 6.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c76ca2ef3728f6815c4864c0084b2f3b16f0197ed7d23040d4fde26d429e7aaa
|
|
BLAKE2b-256 checksum How to use checksums |
3c8fbfcd8ac76bed4b1d0fc7ec7a78018f671e7fca2ff77b1f8bb49e8e4428f5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.2
|
Release files / schemax_cli-0.1.0-py3-none-any.whl
| Download URL | schemax_cli-0.1.0-py3-none-any.whl |
|---|---|
| Size | 7.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d3df304ca7c05b4e77d725395fcacdd96409f308c62c945b4e8f182056cc91cb
|
|
BLAKE2b-256 checksum How to use checksums |
5ef26e28790f30e167761d09cfbc002a67c6155668f5bbccbc78ebc5596e78cd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.2
|