7 Commits

Author SHA1 Message Date
89b1191fdd
feat(jsontypes): infer types from JSON, generate code in 9 formats
Add tools/jsontypes library and tools/jsontypes/cmd/jsonpaths CLI.

Given a JSON sample (file, URL, or stdin), walks the structure,
detects maps vs structs, infers optional fields from multiple
instances, and produces typed definitions.

Output formats (--format):
- json-paths: flat type path notation (default)
- go: struct definitions with json tags and union support
- typescript: interfaces with optional/nullable fields
- jsdoc: @typedef annotations
- zod: validation schemas with type inference
- python: TypedDict classes
- sql: CREATE TABLE with FK relationships
- json-schema: draft 2020-12
- json-typedef: RFC 8927

Features:
- Interactive prompts for ambiguous structure (map vs struct, same
  vs different types), with --anonymous mode for non-interactive use
- Answer replay: saves prompt answers to .answers files for iterative
  refinement
- URL fetching with local caching and sensitive param stripping
- Curl-like auth: -H, --bearer, --user, --cookie, --cookie-jar
- Discriminated union support with sealed interfaces, unique-field
  probing, and CHANGE ME comments for type/kind discriminators
- Extensive round-trip compilation tests for generated Go code
2026-03-07 14:34:01 -07:00
698137576a
chore: add 'dist/' to .gitignore 2026-03-01 00:18:32 -07:00
a56f8601f0
chore: add cmd binaries to .gitignore 2026-02-27 02:56:28 -07:00
c6b55feb78
chore: add .DS_Store to .gitignore 2026-02-27 01:55:24 -07:00
cbacf9ffc9
chore: add credentials.tsv to .gitignore 2026-02-27 00:17:31 -07:00
0a78632482
chore: add .env variations to .gitignore 2026-01-28 16:42:03 -07:00
d9389f1f4b
Initial commit 2021-03-10 16:23:40 -07:00