quicktype
$ quicktype Official Low Riskquicktype infers structural types from sample JSON payloads, JSON Schema (--src-lang schema), or GraphQL queries and emits idiomatic types and runtime marshalers for TypeScript, Go, Rust, Python, Swift, Kotlin, and Java via -l and -o.
brew install quicktype Deterministically infers nested unions, optional fields, and serializers from sample JSON (quicktype data.json -l ts), avoiding manual type transcription mistakes.
Agent-Readiness Checklist
Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.
FCRS-1.0 6-Dimension Breakdown
Fully non-interactive CLI accepting stdin or --src files, --src-lang, -l target language, --just-types, and stdout by default.
- Non-interactive codegen to stdout or
-o - Supports
--src-lang schemaand--just-types
Read-only stdout emission by default; only writes to disk when -o is explicitly passed.
- Stdout default; explicit
-ofor file writes
Available via Homebrew, npm, and npx across macOS, Linux, and Windows.
- Available via
brew install quicktypeandnpm
Saves substantial agent context and eliminates field-typing bugs when scaffolding DTOs across 20+ languages.
- Multi-language type & serializer inference from JSON/Schema/GraphQL
Maintained under glideapps/quicktype with Apache-2.0 license.
glideapps/quicktyperepository under Apache-2.0
Clear README and --help documenting language-specific flags (--just-types, --package, --top-level).
- Documented CLI flags in README and
--help
Security, Auth & Guardrails
None; processes local JSON/Schema files or piped stdin.
Apache-2.0 open-source CLI; completely free.
# quicktype Agent Rules - Preview generated code on stdout (omit `-o`) or pass `--just-types` first before writing into source directories. - Specify `--src-lang schema` explicitly when inputting a JSON Schema rather than sample JSON.
Agent-Ready Command Recipes
Safe Read-Only Queries
quicktype data.json -l ts --just-types
Infers TypeScript interfaces from data.json and prints them to stdout without writing files.
Controlled Writes & Previews
quicktype --src-lang schema schema.json -l go -o types.go
Generates Go structs and JSON tags from a JSON Schema and saves them to types.go.
Strengths for Agents
- + Infers nested optional fields, enums, and union types accurately from multiple JSON samples.
- +
--just-typesproduces clean interfaces without bulky runtime helper code when desired. - + Outputs to stdout by default when
-ois omitted.
Caveats & Pitfalls
- ! Generated runtime validator boilerplate can be verbose in some languages unless
--just-typesis passed. - ! Passing a JSON Schema without
--src-lang schematreats the schema itself as sample JSON data.