Follow these simple steps to install Less-Pager-Mini.
Make sure you have the following installed:
Install Less-Pager-Mini via npm:
npm i less-pager-mini
If you want to use it directly from your terminal:
npm i -g less-pager-mini
Use lmn anywhere you'd use less — same keys, same flags:
lmn file.txt # page a file
lmn -N app.log # any less option works
cmd | lmn # page piped output
lmn huge-500GB.log # giant files open instantly
import pager from 'less-pager-mini';
const example = ['a', 'b', 'c'];
await pager(example);
await pager(example, ['-N', '--chop-long-lines']);
await pager(example, ['-R'], { LESS: '-X' });
input: Any unknown input to page.
args: Less arguments as an array, spelled the way less documents
them — ['-N', '--chop-long-lines', '+G']. They are scanned in order, so a
later one overrides an earlier one, and an option may repeat.
env: An environment overlay for this call — the variables less
consults (LESS, LESSOPEN, LESSSECURE, ...). $LESS is scanned before
args, as it is before argv on a command line.
You can use the following flags in args:
--examine-file: Treats the input as file path(s) and reads from disk,
like naming them on the command line.
Example input:
'a.txt'
or
[
'a.txt',
'b.md',
'c' // Ignored
]
--tab-object: JSON.stringifies the input object indented with \t.
You can adjust tab stops using the --tabs option.
off:
["a","b",["c","d"]]
{"a":1,"b":2,"c":{"d":3}}
on:
[
"a",
"b",
[
"c",
"d"
]
]
{
"a": 1,
"b": 2,
"c": {
"d": 3
}
}
--use-js-regexp: Searches with JavaScript's RegExp. Off by default —
compiling POSIX-compatible regex patterns with posix-regex.
--use-zsh-glob: Expands a filename with zsh's globbing rules in process.
On for Windows, Off elsewhere by default — globbing via $SHELL.
--lesskey-help: Displays the syntax of lesskey files.
--view-lesskey: Shows the lesskeys in use — v edits and re-applies the one on screen;
creates ~/.lesskey if it does not exist.
--examine-file and --tab-object are not supported in lmn.
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.
lessless experiencelmn command directly from terminalFound something odd or came up with a bright improvement?
Feel free to open an issue — contributions and feedback are always welcome!
Contributions are welcome! If you have suggestions, improvements, or bug fixes, feel free to:
Please follow the coding style and write clear commit messages.
Let’s make Less-Pager-Mini better together!
less by Mark Nudelman – the legendary terminal pager that set the standard.Distributed under the MIT License.
See LICENSE for more information.
948 commits
TypeScript
94.2%
Python
5.5%
Follow these simple steps to install Less-Pager-Mini.
Make sure you have the following installed:
Install Less-Pager-Mini via npm:
npm i less-pager-mini
If you want to use it directly from your terminal:
npm i -g less-pager-mini
Use lmn anywhere you'd use less — same keys, same flags:
lmn file.txt # page a file
lmn -N app.log # any less option works
cmd | lmn # page piped output
lmn huge-500GB.log # giant files open instantly
import pager from 'less-pager-mini';
const example = ['a', 'b', 'c'];
await pager(example);
await pager(example, ['-N', '--chop-long-lines']);
await pager(example, ['-R'], { LESS: '-X' });
input: Any unknown input to page.
args: Less arguments as an array, spelled the way less documents
them — ['-N', '--chop-long-lines', '+G']. They are scanned in order, so a
later one overrides an earlier one, and an option may repeat.
env: An environment overlay for this call — the variables less
consults (LESS, LESSOPEN, LESSSECURE, ...). $LESS is scanned before
args, as it is before argv on a command line.
You can use the following flags in args:
--examine-file: Treats the input as file path(s) and reads from disk,
like naming them on the command line.
Example input:
'a.txt'
or
[
'a.txt',
'b.md',
'c' // Ignored
]
--tab-object: JSON.stringifies the input object indented with \t.
You can adjust tab stops using the --tabs option.
off:
["a","b",["c","d"]]
{"a":1,"b":2,"c":{"d":3}}
on:
[
"a",
"b",
[
"c",
"d"
]
]
{
"a": 1,
"b": 2,
"c": {
"d": 3
}
}
--use-js-regexp: Searches with JavaScript's RegExp. Off by default —
compiling POSIX-compatible regex patterns with posix-regex.
--use-zsh-glob: Expands a filename with zsh's globbing rules in process.
On for Windows, Off elsewhere by default — globbing via $SHELL.
--lesskey-help: Displays the syntax of lesskey files.
--view-lesskey: Shows the lesskeys in use — v edits and re-applies the one on screen;
creates ~/.lesskey if it does not exist.
--examine-file and --tab-object are not supported in lmn.
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.
lessless experiencelmn command directly from terminalFound something odd or came up with a bright improvement?
Feel free to open an issue — contributions and feedback are always welcome!
Contributions are welcome! If you have suggestions, improvements, or bug fixes, feel free to:
Please follow the coding style and write clear commit messages.
Let’s make Less-Pager-Mini better together!
less by Mark Nudelman – the legendary terminal pager that set the standard.Distributed under the MIT License.
See LICENSE for more information.
948 commits
TypeScript
94.2%
Python
5.5%