v1.0.1
Rubric
bat in Go — a cat clone with wings
$ go install goforge.dev/rubric@latest
Rubric is bat written in Go — a cat(1) clone with wings. It ports
sharkdp/bat to Go, aiming for feature parity
while tracking current upstream behavior. Syntax highlighting and themes come
from chroma (the Go analogue of Rust’s
syntect): ~296 languages and ~74 themes out of the box.
Features
- Syntax highlighting with language auto-detection (name, extension, content)
- Themes (
--theme,--list-themes; bat theme names aliased to chroma styles) - Decorations: line numbers, grid, header, rule, snip (
--style) - Git change markers (
--style=changes) and--diff/--diff-context - Line ranges (
-r) and line highlighting (-H) - Wrapping (
--wrap,--chop-long-lines), tab expansion, blank-line squeeze - Paging through
less(auto when interactive), syntax mapping, config file
Run
go install goforge.dev/rubric@latest
rubric src/main.go
rubric --style=full --theme=GitHub README.md
git diff | rubric -l diff
Rubric is built as a goforge workspace.