awesome-repositories.com
Blog
awesome-repositories.com

Discover the best open-source repositories with AI-powered search.

ExploreCurated searchesOpen-source alternativesSelf-hosted softwareBlogSitemap
ProjectAboutHow we rankPressMCP server
LegalPrivacyTerms
© 2026 Bringes Technology SRL·VAT RO45896025·hello@awesome-repositories.com
·
samchon avatar

samchon/typia

0
View on GitHub↗
5,837 stars·225 forks·Go·MIT·3 viewstypia.io↗

Typia

Typia is a compile-time code generator that transforms TypeScript type annotations into runtime validation, serialization, and schema functions without requiring decorators or separate schema files. It generates optimized validation and serialization code during TypeScript compilation, producing dedicated functions for each type that eliminate runtime schema objects for faster execution.

The project extends this core capability into several integrated areas. It generates fully typed client SDKs from NestJS controller source code, keeping server and client types synchronized automatically. It produces OpenAPI, JSON Schema, and Protocol Buffer schema definitions directly from TypeScript types at compile time. It creates callable LLM function-calling tool schemas from TypeScript classes and OpenAPI documents, with built-in parsing, type coercion, and validation feedback for language model integration. It also provides typed replacements for standard NestJS decorators that validate request bodies and serialize responses using generated TypeScript types.

Additional capabilities include random test data generation that respects type constraints, Protocol Buffer encoding and decoding from TypeScript types, and data transformation utilities such as deep cloning, property pruning, and case conversion. The project integrates with build tools through a compiler transformer plugin and supports both the standard TypeScript compiler and the Go-native TypeScript compiler.

