# pino-pretty — card for AI agents

Pretty-printer for Pino JSON logs to make terminal output human-readable.

Category: Logging, monitoring and analytics · npm package `pino-pretty` · latest version 13.2.0 (checked 2026-11-01)
Install: `npm install pino-pretty`
License: MIT (permissive)

In your own product (generator, app, hosted service): **yes**. Permissive license: ship it inside your own product, closed or open source, and keep its license and copyright notice.

## Rules for AI agents (paste into AGENTS.md or CLAUDE.md)

## pino-pretty
- Install it as a dev dependency (`npm install --save-dev pino-pretty`). Do not make production logging depend on it.
- Prefer piping output (`node app.js | pino-pretty`) or a `transport: { target: 'pino-pretty' }` gated on `process.stdout.isTTY`.
- When using it as a stream with Pino options, pass the options first and the stream second: `pino({ level: 'info' }, stream)`.
- In Jest tests, use `pino(pretty({ sync: true }))`. That is the only supported setup.
- Function-valued options such as `messageFormat` or `customPrettifiers` cannot go through transport options. Wrap pino-pretty in a custom module and target that file.
- Do not pass both `ignore` and `include`, because `ignore` is then dropped. Do not use `errorProps` with pino@7.
- For filtering beyond `minimumLevel`, `ignore` and `include`, use `jq` instead of extending pino-pretty.

## What it is
- pino-pretty is a small formatter for ndjson log lines. The repository describes it as a "Basic prettifier for Pino log lines". It was created on 2018-03-30 and is MIT licensed. When a line looks like it came from Pino, it reads the level and timestamp and rewrites the line. The README's example turns `{"level":30,"time":1522431328992,"msg":"hello world",...}` into `[17:35:28.992] INFO (42): hello world`.
- There are three ways to use it. You can pipe a process's output into the CLI with `node app.js | pino-pretty`. You can set it as a Pino transport target. Or you can pass it to `pino()` as a stream. Flags and options control colors, which keys are shown, the time format, the minimum level, and a template for the message line.
- It is for Node.js developers who log with Pino and want to read those logs during development. The README frames it as a tool "to be used in __development__".

## Caveats
- Not meant for production: The maintainers advise against running it in production and recommend installing it with `--save-dev`. The README shows a way to enable the transport only when `process.stdout.isTTY` is true.
- Jest needs sync mode: Asynchronous writes conflict with how Jest ends tests. The README calls `pino(pretty({ sync: true }))` "the only supported way" to use it with Jest.
- Function options break transport config: Pino v7+ transports cannot pass non-serializable options. A function `messageFormat` or prettifier therefore means writing a small wrapper module and pointing `target` at it.
- Git Bash on Windows can fail: The CLI relies on stdout redirection. The README says mingw64 shells exit with a `stdout is not a tty` error.
- --include silently wins over --ignore: If you pass both flags, `--ignore` is dropped without a warning.

## Numbers (AgentGid data)
- Gid Score: 67.8 (#495 of all tools, 15 of 121 in its category)
- Used in 66 public projects set up for AI coding agents (1.1%)
- Downloads last week: 37,117,677 (as of 2026-11-24), +46.6% over 4 weeks
- GitHub stars: 1,711 (as of 2026-11-24)
- Last push: 2026-11-20

## Often used with
Pino 87.9%, Vitest 71.2%, tsx 56.1%, Zod 71.2%, TypeScript 97.0%, Testing Library 42.4%

## Checked alternatives (same job)
- Winston: https://agentgid.com/tools/winston/agent.md

## Links
- AgentGid page: https://agentgid.com/tools/pino-pretty/
- Homepage: https://github.com/pinojs/pino-pretty#readme
- Repository: https://github.com/pinojs/pino-pretty
- Source: https://github.com/pinojs/pino-pretty#readme
- Source: https://github.com/pinojs/pino-pretty
- Source: https://github.com/pinojs/pino-pretty/releases

---
AgentGid's catalog is curated: every entry was checked against the maker's official pages (registry, repository, license and pricing pages) on the date shown; a license value shows the quote it stands on wherever AgentGid has one. Usage numbers come from AgentGid's own scan of public repositories set up for AI coding agents. Claims by makers are reported, not tested by AgentGid.
