Glow - open source command line tool that supports rendering Markdown files in the terminal

堆友AI

What's Glow?

Glow is open source command line tool for elegantly rendering Markdown files in the terminal. The tool supports highlighting code blocks , mathematical formulas and other complex elements , providing a wealth of features such as custom styles , paging , mouse support and so on. Users can view local or remote Markdown files in the terminal through simple commands , the tool supports a variety of operating systems , and can be personalized through the configuration file . Glow makes reading Markdown files in the terminal easy and beautiful , is a powerful tool for developers and end-users .

Glow - 开源的命令行工具,支持在终端渲染Markdown文件

Glow Features

  • Elegant Markdown Rendering: Display Markdown files in the terminal in an aesthetically pleasing way, with support for highlighting complex elements such as code blocks, tables, mathematical formulas, and more.
  • Text User Interface (TUI) mode: Launch TUI without parameters, browse Markdown files locally or in Git repositories, support file search and paging.
  • Command Line Interface (CLI) mode: Supports reading Markdown content from files, standard input, or remote URLs (e.g., GitHub/GitLab) and rendering in the terminal.
  • Custom Styles: A variety of preset styles (e.g., dark or light modes) are provided, and users can customize the styles via JSON files.
  • Pagination and Line Breaks: Support paging display and custom line break width to optimize reading experience.
  • Configuration File Support: Users can save common settings such as default style, whether to show line numbers, etc. through the configuration file.
  • Cross-platform supportCompatible with macOS, Linux, Windows, FreeBSD and many other operating systems.

Glow's core strengths

  • Endpoint Native Experience: Glow focuses on the endpoint environment, taking full advantage of the endpoint's features to provide a seamless interactive experience without the need to switch to a browser or other graphical interface.
  • High Performance Rendering: Load and display large Markdown files quickly with an efficient parsing and rendering engine that ensures a smooth browsing experience.
  • Height can be customized: Support for customizing styles, profiles and command line parameters enables users to adjust the display to their needs and preferences.
  • cross-platform compatibility: Support for multiple operating systems (e.g. macOS, Linux, Windows, etc.) ensures a consistent experience across environments.
  • simple and easy to use: Command line operation is simple and intuitive, easy to get started, while providing a wealth of documentation and help information for users to quickly master.
  • Support for remote contentSave time and effort by loading Markdown files directly from remote repositories like GitHub, GitLab, and more, without downloading.

How to use Glow

  • Depending on the operating system, choose the appropriate installation method::
    • macOS::brew install glow
    • Linux::sudo apt install glow(Debian/Ubuntu) or pacman -S glow(Arch Linux).
    • Windows (computer): Use choco install glow(Chocolatey) or scoop install glow(Scoop).
    • Other systems: Check out Glow's GitHub repository at https://github.com/charmbracelet/glow for more installation options.
  • With TUI modeRun it directly in the terminal glowGlow automatically scans the current directory and subdirectories for Markdown files, and supports browsing and selecting files with the keyboard.
  • Rendering a single file: If you want to render a Markdown file directly, just run it in the terminal:glow 文件名.md,Example:glow README.mdThe
  • Read from standard input: Pipes Markdown content to Glow:echo "# Hello World" | glow -, or rendered from the output of other commands:cat README.md | glow -。
  • Load from Remote URL: Load Markdown files directly from GitHub or other supported remotes:glow https://github.com/charmbracelet/glow, or:glow github.com/charmbracelet/glow。
  • Custom Styles: Use of -s parameter to select a preset style (e.g. dark maybe light), or specify a custom JSON style file:glow -s dark README.md, or:glow -s mystyle.json README.md。
  • paging: Use -p parameter passes the output to a pager (such as the less):glow -p README.mdThe
  • configuration file: If you use the same settings frequently, you can set them up by running the glow config Create a configuration file, or create it manually glow.yml The file saves the default settings.

What is Glow's official website?

  • GitHub repository:: https://github.com/charmbracelet/glow

Who is Glow for?

  • developers: Developers can quickly view and manage Markdown documents in their projects to improve development efficiency.
  • Technical Writer: Technicians can efficiently preview and edit Markdown content to ensure beautiful, accurate formatting.
  • Teachers and lecturers: Teachers can display Markdown content in their classrooms or lectures to enhance teaching and presentations.
  • Students and self-learners: Students can easily manage their study notes and knowledge base to enhance their learning experience.
  • system administrator: View configuration documents and log files in the terminal to improve productivity.
  • Team members: Improve collaboration by enabling members to quickly browse and discuss shared Markdown documents.
© Copyright notes

Related articles

No comments

You must be logged in to leave a comment!
Login immediately
none
No comments...