charmbracelet

charmbracelet/glamour

Go MIT Dev Tools

Stylesheet-based markdown rendering for your CLI apps 💇🏻‍♀️

3.6k stars
295 forks
recent
GitHub

3.6k

Stars

295

Forks

134

Open issues

30

Contributors

v2.0.1 12 Jun 2026

AI Analysis

Glamour is a Go library that renders Markdown documents to styled ANSI terminal output, enabling CLI applications to display formatted text with customizable stylesheets. It serves developers building terminal user interfaces and CLI tools who need elegant, theme-able Markdown rendering. It is specialized for Go developers and terminal environments, not a general-purpose document converter.

Dev Tools Library Discovery value: 5/10
Documentation 8/10
Activity 8/10
Community 8/10
Code quality 7/10

Inferred from signals mentioned in the README (tests, CI, type safety) — not a review of the actual code.

Overall score 8/10

AI's overall editorial judgment — not an average of the bars above, can weigh other factors too.

markdown-rendering cli-styling go-library ansi-terminal tui
Actively maintained Well documented MIT licensed Popular Niche/specialized use case Beginner friendly Production ready
Deep Analysis · Based on README and public signals
1w ago

Go library for styled markdown rendering in CLI apps, deeply integrated into major Git tooling

Glamour is a Go library that renders markdown to ANSI-formatted terminal output using stylesheet-based configuration. It occupies a specific niche: providing production-grade markdown rendering for CLI applications. Real-world adoption is verified through integration into GitHub CLI, GitLab CLI, and Gitea CLI — three major reference implementations. The project is part of the Charm ecosystem, which produces complementary terminal UI libraries. Glamour is not a consumer-facing tool; it's infrastructure for CLI developers who need styled markdown output.

Origin

Created December 2019 within the Charm initiative, Glamour emerged to address a gap in CLI markdown rendering. The project evolved alongside sibling libraries (lipgloss for styling primitives, glow for user-facing markdown viewing). It has been maintained consistently for 6+ years, indicating sustained organizational commitment to the problem space.

Growth

Growth has been stable rather than explosive. The 3,569 stars reflect adoption primarily among CLI tool developers and the Go ecosystem, not mainstream consumer visibility. Recent trajectory (22 stars in 7 days as of June 2026) suggests plateau-level engagement typical of mature infrastructure libraries. Growth was driven by adoption in official Git CLI tools rather than viral community adoption; this reflects the project's intended audience — other developers building tools.

In production

Adoption verified through four named integrations: GitHub CLI (primary reference), GitLab CLI, Gitea CLI, and Meteor (metadata framework). These are not obscure projects — GitHub CLI is the official GitHub command-line tool, representing millions of potential users. This constitutes concrete production evidence. However, adoption is concentrated in the Git/DevOps tooling category and is not visible in consumer-facing applications.

Code analysis
Architecture

Based on README, Glamour uses a stylesheet system to map markdown constructs to ANSI styling rules. It appears to parse markdown and render through a terminal renderer. The project integrates with lipgloss (a sibling Charm library) for color downsampling and terminal capability detection. The README documents public APIs (NewTermRenderer, Render, WithWordWrap), suggesting a clean interface abstraction. Implementation details are not visible from README alone.

Tests

Coverage badge present in README; not documented in detail. The build badge indicates CI is active. Coverage percentage not specified in the README excerpt provided.

Maintenance

Last push: June 14, 2026 (17 days before analysis date). This indicates active maintenance as of mid-2026. Build status badge shown as passing. The project is part of Charm, an actively maintained organization. Release history and workflows are tracked. Maintenance appears healthy relative to a mature library with narrower scope than newer projects.

Honest verdict

ADOPT IF: You are building a CLI tool in Go that needs to render markdown with custom styling control, and you want a lightweight, well-maintained library with production pedigree (used in GitHub CLI). AVOID IF: You need markdown rendering for web, desktop GUI, or non-Go environments; you need extensive customization beyond stylesheet theming; or you require rendering of non-standard markdown extensions (check if supported). MONITOR IF: You are considering this for a new CLI project — it's stable and production-ready today, but ensure the stylesheet model meets your styling needs before committing to it in a large codebase.

Independent dimensions

Mainstream potential

3/10

Technical importance

6/10

Adoption evidence

7/10

Risks
  • Limited scope: Only renders markdown to ANSI terminal output. Cannot be used for PDF, HTML, or other formats without additional tooling.
  • Go-only: If your CLI tool is in Rust, Python, JavaScript, or other languages, you cannot use this library directly; you would need to shell out to a Go binary or reimplement the functionality.
  • Stylesheet-based theming may be insufficient for highly custom rendering logic; the abstraction assumes markdown → styled text, which may not cover edge cases in some applications.
  • Adoption is concentrated in official Git tooling; if you are building a tool outside the Git/DevOps space, you may find fewer examples and less community debugging experience.
  • No evidence of community-driven extensions or third-party stylesheet repository; styling customization is end-user responsibility.
Prediction

Glamour will likely remain a stable, actively maintained library serving the CLI developer ecosystem. Growth will remain modest because it occupies a permanent, solved niche. The project is unlikely to diversify into new domains (web, desktop) given its architectural focus on terminal rendering. Adoption will remain tied to the success of CLI tools in the Git and DevOps spaces.

0 found this helpful

Newsletter

Get analyses like this every Monday

Free weekly digest of the most interesting open-source discoveries.

Languages

Go
98.9%
Shell
1.1%

Information

Language
Go
License
MIT
Last updated
4w ago
Created
80mo ago
Analyzed with
anthropic/claude-haiku-4-5

Stars over time

Loading…

Contributors over time

Top 100 contributors only — repos with more will plateau at 100.

Loading…

Similar repos

charmbracelet

charmbracelet/glow

Glow is a terminal-based markdown reader and renderer for the CLI, designed to...

26.3k Go Dev Tools
charmbracelet

charmbracelet/lipgloss

Lip Gloss is a Go library for declarative terminal styling and layout, designed...

11.5k Go Dev Tools
charmbracelet

charmbracelet/log

A minimal, colorful structured logging library for Go that emphasizes...

3.3k Go Dev Tools
charmbracelet

charmbracelet/gum

Gum is a shell scripting tool that provides glamorous, interactive UI...

charmbracelet

charmbracelet/huh

Huh is a Go library for building interactive terminal forms and prompts with a...

vs. alternatives
charmbracelet/glow

Glow (26,087 stars) is a user-facing markdown viewer CLI built on Glamour; they are complementary, not competitive. Glow is the consumer tool; Glamour is the library that powers it.

charmbracelet/lipgloss

Lipgloss (11,496 stars) provides lower-level styling primitives. Glamour depends on lipgloss for color handling. They address different layers of the stack.

Bubble Tea (not listed in similar repos)

Bubble Tea is the Charm TUI framework; Glamour solves a different problem (markdown rendering vs. interactive UI). Both are infrastructure libraries in the Charm ecosystem.

goldmark (external, not in similar repos)

Goldmark is a pure Go markdown parser/renderer without terminal styling. Glamour provides terminal-specific styling on top of markdown parsing. Different scope and audience.

Pandoc (external, not in similar repos)

Pandoc is a universal document converter. Glamour is narrowly focused on CLI markdown styling. Pandoc is heavier, more general-purpose; Glamour is lighter, CLI-specific.