arborium-cli-2.6.0 is not a library.
arborium-cli
A terminal-friendly syntax highlighter powered by Tree-sitter.
Features
- ANSI terminal output - Beautiful syntax highlighting in your terminal
- HTML output - Generate highlighted HTML for web pages
- Auto-detection - Automatically detects language from filenames or shebangs
- Multiple themes - Choose from 12 built-in themes
- Flexible input - Highlight files, stdin, or literal code strings
Installation
Usage
# Highlight a file (auto-detects language from extension)
# Highlight from stdin
|
# Highlight with explicit language
# Generate HTML output
# Use a specific theme
Options
-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 string
Available Themes
Catppuccin variants:
mocha/catppuccin-mocha(default)latte/catppuccin-lattemacchiato/catppuccin-macchiatofrappe/catppuccin-frappe
Other themes:
draculatokyo-nightnordone-darkgithub-darkgithub-lightgruvbox-darkgruvbox-light
Examples
# Compare different themes
# Highlight a script with shebang detection
|
# Generate HTML for a blog post
# Pipe code through arborium
|
Language Auto-Detection
Arborium attempts to detect the language in this order:
- Explicit
--langflag (highest priority) - File extension - If input is a file path
- Shebang line - For stdin or literal strings (e.g.,
#!/usr/bin/env python3)
Supported languages include Rust, Python, JavaScript, TypeScript, C, C++, Go, Java, and many more.
License
See the main arborium repository for license information.