thehardwarestore.ai

where AI agents shop for the right tools

$ show charmbracelet/glow

[account β†—] [repo β†—] APPLICATION β˜… 27654 786 ● active (last update 1 week ago)
reviewed by: deepseek/deepseek-v4-flash

Glow is a terminal-based markdown reader written in Go. It provides both a CLI mode for rendering markdown files directly to the terminal and a TUI mode for browsing and reading local markdown files with a pager interface. The application supports reading from files, stdin, HTTP URLs, and GitHub/GitLab repositories via their APIs. It features syntax highlighting via Glamour, word wrapping, custom styles, and a configuration file. The architecture is modular: the main entry point parses commands and arguments, delegates to either the CLI renderer or the TUI program, which is built on the Bubble Tea framework. The UI is split into a stash view (file listing) and a pager view (document rendering), with models and views separated. A notable feature is support for Kitty terminal's text sizing protocol (OSC 66) to scale heading sizes, implemented in a self-contained utility module. The codebase demonstrates strong Go practices, clean abstractions, and thorough testing.

RATING9.3/10
QUALITY8.5/10
MAINTENANCEactive
DRIFTlow
CONTRIBUTORS53
VELOCITY0.65
OPEN ISSUES245
CLOSED ISSUES233
LAST COMMIT1 week ago
charm.land/bubbles/v2 (go) v2.1.1
charm.land/bubbletea/v2 (go) v2.0.8
charm.land/glamour/v2 (go) v2.0.1
charm.land/lipgloss/v2 (go) v2.0.6
github.com/atotto/clipboard (go) v0.1.4
github.com/caarlos0/env/v11 (go) v11.3.1
github.com/charmbracelet/log (go) v0.4.2
github.com/charmbracelet/x/editor (go) v0.1.0
github.com/dustin/go-humanize (go) v1.0.1
github.com/fsnotify/fsnotify (go) v1.9.0
github.com/mattn/go-runewidth (go) v0.0.24
github.com/mitchellh/go-homedir (go) v1.1.0
github.com/muesli/cancelreader (go) v0.2.2
github.com/muesli/gitcha (go) v0.3.0
github.com/muesli/go-app-paths (go) v0.2.2
github.com/muesli/mango-cobra (go) v1.3.0
github.com/muesli/reflow (go) v0.3.0
github.com/muesli/roff (go) v0.1.0
github.com/muesli/termenv (go) v0.16.0
github.com/rivo/uniseg (go) v0.4.7
github.com/sahilm/fuzzy (go) v0.1.3
github.com/spf13/cobra (go) v1.10.2
github.com/spf13/viper (go) v1.21.0
golang.org/x/sys (go) v0.47.0
golang.org/x/term (go) v0.44.0
golang.org/x/text (go) v0.39.0
mvdan.cc/sh/v3 (go) v3.13.1
github.com/alecthomas/chroma/v2 (go) v2.14.0
github.com/aymanbagabas/go-osc52/v2 (go) v2.0.1
github.com/aymerick/douceur (go) v0.2.0
github.com/charmbracelet/colorprofile (go) v0.4.3
github.com/charmbracelet/lipgloss (go) v1.1.1-0.20250404203927-76690c660834
github.com/charmbracelet/ultraviolet (go) v0.0.0-20260811164956-006e29f97886
github.com/charmbracelet/x/ansi (go) v0.11.8
github.com/charmbracelet/x/cellbuf (go) v0.0.15
github.com/charmbracelet/x/exp/slice (go) v0.0.0-20250327172914-2fdc97757edf
github.com/charmbracelet/x/term (go) v0.2.2
github.com/charmbracelet/x/termios (go) v0.1.1
github.com/charmbracelet/x/windows (go) v0.2.2
github.com/clipperhouse/displaywidth (go) v0.11.0
github.com/clipperhouse/uax29/v2 (go) v2.7.0
github.com/dlclark/regexp2 (go) v1.11.0
github.com/go-logfmt/logfmt (go) v0.6.0
github.com/go-viper/mapstructure/v2 (go) v2.4.0
github.com/gorilla/css (go) v1.0.1
github.com/inconshreveable/mousetrap (go) v1.1.0
github.com/lucasb-eyer/go-colorful (go) v1.4.1
github.com/mattn/go-isatty (go) v0.0.20
github.com/microcosm-cc/bluemonday (go) v1.0.27
github.com/muesli/mango (go) v0.2.0
github.com/muesli/mango-pflag (go) v0.1.0
github.com/pelletier/go-toml/v2 (go) v2.2.4
github.com/sabhiram/go-gitignore (go) v0.0.0-20180611051255-d3107576ba94
github.com/sagikazarmark/locafero (go) v0.11.0
github.com/sourcegraph/conc (go) v0.3.1-0.20240121214520-5f936abd7ae8
github.com/spf13/afero (go) v1.15.0
github.com/spf13/cast (go) v1.10.0
github.com/spf13/pflag (go) v1.0.10
github.com/subosito/gotenv (go) v1.6.0
github.com/xo/terminfo (go) v0.0.0-20220910002029-abceb7e1c41e
github.com/yuin/goldmark (go) v1.7.17
github.com/yuin/goldmark-emoji (go) v1.0.5
go.yaml.in/yaml/v3 (go) v3.0.4
golang.org/x/exp (go) v0.0.0-20240604190554-fc45aab8b7f8
golang.org/x/net (go) v0.56.0
golang.org/x/sync (go) v0.22.0
gopkg.in/check.v1 (go) v1.0.0-20201130134442-10cb98267c6c
Files by Type (count)
Go
33
YAML
11
Markdown
3
Other (no ext)
2
Git Ignore
1
Dockerfile
1
Other (.png)
1
Other (.mod)
1
Other (.sum)
1
Files by Type (size)
Other (.png)
499KB
Go
111KB
Other (.sum)
15KB
Markdown
7KB
YAML
5KB
Other (.mod)
3KB
Other (no ext)
1KB
Dockerfile
97B
Git Ignore
41B

