ccat
Project: https://github.com/owenthereal/ccat
Author: Owen Ou
Alternative to: cat
Language: Go
This page last updated:
ccat is a drop-in replacement for the standard cat command that adds
syntax highlighting to file output. It automatically detects file type by
extension and applies appropriate colors, making it easier to read code
and configuration files directly in the terminal.
The tool supports syntax highlighting for many languages including JavaScript, Java, Ruby, Python, Go, C, and JSON. It offers both dark and light color scheme variants to suit different terminal backgrounds, and can also produce HTML output with inline styles.
Basic usage
# Display a file with syntax highlighting.
ccat main.go
# Output as HTML with inline styles.
ccat --html main.go
# Use the light color scheme.
ccat --bg=light config.yaml