Skip to main content
We welcome contributions to Glow! Whether you’re fixing bugs, adding features, or improving documentation, your help is appreciated.

Getting Started

Glow is an open-source project maintained by Charm. The source code is available on GitHub: Repository: https://github.com/charmbracelet/glow

Building from Source

Glow is written in Go and requires Go 1.21 or later to build.

Clone and Build

git clone https://github.com/charmbracelet/glow.git
cd glow
go build
This will create a glow binary in the current directory.

Install with Go

Alternatively, you can install directly using Go:
go install github.com/charmbracelet/glow/v2@latest

Running Tests

Run the test suite to ensure your changes don’t break existing functionality:
go test ./...
For verbose output:
go test -v ./...

Submitting Issues

Before submitting an issue, please search existing issues to avoid duplicates. When reporting a bug, please include:
  • OS (e.g., Ubuntu, macOS, Windows)
  • Shell (e.g., zsh, bash, fish)
  • Terminal Emulator (e.g., kitty, iTerm, Alacritty)
  • Terminal Multiplexer (e.g., tmux, screen, if applicable)
  • Locale (e.g., en_US.UTF-8)
  • Glow version (glow --version)
  • Steps to reproduce the issue
  • Expected vs. actual behavior
  • Source code or markdown that triggers the issue (if applicable)
  • Screenshots (if relevant)

Submitting Pull Requests

  1. Fork the repository on GitHub
  2. Create a feature branch from main:
    git checkout -b my-feature-branch
    
  3. Make your changes and commit them with clear, descriptive messages
  4. Test your changes thoroughly
  5. Push to your fork:
    git push origin my-feature-branch
    
  6. Open a Pull Request on GitHub with a clear description of your changes

Pull Request Guidelines

  • Keep changes focused and atomic
  • Follow the existing code style
  • Add tests for new functionality
  • Update documentation as needed
  • Ensure all tests pass before submitting
  • Reference any related issues in your PR description

Code Style

Glow follows standard Go conventions:
  • Run gofmt on your code
  • Follow Effective Go guidelines
  • Use meaningful variable and function names
  • Add comments for complex logic

Development Workflow

Project Structure

The main source files in main.go:46-63:
  • main.go - Entry point and CLI argument handling
  • ui/ - TUI (textual user interface) implementation
  • config_cmd.go - Configuration file management
  • github.go / gitlab.go - GitHub/GitLab integration
  • utils/ - Utility functions

Configuration

Glow uses Viper for configuration management. The default config file is glow.yml and can be edited with:
glow config

Code of Conduct

Please be respectful and considerate in all interactions. We’re all here to make Glow better!

Community

Connect with the Glow community:

Questions?

If you have questions about contributing, feel free to: Thank you for contributing to Glow!

Build docs developers (and LLMs) love