Command-line tools that render source code with syntax highlighting and navigation features for terminal environments.
This project is a command-line text viewer designed to enhance terminal output through automatic syntax highlighting and integrated file management. It functions as a replacement for standard system pagers, providing a readable interface for large text streams, source code, and markup files by applying color-coded formatting directly to the terminal output. The utility distinguishes itself through deep integration with version control systems, allowing users to inspect repository status and historical file changes with visual markers displayed in the output margin. It employs heuristic-based language detection and syntax-tree parsing to ensure accurate formatting, while also providing a diagnostic mode that reveals hidden control characters and non-printable symbols to assist with data integrity and troubleshooting. Beyond its primary viewing capabilities, the tool integrates into existing shell workflows to provide syntax-aware previews for search results, manual pages, and fuzzy finder navigation. It automatically manages terminal dimensions and pipe status to delegate long-form content to external system pagers or concatenate data for further command-line processing.
This tool is a feature-rich terminal pager that provides automatic syntax highlighting, Git integration, and seamless shell workflow support, making it a comprehensive solution for viewing code files in the terminal.
highlight.js is a JavaScript syntax highlighter and client-side code formatter that transforms plain text source code into highlighted HTML for web display. It provides syntax highlighting across a wide variety of programming languages. The library includes an automatic language detector that identifies the programming language of a code block to apply the correct highlighting rules without manual tagging. It is designed for web worker compatibility, allowing the highlighting process to run in background threads to prevent the browser interface from freezing during the processing of large volumes of code. This zero-dependency runtime handles both automatic and manual language specification to format source code directly in the browser.
This is a syntax highlighting library designed for web browsers and HTML rendering rather than a terminal-based pager for navigating code files in the command line.
react-syntax-highlighter is a React component that renders source code with language-specific syntax coloring. It wraps the Prism and Highlight.js syntax highlighting libraries, tokenizing source code using their language grammars and mapping each token to a styled React element. The component operates in two styling modes: inline style objects applied directly to each token, or CSS class names that can be themed via external stylesheets. This dual-mode approach makes the highlighter portable across environments where CSS class injection may or may not be available. The component is built around a pluggable architecture where interchangeable highlighter engines feed a tokenization pipeline, and the resulting tokens are wrapped in nested React elements to preserve line and token structure. Developers can apply custom color themes and select from dozens of language grammars, enabling consistent branding or accessibility requirements in React-based documentation, blogs, and tutorials. The rendering is entirely virtual DOM-based, converting parsed tokens into styled elements without requiring external DOM manipulation or dependencies beyond the core highlighter libraries. The project covers the full workflow of syntax highlighting in React: parsing source code, tokenization, and styled rendering, all exposed through a straightforward component API. Documentation and installation instructions are available in the repository, guiding users through adding the package and using either the default themes or custom ones.
This is a React component library for rendering syntax-highlighted code within web applications, rather than a command-line utility for paging and navigating files in a terminal.
Shiki is a syntax highlighting engine that generates color-coded HTML or ANSI output from source code. It functions as a static code highlighter, utilizing standard grammar definitions to parse text and apply accurate visual styling for documentation and terminal displays. The engine distinguishes itself by using a TextMate grammar parser to interpret text patterns, ensuring that code displays match the visual appearance of professional editors. It operates through an isomorphic runtime that supports both browser and server environments, utilizing WebAssembly for consistent execution and pre-compiled grammar serialization to manage performance and memory overhead. The library supports a range of integration methods, including server-side rendering and static site generation, to facilitate the creation of readable code examples in technical documentation and web content. It maps semantic tokens to specific color values through theme injection during the final rendering phase.
This is a syntax highlighting engine designed for web and documentation rendering rather than a terminal pager utility that provides interactive navigation for code files.
Kilo is a small-scale text editor implemented in C to demonstrate low-level systems programming. It provides a command line interface for modifying and saving text files directly within a terminal. The editor includes built-in string search and navigation capabilities to locate text within a file. It also applies colors to source code based on language patterns to provide syntax highlighting.
This is a terminal-based text editor designed for modifying files rather than a pager intended for viewing and navigating code output in the terminal.
Micro is an extensible terminal text editor that supports mouse interaction and intuitive keyboard shortcuts for editing files in a command line environment. It functions as a multi-cursor editor with syntax highlighting and a plugin system for adding custom functionality and automation scripts. The editor distinguishes itself through simultaneous editing across multiple cursors and a script-based extension system. It enables the automation of repetitive editing tasks via macro recording and playback of keystroke sequences. The project covers workspace management through split-screen panes and tabbed layouts, alongside text manipulation features like diff gutter change tracking and system clipboard integration. It also includes development utilities such as linting and error integration to surface code analysis results within the interface.
This is a full-featured terminal text editor designed for modifying files rather than a pager intended for viewing and navigating code output in the terminal.
Delta is a command-line pager that enhances the readability of terminal output by applying syntax highlighting and structured formatting to text streams. It functions as a specialized interface for version control systems, transforming standard output into color-coded, human-readable views. The tool distinguishes itself through its ability to render side-by-side diff comparisons and visualize merge conflicts with clear, semantic highlighting. It dynamically calculates column widths and text alignment to fit complex file comparisons within the constraints of a terminal window, while allowing users to map token types to custom color palettes via external configuration files. Beyond diff viewing, the project provides utilities for formatting git blame output, highlighting search results, and displaying line numbers. It processes input line-by-line to maintain a low memory footprint, integrating external language definitions to ensure accurate syntax coloring across various codebases.
Delta is a specialized terminal pager designed to enhance the readability of diffs and git output with syntax highlighting and customizable themes, fitting the core requirements for terminal code navigation and styling.
lnav is a terminal-based log viewer and analyzer designed for aggregating, filtering, and analyzing multiple log files in a single chronological view. It functions as a console application that can replace the system pager, providing syntax highlighting and document navigation for system or application logs. The project distinguishes itself by mapping unstructured log data to virtual SQLite tables, enabling the use of SQL and PRQL for structured data analysis, aggregations, and relational queries. It further differentiates its capability set through native integration for retrieving and tailing Docker container logs and the ability to access remote files over SSH without manual downloads. The tool provides comprehensive observability and analysis features, including chronological log merging, real-time monitoring, and visual analytics such as event distribution charts and numeric field spectrograms. It covers a broad operational surface including structured text formatting for JSON and XML, regex-based format detection, and non-destructive log entry annotation. The product supports the extraction of compressed archives and provides utilities for sensitive data anonymization and session state export.
lnav is a powerful terminal-based pager that provides syntax highlighting and advanced navigation, though it is specifically optimized for log analysis rather than general-purpose code file viewing.