less-pager-mini
v1.4.0
Published
A scrollable terminal pager for Node.js CLI apps (terminal only)
Maintainers
Readme
Less-Pager-Mini
Getting Started
Follow these simple steps to install Less-Pager-Mini.
Prerequisites
Make sure you have the following installed:
Installation
Install Less-Pager-Mini via npm:
npm i less-pager-miniUsage
import pager from 'less-pager-mini';
const example = ['a', 'b', 'c'];
await pager(example);Function Parameters:
input: Any unknown input (except symbol) to page.
preserveFormat: If true, preserves JavaScript default formatting.
Format preserved:
["a","b",["c","d"]]
{"a":1,"b":2,"c":{"d":3}}
Formatted:
[
"a",
"b",
[
"c",
"d"
]
]
{
"a": 1,
"b": 2,
"c": {
"d": 3
}
}examineFile: if true, attempts to treat input as file path(s) and page content, invalid files will be ignored.
Example input:
'a.txt'or
[
'a.txt',
'b.md',
'c' // Ignored
]About The Project
Want to glance your array or objects, but scrolling through terminal feels painful? This tool got your back.
Less-Pager-Mini is a lightweight pager that lets you scroll massive terminal output with ease and precision.
Whether you're debugging, dumping logs, or previewing data structures — this pager helps you scroll fast without getting lost in overwhelming output.
- 🔁 Familiar Commands – Inherits command keys from
less - 📦 Minimal Dependencies – Lightweight, stable, and portable
- 🖥️ Pure Terminal UX – Replicates 99% of the
lessexperience
Roadmap
- [ ] COMMAND MODE
- [ ] MOVING
- [x] Forward one line
- [x] Backward one line
- [x] Forward N line
- [x] Backward N line
- [x] Forward one window
- [x] Backward one window
- [x] Forward one window and set window to N
- [x] Backward one window and set window to N
- [x] Forward one window, but don't stop at EOF
- [x] Forward one half-window and set half-window to N
- [x] Backward one half-window and set half-window to N
- [x] Right one or N positions half screen width
- [x] Left one or N positions half screen width
- [ ] Right to last column
- [ ] Left to first column
- [ ] JUMPING
- [ ] SEARCHING
- [ ] CHANGING FILES
- [ ] MISCELLANEOUS COMMANDS
- [ ] OPTIONS
- [ ] Custom Key-Bindings
- [x] Support wide-character (emoji, CJK, etc.) rendering
- [x] Support help page
Built With
Feedback
Found something odd or came up with a bright improvement?
Feel free to open an issue — contributions and feedback are always welcome!
Contributing
Contributions are welcome! If you have suggestions, improvements, or bug fixes, feel free to:
- Fork the repo
- Create a new branch
- Make your changes
- Open a pull request
Please follow the coding style and write clear commit messages.
Let’s make Less-Pager-Mini better together!
Acknowledgments
- Inspired by less by Mark Nudelman – the legendary terminal pager that set the standard.
License
Distributed under the MIT License.
See LICENSE for more information.
