Using zod to get structured and typed output from ChatGPT in TypeScript
In plain words
This is a TypeScript tool that uses Zod, a schema validation library, to extract structured and typed data from ChatGPT responses. Developers can define data schemas and ensure the AI output conforms to specific formats and types automatically. The project provides practical methods for working with large language models while maintaining type safety, making it useful for developers building applications that need reliable, predictable data extraction from ChatGPT.
written from the facts on this page · September 2026
Does the same job
all alternatives →
- ATA tool to visualise Zod validation errors2024 · zod.fyi · ▲17
I work on code generator that creates TypeScript SDKs from OpenAPI specs and Zod (https://zod.dev/) is a critical building block that I chose to power runtime validation in those SDKs. Depending on the complexity of a Zod schema, the resulting validation error message can contain a wall of JSON text - the serialised issues that were recorded during validation. I wanted to try and create a small tool to help me better visualise and parse these errors. In code and the command line, we do also have the ability to pretty-print the errors but I still wanted a web UI which can let…
- NMNo more copy-pasting – a ChatGPT plugin to read code from your computer2023 · github.com · ▲46
Introducing the Code ChatGPT Plugin - a new era of seamless interaction between ChatGPT and your codebase. This TypeScript Code Analyzer furnishes a suite of utilities to analyze TypeScript code, enabling ChatGPT to "talk" with YOUR code. Fetch a list of all the files in your project, list of every function in a TypeScript or JavaScript file, or even get the content of a specific function, all while staying in your conversation with ChatGPT. With accessible API endpoints, you can effortlessly navigate your codebase and ask ChatGPT anything you can think of about it. Say goodbye to the days…
- CAChatblade – A CLI Swiss Army Knife for ChatGPT2023 · github.com · ▲315
integrate chatGPT into your scripts or terminal work. Supports piping text, saving prompts, estimating costs, and some basic json/yaml extraction. I've added some elaborate examples on the readme of how to use it with pictures, that may provide a better overview.

More life & fun this month
the category →- TL
Life & fun · 10d ago · louisabraham.github.io

Photosynthesis fires two of your iPhone
Life & fun · 29d ago · photosynthesis.camera
SoloUno▲310Take control of hair pulling, nail biting & skin picking
Life & fun · 28d ago · solouno.io

Scroll through all 43,252,003,274,489,856,000 reachable Rubik's Cube permutations.
Life & fun · 27d ago · everycube.alen.is


Hi HN, I built Eigendrum, a web tool that solves the 2D wave equation for arbitrary shapes so you can hear what they sound like as drums. How it works: * Solves -∇²u = λu using finite element analysis (Kφ = λMφ) on a triangle mesh. * Validated to <0.1% error against closed-form solutions for circles (Bessel zeros) and rectangles. * Sound model factors in strike location, Rayleigh damping, and mallet width. * Includes Kac drums I & II to demonstrate identical sound spectra from different geometries. * No frameworks, build steps, or dependencies. Repo and tests:…
Life & fun · 27d ago · baselashraf81.github.io
Launched alongside, April 2023
the whole month →
- G4
Hi HN, Today we’re launching GPT-4 answers on Phind.com, a developer-focused search engine that uses generative AI to browse the web and answer technical questions, complete with code examples and detailed explanations. Unlike vanilla GPT-4, Phind feeds in relevant websites and technical documentation, reducing the model’s hallucination and keeping it up-to-date. To use it, simply enable the “Expert” toggle before doing a search. GPT-4 is making a night-and-day difference in terms of answer quality. For a question like “How can I RLHF a LLaMa model”, Phind in Expert mode delivers a…
AI · 2023 · phind.com



