A modern replacement for cat with syntax highlighting and automatic language detection.
- Syntax highlighting for 100+ languages using tree-sitter parsers
- Automatic language detection based on file extension and content
- Line numbers with
--style=numbers - Git change indicators showing added, modified, and removed lines with
--style=changes - Rich highlighting (language injections / embedded languages) with
--style=rich - Show unprintable characters with
-A/--show-all(tabs as →, carriage returns as ↵, etc.) - unlike bat, syntax highlighting is preserved! - Theme support with automatic dark/light mode detection
- Stdin support for piping commands
- Fast - built with Rust and tree-sitter
- Shell completions for bash, zsh, fish, and more
cargo install --path .Or using mise (recommended for development):
mise install
mise build:debug# Quick help
umber -h
# Detailed help with examples
umber --help
# View man page (after installation)
man umberDisplay a file with syntax highlighting:
umber main.rsDisplay multiple files:
umber main.rs lib.rsShow unprintable characters (tabs as →, line feeds as ␊):
umber -A main.rsRead from stdin:
echo 'fn main() { println!("Hello!"); }' | umber
# or explicitly:
cat main.rs | umber -Show line numbers with the numbers style component:
umber --style=numbers main.rsControl which decorations to display with the --style flag:
# Show line numbers with grid separator
umber --style=numbers main.rs
# Show git change indicators (+, ~, -)
umber --style=changes main.rs
# Combine multiple decorations
umber --style=numbers,changes main.rs
# Enable richer highlighting (language injections / embedded languages)
umber --style=rich main.rsNote: --style=rich can be significantly slower on very large files.
Git change indicators show:
+(green) - added lines~(yellow) - modified lines-(red) - removed lines
Display tabs, carriage returns, line feeds, and other non-printable characters with -A / --show-all:
umber -A main.rsThis shows:
·(middle dot) for spaces→(right arrow) for tabs␊(line feed symbol) at the end of lines↵(carriage return symbol) for\r␛(escape symbol) for escape characters␀,␁,␂, etc. for other control characters
Unlike bat -A, umber maintains full syntax highlighting while showing unprintable characters!
# Combine with line numbers
umber -A -n main.rs
# Works with git change indicators too
umber -A --style=changes,numbers main.rsForce a specific language when auto-detection fails:
umber --language rust config.txt
umber --language json response.logTo see all supported languages, check the syntastica documentation.
Specify a theme with --theme:
umber --theme dracula main.rs
umber --theme gruvbox-light main.rsBy default, umber uses auto which detects your system's dark/light mode preference:
- Light mode: Catppuccin Latte
- Dark mode: Catppuccin Mocha
See the full list of themes in the syntastica-themes documentation.
Popular themes include:
draculagruvbox-dark/gruvbox-lightnordone-dark/one-lightcatppuccin-mocha/catppuccin-latte/catppuccin-frappe/catppuccin-macchiatosolarized-dark/solarized-lighttokyo-night
Generate shell completions for your shell:
# Bash
umber --completions bash > ~/.local/share/bash-completion/completions/umber
# Zsh
umber --completions zsh > ~/.zsh/completion/_umber
# Fish
umber --completions fish > ~/.config/fish/completions/umber.fish
# PowerShell
umber --completions powershell > umber.ps1Generate and install a man page:
# Generate man page
umber --man-page > umber.1
# Install system-wide (requires sudo)
sudo cp umber.1 /usr/local/share/man/man1/
# View the man page
man umber# View a Rust file with line numbers
umber --style=numbers src/main.rs
# View JSON with syntax highlighting
umber package.json
# Pipe git diff through umber
git diff | umber --language diff
# Compare files side by side with syntax highlighting
diff <(umber file1.js) <(umber file2.js)
# View logs with Python syntax highlighting
umber --language python app.log
# Use a specific theme
umber --theme nord config.yaml
# View multiple files with line numbers
umber --style=numbers *.rs
# Show unprintable characters (tabs, line feeds, etc.) with syntax highlighting
umber -A main.rs
# Debug a file with mixed line endings
umber -A --style=numbers problem_file.txtumber supports 100+ programming languages through tree-sitter parsers, including:
- C, C++, C#, Objective-C
- Rust, Go, Zig
- JavaScript, TypeScript, JSX, TSX
- Python, Ruby, Perl, PHP
- Java, Kotlin, Scala
- Swift, Dart
- HTML, CSS, SCSS, Vue
- Bash, Fish, PowerShell
- SQL, GraphQL
- YAML, TOML, JSON, XML
- Markdown, reStructuredText
- And many more...
For a complete list, see the syntastica-parsers documentation.
- Modern syntax highlighting using tree-sitter for accurate, grammar-aware highlighting
- Show unprintable characters with colors - unique feature that maintains highlighting while showing tabs, line feeds, and control characters
- Smart defaults with automatic theme and language detection
- Familiar interface - works just like
catbut with colors - Fast and reliable - built with Rust for performance and safety
- No configuration needed - works out of the box with sensible defaults
| Feature | umber | bat | ccat | highlight |
|---|---|---|---|---|
| Syntax highlighting | ✅ Tree-sitter | ✅ syntect | ✅ pygments | ✅ |
| Auto language detection | ✅ | ✅ | ✅ | ✅ |
| Line numbers | ✅ | ✅ | ❌ | ✅ |
| Themes | ✅ Many | ✅ Many | ✅ Few | ✅ Many |
| Git integration | ✅ | ✅ | ❌ | ❌ |
| Show unprintable chars | ✅ with colors | ✅ no colors | ❌ | ❌ |
| Paging | ❌ | ✅ | ❌ | ❌ |
| Binary files | ❌ | ✅ | ❌ | ❌ |
Key difference: umber shows unprintable characters (tabs, line feeds, control chars) while maintaining syntax highlighting - unlike bat -A which disables colors.
umber focuses on being a simple, fast cat replacement with excellent syntax highlighting and git change indicators. If you need features like a built-in pager or binary file detection, check out bat.
This project uses mise for development:
# Install dependencies
mise install
# Build
mise build:debug
# Run tests
mise test
# Format code
mise formatContributions are welcome! Please feel free to submit a Pull Request.
MIT License - see LICENSE file for details.
- syntastica - Syntax highlighting library
- tree-sitter - Parser generator tool
- clap - Command line argument parser