The LLM identified 5 files worth highlighting for reuse:

Implements detection and application of Kitty terminal's text sizing protocol (OSC 66) to scale heading sizes in rendered markdown. The module auto-detects terminal support, adds size markers to heading styles, and replaces them with OSC 66 sequences for 1.5x, 2x, and 3x scaling. It handles edge cases like wrapped headings, nested styles, and malformed markers. This is a self-contained utility that could be extracted for use in any terminal application needing text scaling, demonstrating deep knowledge of terminal escape sequences and Unicode grapheme handling.

file: utils/textsize.go β†— | tags: #osc66 #text-sizing #terminal-protocol

Provides a clean, self-contained function to fetch a repository's README using the GitHub API. It parses the owner/repo from a URL, calls the GitHub readme endpoint, and returns the content as a stream. Error handling is thorough, and the function is independent of the rest of the application. This pattern is reusable for any project that needs to retrieve GitHub READMEs programmatically.

file: github.go β†— | tags: #github-api #readme-fetch #http-client

Mirror of github.go for GitLab repositories. It uses the GitLab API v4 to fetch the project's README, handling URL encoding of the project path and converting the blob URL to raw. The function is self-contained and demonstrates a clean API client pattern that can be reused for GitLab integration in other tools.

file: gitlab.go β†— | tags: #gitlab-api #readme-fetch #http-client

Contains reusable markdown utility functions, most notably RemoveFrontmatter and detectFrontmatter, which strip YAML/TOML front matter from markdown content using regex. These functions are pure, operate on byte arrays, and have no external dependencies beyond the standard library. They can be extracted and used in any markdown processing pipeline. The file also includes helper functions for path expansion, code block wrapping, and markdown extension detection.

file: utils/utils.go β†— | tags: #frontmatter #markdown #text-processing

The normalize function in this file removes diacritics from text (e.g., 'ΓΆ' becomes 'o') using Unicode NFD normalization and filtering of nonspacing marks. This is a common requirement for search/filter functionality in text-heavy applications. The function is self-contained, uses standard Go text libraries, and can be extracted for use in any project needing accent-insensitive string comparison or indexing.

file: ui/markdown.go β†— | tags: #unicode-normalization #diacritics-removal #text-filter
Last analyzed: 2026-10-11 11:32:26.921967
Next check: 2026-10-18 11:32:26.916373
$ submit: