# danielgtaylor/huma

Huma REST/HTTP API Framework for Golang with OpenAPI 3.1

Repository: https://github.com/danielgtaylor/huma
Canonical: https://ross.abutalabs.com/products/huma
Homepage: https://huma.rocks/
Language: Go
License: MIT
License Family: permissive
Topics: golang-library, openapi3, json-schema, documentation, openapi-server, api, rest, web, framework, swagger-ui, huma, hacktoberfest, openapi, rest-api, golang, openapi31, fastapi
Last push: 2026-08-24T16:59:39+00:00

## Health v2 (maintenance only)
Score: 98/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 99, release rhythm 95, longevity 100
- inputs: {"age_days": 2369, "days_push": 9, "days_rel": 35, "gap_med": 13, "n_releases_24m": 24}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 4347, forks 281 (observed 2026-08-28T04:08:46.159595+00:00)

## What it is
Huma is a modern micro-framework for building HTTP REST/RPC APIs in Go, backed by OpenAPI 3.1 and JSON Schema. It is router-agnostic (bring your own router), generates always-up-to-date OpenAPI specs and interactive docs from code, and includes declarative validation, RFC 9457 errors, and a built-in service CLI.

## Use cases
- build a REST API in Go with automatic OpenAPI 3.1 documentation
- add OpenAPI docs to an existing Go service without rewriting routes
- generate always up-to-date API specs from Go code
- use chi, gin, echo, fiber, or gorilla/mux with a declarative API layer
- serve interactive API docs like Stoplight Elements or Swagger UI
- add request validation and RFC 9457 JSON errors to a Go HTTP API
- wrap a Go service with a CLI for flags, env vars, and graceful shutdown

## When to choose
- you want code-first OpenAPI 3.1 generation that can't drift from your implementation
- you need incremental adoption on top of an existing Go router and middleware
- you want static typing, automatic input validation, and guard rails for your API handlers
- you need generated developer tooling and interactive docs out of the box

## When to avoid
- you need a design-first workflow where the spec is authored before code
- you want a batteries-included framework with its own router, ORM, and auth
- you're building non-HTTP services or non-REST protocols
- your project must run on Go versions older than the required minimum

## Facets
- artifact type: framework
- maturity: active
- function: api-framework, web-framework, http-server, api-documentation, middleware, routing, cli
- domain: backend, web-development, apis, developer-tools, documentation
- platform: go, windows, cross-platform
- tags: openapi-3-1, json-schema, rest-api, bring-your-own-router, code-first, swagger-ui, rfc9457, content-negotiation, linux, macos

## Member repositories
- danielgtaylor/huma (main) score 98

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:46.159595+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:21:33.905018+00:00, confidence not recorded.
  - readme: https://github.com/danielgtaylor/huma (fetched 2026-08-28T04:08:46.159595+00:00, sha ccb16a43ba50)
  - homepage: https://huma.rocks/ (fetched 2026-08-29T09:10:26.436705+00:00, sha 5ef7d3894975)
  - site_page: https://huma.rocks/tutorial/installation (fetched 2026-08-29T09:10:26.439345+00:00, sha bac23fe35e6c)
  - site_page: https://huma.rocks/features (fetched 2026-08-29T09:10:26.441147+00:00, sha bd9bc7f8480e)
  - site_page: https://huma.rocks/why/what-about-design-first (fetched 2026-08-29T09:10:26.443107+00:00, sha 41cba3d81f08)
  - site_page: https://huma.rocks/features/bring-your-own-router (fetched 2026-08-29T09:10:26.445077+00:00, sha 52f564a6af9e)
  - site_page: https://huma.rocks/features/middleware (fetched 2026-08-29T09:10:26.447066+00:00, sha 758ebea2d38f)
  - site_page: https://huma.rocks/features/cli (fetched 2026-08-29T09:10:26.449335+00:00, sha 030ef63d5e05)
  - site_page: https://huma.rocks/features/openapi-generation (fetched 2026-08-29T09:10:26.451686+00:00, sha e03515dec6e2)
  - site_page: https://huma.rocks/features/api-docs (fetched 2026-08-29T09:10:26.453965+00:00, sha 8264e6ac9121)
- Data as of 2026-08-30T08:39:29.467469+00:00.