Features

  • Compile-Time Code Generation - Generates optimized validation and serialization code during TypeScript compilation.
  • TypeScript Type-to-Code Generators - Generates optimized runtime validation, serialization, and schema functions from TypeScript type annotations during compilation.
  • LLM Tool Calling - Transforms TypeScript classes into tool schemas with built-in parsing, coercion, and validation feedback.
  • Schema Generators from Types - Transforms TypeScript classes and OpenAPI documents into callable LLM tool schemas with built-in parsing, coercion, and validation feedback.
  • Correctors - Parses, coerces, and validates tool arguments, returning annotated errors for LLM self-correction.
  • LLM Tool Definitions - Transforms TypeScript classes into structured tool schemas with parsing and validation for LLM calls.
  • Function Calling Interfaces - Formats data into structured outputs compatible with large language model function calling interfaces.
  • Error-Correction Feedback Loops - Returns annotated input with error markers on validation failure for LLM self-correction.
  • Structured Output Generators - Creates JSON schema definitions from TypeScript interfaces for LangChain structured output with validation.
  • TypeScript Class Converters - Transforms TypeScript class methods into LangChain DynamicStructuredTools using JSDoc and type annotations.
  • Framework-Agnostic Converters - Registers TypeScript class methods as callable tools for LLM function calling using JSDoc and type annotations.
  • Tool-Calling Schemas - Generates structured schemas from TypeScript types for defining LLM tool calls.
  • Compile-Time Protocol Buffer Encoders - Generates compile-time Protocol Buffer encoders directly from TypeScript types, eliminating the need for separate .proto schema files.
  • Detailed Feedback Validators - Parses and validates tool arguments with type coercion and returns annotated error markers.
  • Structural Data Validators - Generates compiled validation functions that check runtime data against TypeScript type definitions.
  • Compile-Time Drift Preventers - Automatically regenerates validators when type definitions change, keeping validation logic synchronized with the data model.
  • TypeScript Class Converters - Converts TypeScript classes into callable function schemas for LLM agent invocation.
  • TypeScript Type-to-OpenAPI Generators - Produces OpenAPI and JSON Schema definitions directly from TypeScript types at compile time for API documentation and tool integration.
  • Typed JSON Parsers - Parses JSON strings and validates the result against a TypeScript type in a single operation.
  • Type-to-Schema Generation - Generates OpenAPI or JSON Schema definitions directly from TypeScript types without extra annotations.
  • TypeScript Type Sources - Generates JSON Schema or OpenAPI components blocks directly from TypeScript type definitions at compile time.
  • Compile-Time Stringifiers - Generates compile-time stringifiers from TypeScript types that produce JSON output significantly faster than native JSON.stringify.
  • Type-Safe JSON Codecs - Converts typed values to JSON and back while validating structure, achieving faster throughput than generic serializers.
  • Type-Safe Stringifiers - Generates dedicated stringifiers from TypeScript types at compile time, producing JSON output faster than native JSON.stringify.
  • Runtime Type Validation - Generates runtime validators from TypeScript types at compile time, eliminating decorators and schema files.
  • TypeScript Type-to-Code Validators - Transforms TypeScript type annotations into runtime validation, serialization, and parsing functions without decorators or separate schema files.
  • Type Validation - Generates runtime validation logic directly from TypeScript type definitions without separate schema files.
  • TypeScript Type-to-JSON Schema Generators - Produces JSON Schema and OpenAPI definitions directly from TypeScript type definitions at compile time.
  • TypeScript Type-to-Code Generators - Generates runtime validators and serializers directly from TypeScript type annotations during compilation, eliminating decorators and separate schema files.
  • Compile-Time Protobuf Decoders - Reads Protocol Buffer binary payloads and converts them into typed TypeScript objects using compile-time generated binary readers.
  • Strict Object Validation - Validates parsed objects against TypeScript types, rejecting extra properties in strict mode.
  • LLM Structured Output Generators - Produces validated, type-safe objects from LLM responses using TypeScript interfaces as the source of truth.
  • Bundled Generators - Generates a bundled JSON schema, parser, coercer, and validator for LLM structured output requests.
  • Self-Correcting Validators - Produces validated JSON objects from TypeScript interfaces with a validation callback for LLM self-correction.
  • TypeScript Class-to-LLM Tool Generators - Creates typed function schemas from TypeScript classes for LLM tool calling with automatic parsing, coercion, and validation.
  • TypeScript Type Sources of Truth - Generates runtime validators, serializers, and schemas directly from TypeScript type definitions.
  • Compile-Time Validator Generators - Generates dedicated type checkers from TypeScript types at compile time, validating input without runtime schema definitions.
  • Runtime Type Assertions - Throws detailed errors when input data does not match a TypeScript type, providing strict runtime enforcement.
  • Runtime Structural Type Validations - Validates data structures against TypeScript type definitions at runtime with detailed error reporting.
  • LLM - Validates LLM output and formats errors as annotated JSON for model self-correction.
  • API Client SDK Generators - Generates fully typed client SDKs from NestJS controller source code automatically.
  • TypeScript Class Converters - Converts TypeScript classes with JSDoc into JSON Schema tool definitions for LLM invocation.
  • Vercel - Exports generated function schemas as Vercel AI SDK tools for use with the generateText function.
  • Request Body Validations - Validates incoming HTTP request payloads against pure TypeScript interfaces without decorators.
  • Typed Decorator Replacements - Replaces standard NestJS decorators with typed versions that validate and serialize using generated TypeScript types.
  • OpenAPI Specification Generators - Produces OpenAPI and JSON Schema definitions directly from TypeScript types at compile time.
  • MCP Protocol Integrations - Registers generated function schemas as tools on an MCP server for client use.
  • LLM Integration Frameworks - Wraps generated tool schemas into adapters for Vercel AI SDK, LangChain, and Model Context Protocol.
  • REST Call Executors - Performs HTTP requests when an LLM selects a tool using OpenAPI connection details.
  • LangChain Tool Integrations - Exports generated function schemas as LangChain dynamic structured tools for agent executors.
  • MCP Converters - Registers TypeScript class methods as MCP tools using JSDoc and TypeScript types for schemas.
  • HTTP API Tool Calls - Performs HTTP requests to remote API servers when an LLM invokes a generated tool function.
  • Full Structure Validators - Walks entire input structures and reports every mismatched field instead of stopping at the first error.
  • Branded Tag Creators - Creates new branded tags with arbitrary validation logic, target types, and optional mutual exclusivity rules.
  • Reusable Validator Generators - Generates standalone, importable validation functions from types to eliminate code duplication.
  • Protocol Buffers Serializers - Generates binary Protocol Buffer payloads from TypeScript objects at compile time without requiring .proto schema files.
  • TypeScript Type-to-Protobuf Codecs - Encodes and decodes Protocol Buffer binary messages using TypeScript type definitions as the single source of truth.
  • Schema Validators - Checks coerced LLM output against full type schemas including constraints like formats and ranges.
  • Data Type Coercion - Corrects type mismatches in already-parsed JSON objects, converting strings to numbers or booleans.
  • Protobuf Scalar Mappings - Maps TypeScript number and bigint types to specific Protocol Buffer scalar types using type tags.
  • Lenient Parsers - Provides a lenient JSON parser that recovers data from malformed input while reporting syntax errors.
  • Strict Tool Argument Validators - Rejects LLM-generated arguments containing properties not declared on the parameter type.
  • OpenAPI Argument Validators - Checks parsed arguments against schemas and returns annotated error feedback for LLM self-correction.
  • Type-Based Case Converters - Rewrites all property names of an object to camel, pascal, snake, or kebab case at both type and runtime.
  • Type-Based Property Strippers - Walks input objects and deletes properties not declared on the target TypeScript type, mutating the object in place.
  • OpenAPI-to-Tool Converters - Transforms OpenAPI operations into Vercel AI SDK tools with parameters and descriptions.
  • LangChain OpenAPI Tool Converters - Generates LangChain tools from OpenAPI documents with parsing, coercion, and validation.
  • Plain Object to Class Instance Converters - Reconstructs class instances with prototypes and methods from plain objects using factories, constructors, or field copies.
  • Schema Field Excluders - Omits properties with hidden or internal JSDoc tags from the emitted JSON Schema output.
  • Reusable Parser Factories - Typia creates a pre-compiled parser function for a specific type that can be reused across multiple calls without re-analyzing the type.
  • LLM Response Parsers - Leniently parses and coerces LLM-generated JSON text into typed objects, handling common errors.
  • Vendor Extensions - Adds non-standard x-prefixed properties to generated JSON Schema for vendor-specific tooling or internal flags.
  • Compiler Transformation Pipelines - Patches the TypeScript compiler to apply type-to-code transforms automatically during every build.
  • Build-Time Compilers - Generates validators at compile time by wiring type-to-code transforms into TypeScript compilers and bundlers.
  • Protobuf Decoders - Reads Protocol Buffer binary payloads and converts them into strongly typed TypeScript objects.
  • Compiler Toolchain Integrations - Generates validation and serialization code at compile time by wiring type-to-code transforms into TypeScript compilers and bundlers.
  • Branded Type Tag Constraints - Intersects branded type tags into base types to enforce numeric ranges, string lengths, or formats at runtime.
  • Dialect Version Selectors - Selects between OpenAPI 3.1 and 3.0 dialects when generating schemas from TypeScript types.
  • Per-Method Schema Generators - Creates per-method JSON Schemas from class definitions for framework-agnostic tooling.
  • Protobuf Schema Generators - Generates standard proto schema text files directly from TypeScript type definitions.
  • Multi-Format Schema Generators - Emits JSON Schema, OpenAPI, and Protocol Buffer schemas from a single TypeScript type definition.
  • Random Data Generators - Creates random sample data that conforms to a given TypeScript type for testing and prototyping.
  • Type-Constrained - Creates random sample data that conforms to a given TypeScript type, respecting type tags for constraints like format, range, and length.
  • Pre-Compiled Reusable Functions - Generates pre-compiled parser functions for specific types that can be called repeatedly.
  • Compile-Time Zero-Overhead Validators - Replaces validation call sites with hand-written, type-specialized checks during compilation, leaving no general-purpose validator at runtime.
  • Object Property Prohibitions - Reports each unexpected property on an object as a separate validation error during strict validation.
  • Property Strictness - Enforces strict structural matching by rejecting objects with undeclared properties at runtime.
  • Compile-Time Inline Validator Generators - Generates specialized inline validation checks during compilation, eliminating runtime schema objects for faster execution.
  • Reusable Decoder Factories - Generates pre-compiled decoder functions from a type that can be called repeatedly without re-parsing the type definition.
  • Custom Validation Rules - Extends validation with custom type tags that enforce arbitrary string, number, or bigint rules via inline expressions.
  • Incremental Adoption Adapters - Allows mixing typed decorators with existing framework decorators on a per-route basis without disruption.
  • Validation Error Differentiation - Throws a structured error on the first mismatched field, returning the input unchanged on success.
  • Tool Execution Error Reporters - Catches tool exceptions and returns structured error messages to keep LLM conversations alive.
  • JSDoc Constraint Applicators - Applies runtime validation constraints from JSDoc annotations on TypeScript types.
  • Runtime Business Rule Validation - Hooks custom per-method validators into tool harnesses to enforce domain-specific business rules.
  • JSDoc-to-Schema Annotations - Includes TypeScript tags and JSDoc comments as standard JSON Schema fields like format and description.
  • Type Coercion Utilities - Converts string-typed values from LLM outputs to their expected schema types like numbers or booleans.
  • Runtime Type Checkers - Returns true or false when checking whether input matches a declared TypeScript type, with automatic type narrowing.
  • Schema-Driven Test Data Generators - Creates values satisfying TypeScript types, using type tags to constrain generated values like email format or numeric ranges.
  • LLM Tool - Catches tool execution exceptions and returns structured errors for LLM retry.
  • Runtime Validation - High-performance runtime validator using static types.
  • Validation and Serialization - Performs high-speed runtime validation using TypeScript types.

