Skip to content

Repository files navigation

metascope

Interactive terminal file viewer for Metarhia — markdown, syntax highlighting, keyboard navigation, live resize.

Style examples: EXAMPLES.md

metascope EXAMPLES.md

Install (Linux)

cd .MetaTools/metascope
npm run enable
source ~/.bashrc   # or open a new terminal

Installs ~/.local/bin/metascope and writes ~/.bashrc.d/metascope.sh:

export PATH="$HOME/.local/bin:$PATH"
export VIEWER="$HOME/.local/bin/metascope"

Then from anywhere (after source ~/.bashrc or a new terminal):

metascope README.md
$VIEWER path/to/file.md     # standard VIEWER
metascope .

Midnight Commander: also sets F3 to $VIEWER in ~/.config/mc/mc.ext.ini (View=%var{VIEWER:less} %f, use_internal_view=false). Restart mc after enabling.

Manual (without install script):

export PATH="$HOME/.local/bin:$PATH"
export VIEWER="$HOME/.local/bin/metascope"

Uninstall:

npm run disable

Alternatives: npm link / npm install -g .

Quick start (no enable)

cd .MetaTools/metascope
npm install
node bin/metascope.js README.md

Non-TTY / pipes: prints rendered output once and exits.


Keyboard

Key Action
Line up
Line down
/ PgUp Page up
/ PgDn Page down
Home Top
End Bottom
Space Toggle status line
/ Search
n / N Next / previous match
l Toggle line numbers
r Reload file
? Help
Esc Back to picker / quit
q Quit

Formats

Whole-file view (same soft code band): md, js, mjs, ts, .d.ts, txt, json, csv, html, css.

Stack

Only Metarhia deps: concolor, metautil.

Node >= 18.

Releases

Packages

Contributors

Languages