🍺 BREW Explorer

← all formulae

bat

brew install bat v0.26.1 Apache-2.0 OR MIT

Rust clone of cat with syntax highlighting, line numbers, and Git integration.

Why you might care

Drop-in replacement for cat that colorizes code automatically and shows git diffs in the margin—much faster than piping through less or a syntax highlighter. Single statically-compiled binary, works everywhere cat does. Great for code review in the terminal and reading logs with structure.

Categories

Alternatives

cat less pygmentize highlight
13.4k
30-day installs · #303
46.8k
90-day · #289
199.5k
365-day · #282
59.3k
★ GitHub stars · updated 3d ago

Runtime dependencies

Build dependencies

GitHub topics

cli command-line git hacktoberfest rust syntax-highlighting terminal tool

Links

Blurb generated by claude-haiku-4-5 on today.

Raw metadata
{
  "aliases": [],
  "alternatives": [
    "cat",
    "less",
    "pygmentize",
    "highlight"
  ],
  "build_dependencies": [
    "pkgconf",
    "rust"
  ],
  "categories": [
    "text-processor",
    "file-utility"
  ],
  "caveats": null,
  "conflicts_with": [],
  "dependencies": [
    "libgit2",
    "oniguruma"
  ],
  "deprecated": 0,
  "deprecation_reason": null,
  "desc": "Clone of cat(1) with syntax highlighting and Git integration",
  "disable_reason": null,
  "disabled": 0,
  "enrichment_fetched_at": "2026-06-20T23:35:47+00:00",
  "first_seen": "2026-06-20T23:34:18+00:00",
  "full_name": "bat",
  "github_default_branch": "master",
  "github_last_commit_at": "2026-06-17T17:54:57Z",
  "github_readme_excerpt": "\u003cp align=\"center\"\u003e\n  \u003cimg src=\"doc/logo-header.svg\" alt=\"bat - a cat clone with wings\"\u003e\u003cbr\u003e\n  \u003ca href=\"https://github.com/sharkdp/bat/actions?query=workflow%3ACICD\"\u003e\u003cimg src=\"https://github.com/sharkdp/bat/workflows/CICD/badge.svg\" alt=\"Build Status\"\u003e\u003c/a\u003e\n  \u003cimg src=\"https://img.shields.io/crates/l/bat.svg\" alt=\"license\"\u003e\n  \u003ca href=\"https://crates.io/crates/bat\"\u003e\u003cimg src=\"https://img.shields.io/crates/v/bat.svg?colorB=319e8c\" alt=\"Version info\"\u003e\u003c/a\u003e\u003cbr\u003e\n  A \u003ci\u003ecat(1)\u003c/i\u003e clone with syntax highlighting and Git integration.\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"#syntax-highlighting\"\u003eKey Features\u003c/a\u003e \u2022\n  \u003ca href=\"#how-to-use\"\u003eHow To Use\u003c/a\u003e \u2022\n  \u003ca href=\"#installation\"\u003eInstallation\u003c/a\u003e \u2022\n  \u003ca href=\"#customization\"\u003eCustomization\u003c/a\u003e \u2022\n  \u003ca href=\"#project-goals-and-alternatives\"\u003eProject goals, alternatives\u003c/a\u003e\u003cbr\u003e\n  [English]\n  [\u003ca href=\"doc/README-zh.md\"\u003e\u4e2d\u6587\u003c/a\u003e]\n  [\u003ca href=\"doc/README-ja.md\"\u003e\u65e5\u672c\u8a9e\u003c/a\u003e]\n  [\u003ca href=\"doc/README-ko.md\"\u003e\ud55c\uad6d\uc5b4\u003c/a\u003e]\n  [\u003ca href=\"doc/README-ru.md\"\u003e\u0420\u0443\u0441\u0441\u043a\u0438\u0439\u003c/a\u003e]\n\u003c/p\u003e\n\n### Syntax highlighting\n\n`bat` supports syntax highlighting for a large number of programming and markup\nlanguages:\n\n![Syntax highlighting example](https://imgur.com/rGsdnDe.png)\n\n### Git integration\n\n`bat` communicates with `git` to show modifications with respect to the index\n(see left sidebar):\n\n![Git integration example](https://i.imgur.com/2lSW4RE.png)\n\n### Show non-printable characters\n\nYou can use the `-A`/`--show-all` option to show and highlight non-printable\ncharacters:\n\n![Non-printable character example](https://i.imgur.com/WndGp9H.png)\n\n### Automatic paging\n\nBy default, `bat` pipes its own output to a pager (e.g. `less`) if the output is too large for one screen.\nIf you would rather `bat` work like `cat` all the time (never page output), you can set `--paging=never` as an option, either on the command line or in your configuration file.\nIf you intend to alias `cat` to `bat` in your shell configuration, you can use `alias cat=\u0027bat --paging=never\u0027` to preserve the default behavior",
  "github_repo": "sharkdp/bat",
  "github_stars": 59325,
  "github_topics": [
    "cli",
    "command-line",
    "git",
    "hacktoberfest",
    "rust",
    "syntax-highlighting",
    "terminal",
    "tool"
  ],
  "homepage": "https://github.com/sharkdp/bat",
  "homepage_og_description": null,
  "homepage_og_image": null,
  "homepage_title": null,
  "installs_30d": 13441,
  "installs_365d": 199514,
  "installs_90d": 46786,
  "keg_only": 0,
  "keg_only_reason": null,
  "last_seen": "2026-06-20T23:34:18+00:00",
  "license": "Apache-2.0 OR MIT",
  "llm_generated_at": "2026-06-20T23:44:01+00:00",
  "llm_model": "claude-haiku-4-5",
  "name": "bat",
  "oldnames": [],
  "one_liner": "Rust clone of cat with syntax highlighting, line numbers, and Git integration.",
  "optional_dependencies": [],
  "rank_30d": 303,
  "rank_365d": 282,
  "rank_90d": 289,
  "raw_hash": "9bf4813a20941ff4",
  "recommended_dependencies": [],
  "revision": 0,
  "ruby_source_path": "Formula/b/bat.rb",
  "tap": "homebrew/core",
  "test_dependencies": [],
  "uses_from_macos": [],
  "version_head": "HEAD",
  "version_stable": "0.26.1",
  "versioned_formulae": [],
  "why_use_this": "Drop-in replacement for cat that colorizes code automatically and shows git diffs in the margin\u2014much faster than piping through less or a syntax highlighter. Single statically-compiled binary, works everywhere cat does. Great for code review in the terminal and reading logs with structure."
}