A Go module for building colorful, styled console output with progress bars, tables, trees, charts, and interactive prompts.
jedib0t/go-pretty
A Go library for printing tables, lists, progress bars and styled text to the terminal, with heavy customization.
- Stars
- 3,554
- Forks
- 151
- Open issues
- 17
- Last commit
- 19 days ago
What is it?
go-pretty is a Go library for making console output readable. It provides packages for rendering tables, hierarchical lists, progress bars and text utilities, with a focus on customization and flexibility.
The table package supports colors, automatic cell merging, sorting, paging, and output in ASCII, HTML, Markdown, CSV and TSV formats. The list package renders nested lists with multiple indentation levels and can output ASCII, HTML or Markdown. The progress package tracks one or more tasks with ETA, speed calculation, indeterminate indicators and customizable styles.
The text package offers string helpers that understand ANSI escape sequences, covering alignment, colors, cursor control, case and format transformations, padding, trimming and wrapping. Other packages in the library rely on it internally.
Key features
- 01Renders tables with colors, auto-merged cells, sorting and paging
- 02Exports tables to ASCII, HTML, Markdown, CSV and TSV
- 03Displays multi-level lists with customizable indentation
- 04Shows progress bars with ETA, speed and indeterminate indicators
- 05Provides ANSI-aware text utilities for alignment, padding and wrapping
Use cases
- Printing query results or reports as formatted tables in a Go CLI
- Showing progress of concurrent download or batch tasks in the terminal
- Generating Markdown or HTML tables from Go data for documentation
Quick start
- 1
Add the library to your Go module
go get github.com/jedib0t/go-pretty/v6 - 2
Try the nested colored tables demo
go run github.com/jedib0t/go-pretty/v6/cmd/demo-table@latest colors
Things to know
- Major version v6 must be used in the import path.
In collections
Topics
FAQ
- What is go-pretty?
- A Go library for printing tables, lists, progress bars and styled text to the terminal, with heavy customization. go-pretty is a Go library for making console output readable. It provides packages for rendering tables, hierarchical lists, progress bars and text utilities, with a focus on customization and flexibility.
- Is go-pretty free to use? What license does it have?
- go-pretty is open source under the MIT license. Check the license terms before using it in commercial products.
- Is go-pretty still maintained?
- Actively maintained. The last commit to go-pretty was on Oct 19, 2026.
- What can I use go-pretty for?
- Printing query results or reports as formatted tables in a Go CLI Showing progress of concurrent download or batch tasks in the terminal Generating Markdown or HTML tables from Go data for documentation
- How do I install go-pretty?
- Add the library to your Go module: go get github.com/jedib0t/go-pretty/v6 Try the nested colored tables demo: go run github.com/jedib0t/go-pretty/v6/cmd/demo-table@latest colors
- Where can I get go-pretty?
- The source code and installation instructions are on GitHub: https://github.com/jedib0t/go-pretty
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
A fast, extensible progress bar for Python loops, iterables, and command-line pipes.
A Rust library for showing progress bars and spinners in command line applications.
A small Ruby framework for building interactive command-line interfaces with prompts, spinners, progress bars, and nested frames.
A Go CLI that records terminal sessions into GIFs, videos or ASCII output from scripted .tape files, for demos and integration tests.
A header-based C++ library for building terminal user interfaces with a functional, component-driven style, with no external dependencies.