A simple, clean, and flexible command-line file reader written in Rust. It allows you to provide a file or directory path and prints file contents with line numbers — beautifully formatted. 🚀
- 📁 Reads a single file and prints it with aligned line numbers.
- 📂 Reads multiple files inside a directory (you choose how many).
- 🔢 Smart input handling for selecting number of files.
- ❌ Option to cancel at any moment.
⚠️ Clear error messages for invalid paths or unsupported types.
Just run the CLI with a path (file or directory).
- If it's a file, it prints the content line by line.
- If it's a directory, you'll be asked how many files you want to read.
- Uses standard input/output for interactive prompts.
No deep project structure explanation here — so the README won’t become outdated after changes. 😉
cargo run -- path/to/file.txtcargo run -- path/to/directoryThen choose:
0→ read all filesN→ read N files-1→ cancel
reading: notes.txt
001| First line
002| Second line
003| ...
- Rust (stable)
- Cargo
Pull requests are welcome! Feel free to improve formatting, add flags, or expand functionality.
MIT — free to use, modify, and distribute.