File info at a glance — metadata, checksums, binary analysis & linked libraries.
- Colorized Output - Beautiful, readable terminal output with distinct colors per section
- Smart Size Formatting - Intelligent display of file sizes in relevant units
- File Type Detection - MIME type, format detection (ELF, Mach-O, scripts), encoding
- Binary Analysis - Linked libraries, stripped status, code signatures (macOS)
- Hash Calculation - MD5, SHA256, SHA512 checksums
- File Comparison - Git-like diff output comparing two files
- Symlink Resolution - Complete symlink chain visualization
- Command Resolution - Automatic PATH lookup for commands
- Library Search - Find and analyze
.so,.a,.dylibfiles - Cross-Platform - Works on macOS and Linux
Requires Go 1.21 or later:
go install github.com/oh-tarnished/finfo@latestEnsure $HOME/go/bin is in your PATH.
# Pre-built binary (recommended)
brew tap oh-tarnished/tap
brew install finfo
# Or from source
brew tap oh-tarnished/finfo
brew install finfo# Download latest release
curl -LO https://github.com/oh-tarnished/finfo/releases/latest/download/finfo-darwin-arm64
# Make executable and move to PATH
chmod +x finfo-darwin-arm64
sudo mv finfo-darwin-arm64 /usr/local/bin/finfocurl -LO https://github.com/oh-tarnished/finfo/releases/latest/download/finfo_<version>_linux_amd64.deb
sudo dpkg -i finfo_<version>_linux_amd64.debcurl -LO https://github.com/oh-tarnished/finfo/releases/latest/download/finfo_<version>_linux_amd64.rpm
sudo dnf install finfo_<version>_linux_amd64.rpmcurl -LO https://github.com/oh-tarnished/finfo/releases/latest/download/finfo_<version>_linux_amd64.pkg.tar.zst
sudo pacman -U finfo_<version>_linux_amd64.pkg.tar.zstgit clone https://github.com/oh-tarnished/finfo.git
cd finfo
go build -o finfo
sudo mv finfo /usr/local/bin/# Show info for a specific file
finfo /usr/bin/python3
# Search for command in PATH
finfo python3
# Multiple files
finfo file1 file2 file3
# Use glob patterns
finfo *.so# Show file with checksums
finfo --hash file.zip
# Compare two files (git-like diff)
finfo file1.txt file2.txt --diff
# Search for library files
finfo --lib ssl
# Disable colors
finfo --no-color /usr/bin/gcc
# Show only linked libraries (full list, no other info)
finfo --ll cmakePath : /usr/bin/python3
Size : 31 KB
╰─ 31744 bytes
Arch : arm64
OS : Darwin
Permissions : -rwxr-xr-x
├─ Owner : rwx (read, write, execute)
├─ Group : rx (read, execute)
╰─ Others : rx (read, execute)
File Type : Mach-O executable
MIME Type : application/x-mach-binary
Binary Type : Executable
Linked Libraries:
├── /usr/lib/libSystem.B.dylib
├── /usr/lib/libc++.1.dylib
╰── /usr/lib/libz.1.dylib
Privileges:
├─ Owner : root
├─ Writable by : root only
╰─ Requires sudo: yes
Checksums:
├─ MD5 : fe7a92c873699de5873ece5963176689
├─ SHA256 : 4970a8c688841ce9726a217c549b29e5f34bfdb53abfe221a06d78c903a05368
╰─ SHA512 : d14570aeaef900d09bf40d472c0d11813237863b8b98e863647fdd6eb35d7c9c...
| Flag | Description |
|---|---|
--no-color |
Disable colored output |
--lib |
Search for library files (.so, .a, .dylib) |
--hash |
Calculate and show file checksums (MD5, SHA256, SHA512) |
--diff |
Compare two files and show differences |
--ll, --linked-libs |
Show only linked libraries (full list, no other info) |
The --diff flag provides a git-like comparison of two files:
finfo file1 file2 --diffOutput includes:
- ✓ Size comparison - Byte-level difference
- ✓ Permissions - Mode comparison
- ✓ Modification time - Timestamp comparison
- ✓ Checksums - MD5, SHA256, SHA512 comparison
- ✓ Final verdict - IDENTICAL or DIFFERENT
- Labels: Cyan (bold)
- Values: White
- Tree symbols: Blue
- Paths: Green
- Sizes: Magenta
- Permissions: Yellow
- Warnings: Red
- Executable type: Green
- Matches (✓): Green
- Differences (✗): Red
# Build for current platform
just build
# Build for all platforms
just build-all
# Run tests
just test
# Install locally
just installfinfo/
├── main.go # Entry point
├── fileinfo.go # Core file info gathering
├── fileinfo_darwin.go # macOS-specific info
├── fileinfo_linux.go # Linux-specific info
├── formatter.go # Output formatting
├── filetype.go # File type detection
├── binary.go # Binary analysis
├── hash.go # Hash calculation & comparison
├── resolver.go # Command & library resolution
└── cmd/
└── root.go # CLI command definitions
Contributions are welcome! Please feel free to submit a Pull Request.
MIT License - see LICENSE file for details
Created by @oh-tarnished
- Built with Cobra for CLI framework
- Uses fatih/color for terminal colors