Star history

Star history chart for samchon/typiaStar history chart for samchon/typia

AI search

Explore more awesome repositories

Describe what you need in plain English — the AI ranks thousands of curated open-source projects by relevance.

Start searching with AI

Open-source alternatives to Typia

Similar open-source projects, ranked by how many features they share with Typia.
  • everit-org/json-schemaeverit-org avatar

    everit-org/json-schema

    901View on GitHub↗

    This project is a Java library designed to validate JSON documents against defined schema specifications. It functions as a standards-compliant engine that ensures data integrity by checking structural compliance and enforcing business rules within Java applications. The library distinguishes itself through its flexible validation strategies, allowing developers to inject custom logic and pattern-matching engines to handle specialized data formats. It supports configurable execution modes, enabling users to either halt validation immediately upon the first error or collect all violations for

    Java
    View on GitHub↗901
  • servicestack/servicestackServiceStack avatar

    ServiceStack/ServiceStack

    5,498View on GitHub↗

    ServiceStack is a high-performance .NET web framework designed for building type-safe APIs using strongly-typed request and response objects. It functions as a message-based API engine that decouples business logic from the transport layer, allowing services to be exposed via multiple protocols including HTTP, gRPC, and various message queue providers. The framework is distinguished by its type-safe API generator, which produces native client SDKs and data transfer objects from service metadata across multiple languages. It also includes a distributed service gateway for microservices orchest

    C#c-sharpcsvframework
    View on GitHub↗5,498
  • microsoft/pomlmicrosoft avatar

    microsoft/poml

    4,853View on GitHub↗

    Poml is a prompt management framework and templating engine designed for authoring, versioning, and rendering structured prompts for large language models. It uses a semantic markup language to organize prompts into reusable templates, combining them with dynamic context and data to generate formatted inputs. The system distinguishes itself by decoupling core prompt logic from final presentation through a stylesheet-based approach. It provides a dedicated JSON schema output generator to enforce strict, machine-parsable model responses and a configuration interface for managing function tool s

    TypeScriptllmmarkup-languageprompt
    View on GitHub↗4,853
  • strands-agents/sdk-pythonstrands-agents avatar

    strands-agents/sdk-python

    6,176View on GitHub↗

    This is an open-source Python SDK for building and orchestrating production-grade AI agents. It provides a unified framework for creating conversational agents that can use tools, maintain state, and coordinate across multiple language model providers including OpenAI, Anthropic, Google, Amazon Bedrock, and locally-hosted models. The SDK supports multi-agent orchestration through graphs, teams, and swarms, allowing several specialized agents to collaborate on complex tasks. Agents can be composed as callable tools that other agents invoke, and the framework includes policy handlers that inspe

    Python
    View on GitHub↗6,176
