Skip to content
Agents tracked: 506 Releases (7d): 634 Agent status: 3 with issuesSince last limit reset: Claude 15d · Codex 0d For AI agents: Markdown Updated Nov 26, 2026

pino-pretty

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

Logging, monitoring and analyticsNPM

GitHubWebsite

1. License

License from npm.

github.com/pinojs/pino-pretty

From the package registry and GitHub, checked daily. Tap a verdict to see its source.How we checkedReport an error

What pino-pretty does

pino-pretty turns Pino's one-line JSON logs into readable terminal lines, and its own README says to keep it out of production and install it only as a dev dependency.

pino-pretty popularity

68 / 100
Gid Score, #495 overall
37.1M
downloads a week, npm
1,711
GitHub stars
66
agent projects use it
pino-pretty: downloads per weeknpm, pino-pretty 37,117,677
pino-pretty: GitHub starspinojs/pino-pretty 1,711

Gid Score measures public popularity and activity, not quality. How the Gid Score is calculated

How pino-pretty is used

  • pino-pretty is a dependency in 66 of the 6,258 public GitHub projects set up for AI coding agents that we scanned (1.4% of the 4,867 JavaScript/TypeScript ones), #10 of 121 in logging, monitoring and analytics.
  • Counting the projects our scan samples by dependency (Solana 3,067, Ethereum and EVM 1,774, 3D and games 3,130, agent frameworks and SDKs 13,750), it appears in 398; those are left out of every share on this page.
  • The most used alternative in our scan is Winston (55 projects).
  • Projects that use it most often also use Pino (87.9%), Vitest (71.2%), tsx (56.1%).

By coding agent

46 projects, 1.4%
34 projects, 1.1%
30 projects, 1.2%
14 projects, 3.0%
9 projects, 1.9%

Often used with

In 87.9% of its projects
In 71.2% of its projects
In 56.1% of its projects
In 71.2% of its projects
In 97.0% of its projects
In 42.4% of its projects
In 42.4% of its projects
In 37.9% of its projects

pino-pretty in practice

Strengths

Pipe it or wire it in

The README recommends piping app output into the CLI. This needs no code changes. The same formatter also works as a Pino <code>transport</code> target or as a stream passed to <code>pino()</code>.

Cut noise at the terminal

<code>--minimumLevel</code> hides lower-level lines. <code>--ignore</code> and <code>--include</code> pick which keys to show, and both support dotted nested keys. For more filtering than that, the README points to <code>jq</code>.

Message templates with simple conditionals

<code>messageFormat</code> takes a template such as <code>{levelLabel} - {pid} - url:{req.url}</code>. The template can include <code>{if pid}...{end}</code> blocks. It can also be a function.

Per-key formatting functions

<code>customPrettifiers</code> maps a log property to a function. It can reformat <code>time</code>, <code>level</code>, <code>hostname</code>, <code>pid</code>, <code>name</code>, <code>caller</code> or any custom key. Each function also receives a Colorette <code>colors</code> object.

Watch out for

Not meant for production

The maintainers advise against running it in production and recommend installing it with <code>--save-dev</code>. The README shows a way to enable the transport only when <code>process.stdout.isTTY</code> is true.

Jest needs sync mode

Asynchronous writes conflict with how Jest ends tests. The README calls <code>pino(pretty({ sync: true }))</code> "the only supported way" to use it with Jest.

Function options break transport config

Pino v7+ transports cannot pass non-serializable options. A function <code>messageFormat</code> or prettifier therefore means writing a small wrapper module and pointing <code>target</code> at it.

Pretty logs only when attached to a terminal

const pino = require('pino')
// Define the transport configuration only when the output stream is connected to a TTY
const transport = process.stdout.isTTY ? { transport: { target: 'pino-pretty' } } : {};
const logger = pino({ ...transport })
logger.info('hi')

More about pino-pretty

Packages around it
  • pino: The logger it formats
  • next: React framework
  • typescript: Typed JavaScript
  • axios: HTTP client
  • @tanstack/react-query: Server-state fetching for React
  • wagmi: React hooks for Ethereum
More in Logging, monitoring and analytics

Alternatives

pino-pretty This page

MITGid 6837.1M/wk

Winston

Versatile Node.js logging library supporting multiple transports and levels.

MITGid 7637.3M/wk

Compare pino-pretty with another tool

Get started

Install it.

npm install pino-pretty

Rules for your agent

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.