nestia

samchonMIT活跃维护

把 NestJS 的控制器直接变成类型安全的 API 和 LLM 函数调用工具,省去手写 DTO 与校验,适合快速搭建 AI 聊天机器人后端。

NestJS Helper + AI Chatbot Development

v14.2.0发布于 2026-11-07 02:59 UTC2,181star +1 / 7 天128fork同步于 2026-11-10 17:47 UTC

怎么上手

由 README 提炼,执行前请确认
npm install @nestia/core @nestia/sdk
硬件要求按 README 说明

README 未说明

下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

NestJS 辅助库集合,用纯 TypeScript 类型自动生成校验、SDK、Swagger 与 E2E 测试

把 NestJS 的控制器直接变成类型安全的 API 和 LLM 函数调用工具,省去手写 DTO 与校验,适合快速搭建 AI 聊天机器人后端。

核心能力

  • 用 @TypedBody 等装饰器以纯 TS 类型做请求校验
  • 运行时校验比 class-validator 快 20000 倍
  • 从控制器自动生成带 DTO 类型的 fetch SDK
  • 内置 Mockup 模拟器,无需真实后端即可联调
  • 自动生成 E2E 测试函数与 Swagger 文档

容易踩的坑

README 未给出完整初始化步骤,需按官网 Setup 文档配置编译插件;SDK 与 Swagger 生成依赖 CLI 构建流程,需单独运行 nestia 命令

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

5 个版本v14.2.0
  1. v14.2.0最新正式版2026-11-07 · 2026-11-07 02:59 UTC

       🚀 Features

        View changes on GitHub
  2. v14.1.02026-10-23 · 2026-10-23 22:08 UTC
    查看更新说明

    TypeScript 7.1 support

    Nestia 14.1.0 supports TypeScript 7.1 alongside TypeScript 7.0. The native core transform and linked SDK contributor select the compiler target from the project's installed TypeScript version.

    • Requires ttsc >=0.34.1 and Go 1.27 for native source-plugin builds.
    • Pins the typia runtime and native transform to the matching 15.2.0 release.
    • Removes the shared native node factory so distinct Programs can emit concurrently, with one worker per Program. Both compiler lines run concurrent-emit race regressions.
    • Aligns decomposed Swagger vendor extensions with typia's finite JavaScript-number grammar: nonfinite numeric text stays a string, while finite JavaScript numeric spellings become numbers.
    • TypeScript 7.1 content mappers inherit launcher permission; invoke ttsc --runExternalCode --emit when external code is needed.

    Implemented in #1797 for campaign #1796, including #1793, #1794 and #1795.

       🚀 Features

        View changes on GitHub
  3. v14.0.42026-10-15 · 2026-10-15 10:46 UTC
    查看更新说明

       🐞 Bug Fixes

        View changes on GitHub
  4. v14.0.32026-10-07 · 2026-10-07 07:20 UTC
    查看更新说明

       🐞 Bug Fixes

       🏎 Performance

        View changes on GitHub
  5. v14.0.22026-10-02 · 2026-10-02 16:48 UTC
    查看更新说明

       🐞 Bug Fixes

        View changes on GitHub

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    Nestia

    Nestia Logo

    GitHub license npm version Downloads Build Status Guide Documents Gurubase Discord Badge

    Nestia is a set of helper libraries for NestJS, supporting below features:

    • @nestia/core:
      • Super-fast/easy decorators
      • Advanced WebSocket routes
    • @nestia/sdk:
      • Swagger generator, more evolved than ever
      • SDK library generator for clients
      • Mockup Simulator for client applications
      • Automatic E2E test functions generator
    • @nestia/e2e: Test program utilizing e2e test functions
    • @nestia/benchmark: Benchmark program using e2e test functions
    • @nestia/editor: Swagger-UI with Online TypeScript Editor
    • @agentica: Agentic AI library specialized in LLM function calling
    • @autobe: Vibe coding agent generating NestJS application
    • nestia: Just CLI (command line interface) tool

    [!NOTE]

    • Only one line required, with pure TypeScript type
    • Enhance performance 30x up
      • Runtime validator is 20,000x faster than class-validator
      • JSON serialization is 200x faster than class-transformer
    • Software Development Kit
      • Collection of typed fetch functions with DTO structures like tRPC
      • Mockup simulator means embedded backend simulator in the SDK
        • similar with msw, but fully automated

    nestia-sdk-demo

    Left is NestJS server code, and right is client (frontend) code utilizing SDK

    Sponsors and Backers

    Thanks for your support.

    Your donation would encourage nestia development.

    Backers

    Guide Documents

    Check out the document in the website:

    🏠 Home

    📖 Features

    🔗 Appendix