{"id":45593916,"url":"https://github.com/tsgonest/tsgonest","last_synced_at":"2026-04-10T12:05:53.874Z","repository":{"id":340018594,"uuid":"1163857644","full_name":"tsgonest/tsgonest","owner":"tsgonest","description":"a typescript compiler for nestjs that does validation, openapi, sdk and more","archived":false,"fork":false,"pushed_at":"2026-03-30T13:05:28.000Z","size":21368,"stargazers_count":11,"open_issues_count":6,"forks_count":3,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-30T14:40:27.703Z","etag":null,"topics":["nestia","nestjs","openapi","tsgo","typescript","typia"],"latest_commit_sha":null,"homepage":"https://tsgonet.dev","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tsgonest.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null},"funding":{"github":["shahriar-shojib","samchon"]}},"created_at":"2026-02-22T09:04:09.000Z","updated_at":"2026-03-30T13:05:32.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/tsgonest/tsgonest","commit_stats":null,"previous_names":["tsgonest/tsgonest"],"tags_count":41,"template":false,"template_full_name":null,"purl":"pkg:github/tsgonest/tsgonest","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsgonest%2Ftsgonest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsgonest%2Ftsgonest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsgonest%2Ftsgonest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsgonest%2Ftsgonest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tsgonest","download_url":"https://codeload.github.com/tsgonest/tsgonest/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsgonest%2Ftsgonest/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31460106,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-05T21:22:52.476Z","status":"online","status_checked_at":"2026-04-06T02:00:07.287Z","response_time":112,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["nestia","nestjs","openapi","tsgo","typescript","typia"],"created_at":"2026-02-23T13:20:13.075Z","updated_at":"2026-04-06T05:03:14.542Z","avatar_url":"https://github.com/tsgonest.png","language":"Go","funding_links":["https://github.com/sponsors/shahriar-shojib","https://github.com/sponsors/samchon"],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"apps/docs/public/logo-mark.svg\" alt=\"tsgonest\" width=\"80\" height=\"80\" /\u003e\n\u003c/p\u003e\n\n\u003ch1 align=\"center\"\u003etsgonest\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cstrong\u003eDrop-in NestJS compiler. Validates, serializes, and documents your API — from plain TypeScript types.\u003c/strong\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/tsgonest/tsgonest/releases\"\u003e\u003cimg src=\"https://img.shields.io/github/v/release/tsgonest/tsgonest?style=flat-square\" alt=\"Release\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/tsgonest/tsgonest/actions\"\u003e\u003cimg src=\"https://img.shields.io/github/actions/workflow/status/tsgonest/tsgonest/ci.yml?style=flat-square\u0026label=CI\" alt=\"CI\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/tsgonest/tsgonest/blob/main/LICENSE.md\"\u003e\u003cimg src=\"https://img.shields.io/badge/license-MIT-blue?style=flat-square\" alt=\"License\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://www.npmjs.com/package/tsgonest\"\u003e\u003cimg src=\"https://img.shields.io/npm/v/tsgonest?style=flat-square\" alt=\"npm\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n---\n\ntsgonest replaces `tsc`, `class-validator`, `class-transformer`, and `@nestjs/swagger` with a single build step. Write your types, run `tsgonest build`, and get validation, fast JSON serialization, and OpenAPI 3.2 — all generated at compile time.\n\n```ts\nexport interface CreateUserDto {\n  name: string \u0026 tags.Trim \u0026 tags.Min\u003c1\u003e \u0026 tags.Max\u003c255\u003e;\n  email: string \u0026 tags.Email;\n  age: number \u0026 tags.Min\u003c0\u003e \u0026 tags.Max\u003c150\u003e;\n}\n\n@Controller('user')\nexport class UserController {\n  @Post()\n  createUser(@Body() body: CreateUserDto) {\n    // body is validated at compile time — no pipes, no interceptors\n  }\n}\n```\n\n```bash\nnpx tsgonest build\n```\n\n## Why\n\n- **~10x faster compilation** via [typescript-go](https://github.com/microsoft/typescript-go)\n- **Zero runtime overhead** — validation and serialization are injected at compile time\n- **Zero decorators** — OpenAPI generated from static analysis, not `@ApiProperty()`\n- **Drop-in** — works with existing NestJS projects, no `ts-patch` or plugins\n\n## Install\n\n```bash\n# Migrate from class-validator / nestia (recommended)\nnpx tsgonest@latest migrate\n\n# Or install manually\npnpm install tsgonest @tsgonest/runtime @tsgonest/types\n```\n\n## CLI\n\n```bash\ntsgonest build                  # production build\ntsgonest dev                    # watch + auto-restart\ntsgonest check                  # type check (no emit)\ntsgonest check --watch          # continuous checking\ntsgonest openapi                # generate OpenAPI only\ntsgonest openapi --name public  # specific output\ntsgonest sdk                    # generate typed client SDK\ntsgonest migrate                # codemod migration\n```\n\n## Constraints\n\nAnnotate with branded types (`@tsgonest/types`) or JSDoc — both can be mixed.\n\n```ts\nimport { tags } from '@tsgonest/types';\n\nexport interface CreateUserDto {\n  name: string \u0026 tags.Trim \u0026 tags.MinLength\u003c1\u003e \u0026 tags.MaxLength\u003c255\u003e;\n  email: string \u0026 tags.Email \u0026 tags.Error\u003c'Please provide a valid email'\u003e;\n  age: number \u0026 tags.Min\u003c0\u003e \u0026 tags.Max\u003c150\u003e \u0026 tags.Type\u003c'int32'\u003e;\n  score?: number \u0026 tags.Default\u003c0\u003e;\n  tags: string[] \u0026 tags.MinItems\u003c1\u003e \u0026 tags.UniqueItems;\n}\n```\n\n32 built-in formats (`email`, `uuid`, `url`, `ipv4`, `date-time`, `jwt`, ...), numeric types (`int32`, `uint32`, `float`, ...), custom validators via `tags.Validate\u003ctypeof fn\u003e`, and custom error messages via `tags.Error\u003c\"msg\"\u003e`.\n\n[Full constraint reference](https://tsgonest.dev)\n\n## Packages\n\n| Package | Description |\n| --- | --- |\n| [`tsgonest`](https://www.npmjs.com/package/tsgonest) | CLI + compiler |\n| [`@tsgonest/runtime`](https://www.npmjs.com/package/@tsgonest/runtime) | `defineConfig`, `TsgonestValidationError`, `Returns`, `FormDataBody`, `EventStream` |\n| [`@tsgonest/types`](https://www.npmjs.com/package/@tsgonest/types) | Branded phantom types — `tags.Email`, `tags.Min`, `tags.Trim`, etc. |\n\n## Platform support\n\nmacOS (ARM64, x64) / Linux (x64, ARM64 — static, works on glibc + musl) / Windows (x64, ARM64)\n\n## Sponsors\n\n\u003ch3 align=\"center\"\u003eGold Sponsor\u003c/h3\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://tixio.io?ref=tsgonest\" target=\"_blank\"\u003e\n    \u003cpicture\u003e\n      \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://app.tixio.io/images/tixioLogo.png\"\u003e\n      \u003cimg alt=\"Tixio\" src=\"https://app.tixio.io/images/tixioLogo.png\" width=\"50\"\u003e\n    \u003c/picture\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://tixio.io?ref=tsgonest\" target=\"_blank\"\u003e\u003cstrong\u003eTixio\u003c/strong\u003e\u003c/a\u003e\u003cbr\u003e\n  \u003csub\u003eStop wasting time and money on slack jira clickup and 10+ other tools, get tixio instead. use code `tsgonest` for 20% discount\u003c/sub\u003e\n\u003c/p\u003e\n\n\u003cbr\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003csub\u003e\n    \u003ca href=\"https://github.com/sponsors/shahriar-shojib\"\u003eBecome a sponsor\u003c/a\u003e\n  \u003c/sub\u003e\n\u003c/p\u003e\n\n## Documentation\n\n[tsgonest.dev](https://tsgonest.dev)\n\n## Acknowledgments\n\n- [typescript-go](https://github.com/microsoft/typescript-go) — Microsoft's Go port of TypeScript\n- [typia](https://github.com/samchon/typia) — Pioneered type-driven validation; tsgonest's branded types are inspired by typia\n- [nestia](https://github.com/samchon/nestia) — Decorator-free NestJS validation and OpenAPI via typia\n- [tsgolint](https://github.com/nicolo-ribaudo/tsgolint) — Established the shim pattern for accessing tsgo internals\n\n## Contributing\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md).\n\n## License\n\n[MIT](LICENSE.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftsgonest%2Ftsgonest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftsgonest%2Ftsgonest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftsgonest%2Ftsgonest/lists"}