| Crates.io | arborium-cli |
| lib.rs | arborium-cli |
| version | 2.12.4 |
| created_at | 2025-12-22 17:51:25.962762+00 |
| updated_at | 2026-01-18 11:11:00.555289+00 |
| description | Command-line syntax highlighter powered by arborium |
| homepage | |
| repository | https://github.com/bearcove/arborium |
| max_upload_size | |
| id | 2000079 |
| size | 89,685 |
A terminal-friendly syntax highlighter powered by Tree-sitter.
cargo install arborium-cli
# Highlight a file (auto-detects language from extension)
arborium file.rs
# Highlight from stdin
cat file.py | arborium -
# Highlight with explicit language
arborium --lang javascript "const x = 42;"
# Generate HTML output
arborium --html index.js
# Use a specific theme
arborium --theme dracula script.sh
-l, --lang <LANGUAGE> - Specify the language explicitly (e.g., rust, python, javascript)--html - Output HTML instead of ANSI escape sequences--theme <THEME> - Choose a color theme for ANSI output (see below)<input> - Input source: filename, - for stdin, or literal code stringCatppuccin variants:
mocha / catppuccin-mocha (default)latte / catppuccin-lattemacchiato / catppuccin-macchiatofrappe / catppuccin-frappeOther themes:
draculatokyo-nightnordone-darkgithub-darkgithub-lightgruvbox-darkgruvbox-light# Compare different themes
arborium --theme nord mycode.rs
arborium --theme dracula mycode.rs
# Highlight a script with shebang detection
arborium script.py # Detects Python from .py extension
echo '#!/usr/bin/env python3\nprint("hello")' | arborium - # Detects from shebang
# Generate HTML for a blog post
arborium --html snippet.rs > highlighted.html
# Pipe code through arborium
git diff | arborium --lang diff
Arborium attempts to detect the language in this order:
--lang flag (highest priority)#!/usr/bin/env python3)Supported languages include Rust, Python, JavaScript, TypeScript, C, C++, Go, Java, and many more.
See the main arborium repository for license information.