See all 30 alternatives to Typia→

Frequently asked questions

What does samchon/typia do?

Typia is a compile-time code generator that transforms TypeScript type annotations into runtime validation, serialization, and schema functions without requiring decorators or separate schema files. It generates optimized validation and serialization code during TypeScript compilation, producing dedicated functions for each type that eliminate runtime schema objects for faster execution.

What are the main features of samchon/typia?

The main features of samchon/typia are: Compile-Time Code Generation, TypeScript Type-to-Code Generators, LLM Tool Calling, Schema Generators from Types, Correctors, LLM Tool Definitions, Function Calling Interfaces, Error-Correction Feedback Loops.

What are some open-source alternatives to samchon/typia?

Open-source alternatives to samchon/typia include: everit-org/json-schema — This project is a Java library designed to validate JSON documents against defined schema specifications. It functions… servicestack/servicestack — ServiceStack is a high-performance .NET web framework designed for building type-safe APIs using strongly-typed… microsoft/poml — Poml is a prompt management framework and templating engine designed for authoring, versioning, and rendering… strands-agents/sdk-python — This is an open-source Python SDK for building and orchestrating production-grade AI agents. It provides a unified… a-h/templ — Templ is a type-safe HTML templating engine and UI framework for Go. It provides a system for building reusable HTML… square/moshi — Moshi is a JSON serialization library and parser for Kotlin and Java. It functions as a reflectionless JSON encoder…