What's the difference between TUI and CLI mode?
What's the difference between TUI and CLI mode?
Glow has two primary modes:TUI (Textual User Interface) Mode:
- Interactive file browser
- Launched when you run
glowwithout arguments or with a directory - Browse markdown files in the current directory or Git repository
- High-performance pager for reading documents
- Keyboard navigation (press
?for help)
- Non-interactive markdown rendering
- Launched when you provide a file as an argument:
glow README.md - Outputs rendered markdown to stdout
- Useful for piping to other commands or pagers
- Can read from stdin:
echo "# Hello" | glow -
-t flag or CLI mode with file arguments.What markdown features does Glow support?
What markdown features does Glow support?
Glow supports CommonMark and GitHub Flavored Markdown, including:
- Headings (H1-H6)
- Emphasis (bold, italic, strikethrough)
- Lists (ordered, unordered, task lists)
- Code blocks with syntax highlighting
- Inline code
- Blockquotes
- Links and images (as links in terminal)
- Tables
- Horizontal rules
- HTML (limited support)
- Emoji :sparkles:
Which terminals are compatible with Glow?
Which terminals are compatible with Glow?
Glow works with most modern terminal emulators that support:
- ANSI color codes
- UTF-8 encoding
- 256 colors (recommended)
- kitty
- iTerm2 (macOS)
- Alacritty
- GNOME Terminal
- Konsole
- Terminal.app (macOS)
- Windows Terminal
- WezTerm
- tmux (configure with
set -g default-terminal "screen-256color") - screen
How do I create custom styles?
How do I create custom styles?
Glow supports custom styles via JSON configuration files based on the Glamour style format.Use a custom style:Set in config file:Then specify the path:Explore existing styles:
- Glamour Style Gallery
- Built-in styles:
dark,light,auto
- Check the style documentation
- Base your style on existing ones
- Customize colors, margins, and formatting
Can Glow handle large markdown files efficiently?
Can Glow handle large markdown files efficiently?
Yes! Glow is designed to handle markdown files of various sizes:For optimal performance with large files:
- Use CLI mode instead of TUI for files over several MB
- Pipe to a pager:
glow largefile.md -p - Adjust word-wrap width:
glow -w 80 largefile.md - Disable line numbers in TUI mode (set
showLineNumbers: falsein config)
- Features a high-performance pager for smooth scrolling
- Efficiently handles most documentation files
- Uses lazy loading for file discovery
- Renders the entire file to stdout
- Very fast for files up to several MB
- Combine with
lessor your preferred pager for very large files
Does Glow work offline?
Does Glow work offline?
Yes! Glow works completely offline for local files:Online features:
Glow can fetch markdown from remote sources:
- GitHub repositories:
glow github.com/user/repo - GitLab repositories:
glow gitlab.com/user/repo - HTTP/HTTPS URLs:
glow https://example.com/file.md
How does GitHub/GitLab authentication work?
How does GitHub/GitLab authentication work?
Glow can fetch README files from GitHub and GitLab repositories without authentication for public repositories.Public repositories:Rate limits:And provide authentication through your Git credentials or personal access tokens configured in your Git client.Alternative:
Clone the repository and use Glow locally:
- GitHub API has rate limits for unauthenticated requests
- If you hit rate limits, you may need to authenticate
Can I use Glow as a pager for man pages or other content?
Can I use Glow as a pager for man pages or other content?
While Glow is specifically designed for markdown, you can use it creatively:As a markdown pager:For markdown content:Note: Glow expects markdown input. For general-purpose paging of non-markdown content, use traditional pagers like
less, more, or bat.Better use cases:- Reading API documentation (if available as markdown)
- Viewing CHANGELOG.md or CONTRIBUTING.md files
- Browsing documentation repositories
- Previewing markdown before committing
How do I set word wrapping?
How do I set word wrapping?
Control word wrapping with the Disable wrapping:Auto-detect terminal width:Set in config file:The default behavior is to detect your terminal width and cap it at 120 characters for optimal readability.
-w flag:Specific width:Can I contribute to Glow or report bugs?
Can I contribute to Glow or report bugs?
Absolutely! Glow is open source and welcomes contributions.Report bugs:
- GitHub Issues: https://github.com/charmbracelet/glow/issues
- Include: OS, terminal, Glow version, steps to reproduce
- Fork the repository: https://github.com/charmbracelet/glow
- Create a feature branch
- Submit a pull request
- See the Contributing guide for details
- Go 1.21 or later for building from source
- Follow Go conventions and run tests
- Discord: charm.sh/chat
- Twitter: @charmcli
- Mastodon: @[email protected]
Still Have Questions?
If your question isn’t answered here:- Check the GitHub Discussions
- Visit the Troubleshooting page
- Join the Discord community
- Read the help output:
glow --help