# kr/pretty

Pretty printing for Go values

Repository: https://github.com/kr/pretty
Canonical: https://ross.abutalabs.com/products/pretty
Homepage: http://godoc.org/github.com/kr/pretty
Language: Go
License: MIT
License Family: permissive
Last push: 2024-07-26T19:52:02+00:00

## Health v2 (maintenance only)
Score: 32/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 35, longevity 100
- inputs: {"age_days": 5710, "days_push": 768, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases, no_readme
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1410, forks 160 (observed 2026-08-28T04:04:38.812400+00:00)

## What it is
A small Go library that provides pretty-printing for Go values, including a fmt-compatible Formatter and convenience wrappers around fmt and log. It also offers Diff functions that produce human-readable descriptions of differences between two values.

## Use cases
- pretty-print Go structs for debugging
- print long nested data structures without line wrapping
- diff two Go values in tests
- format values with fmt.Printf using %# v
- log complex values readably

## When to choose
- you need readable multi-line output of nested Go values during debugging
- you want simple value diffs in Go tests
- you want a tiny, widely imported, MIT-licensed dependency

## When to avoid
- you need JSON or structured machine-readable output
- you need actively developed features or modern formatting alternatives
- you only need simple fmt printing of flat values

## Facets
- artifact type: library
- maturity: maintenance
- function: developer-tools, logging, testing
- domain: developer-tools, testing
- platform: go, cross-platform
- tags: pretty-printing, debugging, diff, fmt-formatter, command-line

## Member repositories
- kr/pretty (main) score 32

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:38.812400+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-30T04:38:28.781415+00:00, confidence not recorded.
  - homepage: http://godoc.org/github.com/kr/pretty (fetched 2026-08-29T11:51:47.186890+00:00, sha 1977a6499a38)
  - site_page: https://pkg.go.dev/about (fetched 2026-08-29T11:51:47.198752+00:00, sha 757852027879)
  - site_page: https://pkg.go.dev/github.com/kr/pretty (fetched 2026-08-29T11:51:47.196728+00:00, sha 0146118957d8)
  - site_page: https://go.dev/project (fetched 2026-08-29T11:51:47.231468+00:00, sha d5ca00bb378b)
- Data as of 2026-08-30T08:39:29.467469+00:00.
