Crates.io | supercat |
lib.rs | supercat |
version | 0.1.0 |
source | src |
created_at | 2024-09-08 16:39:08.538981 |
updated_at | 2024-09-08 16:39:08.538981 |
description | A syntax highlighting alternative to cat |
homepage | https://github.com/guilhermeprokisch/supercat |
repository | https://github.com/guilhermeprokisch/supercat |
max_upload_size | |
id | 1368357 |
size | 71,935 |
cat you see!? It's a fancy super cat! :cat:
SuperCat is a syntax highlighting alternative to the traditional cat
command-line utility. It provides colorful and easy-to-read output for various programming languages and file types, powered by tree-sitter and the Helix editor's syntax highlighting engine.
SuperCat offers advantages over similar tools:
Advanced syntax highlighting: SuperCat uses tree-sitter through the Helix editor's syntax highlighting engine. This provides more accurate and context-aware parsing compared to regex-based highlighters, resulting in better highlighting for complex language constructs. It also benefits from Helix's performance optimizations and support for a wide range of languages.
Lightweight: SuperCat is designed to be a lightweight alternative, focusing on fast startup times and efficient memory usage.
Customizability(soon): The color theme in SuperCat is easily customizable, allowing users to tailor the output to their preferences.
You can install SuperCat using Cargo, the Rust package manager:
cargo install supercat
Alternatively, you can build from source:
git clone https://github.com/guilhermeprokisch/supercat.git
cd supercat
cargo build --release
The built binary will be available in target/release/supercat
.
supercat [OPTIONS] [FILE]
If no file is specified, SuperCat will read from standard input.
-l, --line-numbers
: Show line numbers--language <LANGUAGE>
: Force a specific language for syntax highlightingDisplay a file with syntax highlighting:
supercat example.rs
Display a file with line numbers:
supercat -l example.py
Force a specific language:
supercat --language javascript example.txt
Read from standard input:
echo "print('Hello, World!')" | supercat --language python
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.