asd replaces traditional tools like cat with smart, type-aware file rendering. By automatically detecting file types via magic bytes (and falling back to extensions), asd formats and renders them with beautiful syntax highlighting, layout tables, tree views, and media metadata.
When you output more text than your terminal can fit, asd instantly buffers into an interactive pager. If you pipe the output to another tool, it smartly defaults back to raw bytes (behaving exactly like cat).
- Code & Text: Beautiful syntax highlighting using Chroma, with line numbers and theme support.
- Structured Data: JSON, YAML, TOML formatting and valid syntax checking.
- Data Tables: CSV and TSV formatted into beautiful, auto-sizing terminal tables via Lipgloss.
- Markdown: Fully styled Markdown rendering using Glamour.
- Archives: Explores zip, tar, tar.gz, 7z, and rar as interactive directory trees showing uncompressed stats.
- Office Docs & PDF: Automatically extracts and parses text from DOCX, XLSX, PPTX, ODT, and PDFs without you needing to extract them manually!
- Media: Peeks into Audio and Video files to reveal track metadata, codecs, and durations. Images are rendered natively in your terminal! Enjoy pixel-perfect inline images on modern terminals like iTerm2, WezTerm, and Ghostty, or elegantly scaled true-color ANSI blocks on all standard terminals.
- Security: Displays X.509 PEM/CRT properties and SSH Key parameters effortlessly.
- Git Integration: Built-in gutter diffs show added, modified, and removed lines instantly!
- Tail/Follow Mode: Use
asd -F <file>to tail streaming logs with full real-time syntax highlighting. - Log Formatting: Intelligent, on-the-fly parsing and beautiful colorization of log files (
.log,/var/log/*, etc) formatting timestamps and log levels neatly! - Side-by-Side Diffing: Use
asd <file1> <file2> --difffor a beautiful side-by-side terminal diff view. - Certificate Parsing: Peek into
.pem,.crt, and.derfiles to automatically parse X.509 certificates and read their metadata (Issuer, Subject, Validity) just likeopenssl x509 -text! - UI Customization: Use
--cleanto hide headers and line numbers for clean copying, or--no-pagerto disable auto-paging. - Smart Piped Input: Pass
curlpayloads directly intoasd; it automatically detects the content type and highlights the piped output! - Directories: View styled
ls -ladirectory trees and resolve symlinks. - Hex Dump: Safely view unknown binaries with built-in hex-dumping.
```bash brew tap orchestrator-dev/asd brew install asd ```
Ensure you have Go 1.23 or higher.
```bash
go install github.com/orchestrator-dev/asd@latest
```
Head over to the Releases page to download pre-built binaries for your OS and architecture (Windows, macOS, Linux).
Note: The GitHub Actions workflows are actively compiling v0.8.3, so the binaries will appear on the release page momentarily!
Using asd is as simple as using cat.
```bash asd [flags] [file...] ```
Examples: ```bash
asd main.go
asd config.yaml payload.json
asd data.zip
echo "{"test": 123}" | asd ```
| Flag | Long Flag | Description |
|---|---|---|
-f |
--flat |
Bypass all smart rendering and act identically to cat. |
-n |
--lines |
Show line numbers alongside text and source code. |
-p |
--plain |
Disable all color and styling (good for older terminals). |
--theme |
Specify a chroma highlight theme (default is auto). |
|
-h |
--help |
Print usage and help menus. |
--version |
Print the current version and exit. |
You can customize asd permanently using a global config file located at ~/.config/asd/config.toml:
```toml
theme = "dracula" ```
```bash git clone https://github.com/vsmanu/asd.git cd asd go mod download make build ```
You can run the tests using: ```bash make test ```
This project is licensed under the MIT License.

