winless

command module
v1.2.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 16, 2026 License: MIT Imports: 13 Imported by: 0

README

winless

A less-like terminal pager for Windows — single binary, no runtime, no dependencies to install.

Features

  • Scroll files, piped stdin, or multiple files in the terminal
  • Syntax highlighting for Go, JS/TS, Python, Rust, C/C++, Shell, JSON, YAML, TOML, CSS, HTML, Markdown, Ruby
  • Regex search forward and backward with match highlighting, case-sensitive toggle
  • Half-page scroll, jump to line number, jump to percentage
  • Multi-file navigation — :n / :p / :x / :d / :e like real less
  • Mouse drag to select and auto-copy to clipboard — drag to highlight, text is copied on release
  • y key — copy the current line to clipboard instantly
  • Paste into search — Ctrl+V, Insert, or right-click while typing a pattern
  • Follow mode (like tail -f) for live log watching
  • Line wrap / chop toggle
  • Optional line numbers
  • Mouse scroll support
  • In-pager help overlay (h)

Install

go install github.com/fermat-tech/winless@latest

Or grab a pre-built .exe from the Releases page — no Go toolchain needed.

Requires Go 1.21+ to build from source. Produces a single self-contained .exe.

Usage

winless [options] [file ...]
command | winless [options]

Multiple files may be given; move between them with :n / :p (see Multi-file below).

Options

Flag Description
-N, --line-numbers Show line numbers
-S, --chop-long-lines Chop long lines instead of wrapping
-i, --ignore-case Case-insensitive search (default); toggle with I
-f, --follow Start in follow mode (like tail -f)
-h, --help Show help
-V, --version Show version and exit
-- End of options; treat all remaining args as filenames (e.g. winless -- -w opens a file literally named -w)

Key Bindings

Navigation

Key Action
↑ / k, ↓ / j Scroll one line
d / Ctrl+D, u / Ctrl+U Scroll half a page down / up
PgUp / b, PgDn / Space Scroll one page
g / Home First line — Ng jumps to line N
G / End Last line — NG jumps to line N
Np / N% Jump to N% through the file
← / → Horizontal scroll (chop mode)

Search

Key Action
/pattern Search forward (regex)
?pattern Search backward (regex)
n / N Next / previous match
I Toggle case-sensitive / case-insensitive search

While typing a search pattern, paste the clipboard with Ctrl+V, Insert (Shift+Insert), or right-click.

Multi-file

Command Action
:n Next file
:p Previous file
:x First file
:d Remove current file from the list
:e <file> Open a file

Copy

Key / Action Description
Mouse drag Select text; automatically copied to clipboard on release
y Copy current line to clipboard
Escape Clear selection

Toggles & Other

Key Action
S Toggle wrap / chop mode
H Toggle syntax highlighting
F Follow mode — any key stops
h Key reference overlay
= / Ctrl+G File info
q / Q Quit

License

MIT

Documentation

Overview

winless is a less-like terminal pager for Windows.

It pages files or piped stdin with syntax highlighting, regex search, follow mode (tail -f), mouse-drag copy-to-clipboard, multi-file navigation, and an in-pager key reference overlay. A single self-contained .exe with no runtime or external dependencies required.

Install

go install github.com/fermat-tech/winless@latest

Or download a pre-built binary from the Releases page on GitHub.

Usage

winless [options] [file ...]
command | winless [options]

When no file is given and stdin is a pipe, winless pages stdin. Multiple files may be specified; use :n / :p to move between them.

Options

	-N, --line-numbers      Show line numbers
	-S, --chop-long-lines   Chop long lines (no wrap); toggle with S key in-pager
	-i, --ignore-case       Case-insensitive search (default); toggle with I key
	-f, --follow            Start in follow mode (like tail -f); any key stops
	-h, --help              Print help and exit
	-V, --version           Print version and exit
	--                      End of options; remaining args are filenames
                         (use this to open a file whose name starts with -)

Navigation

↑ / k            Scroll up one line
↓ / j            Scroll down one line
d / Ctrl+D       Scroll down half a page
u / Ctrl+U       Scroll up half a page
PgUp / b         Scroll up one page
PgDn / Space     Scroll down one page
g / Home         Jump to first line  (Ng = jump to line N)
G / End          Jump to last line   (NG = jump to line N)
Np / N%          Jump to N% of file  (e.g. 50p = midpoint)
← / →            Scroll horizontally (chop mode only)
Mouse wheel      Scroll three lines up or down
/pattern         Search forward (regular expression)
?pattern         Search backward
n                Jump to next match
N                Jump to previous match
I                Toggle case-sensitive / case-insensitive search

While typing a pattern, paste the clipboard into the search box with Ctrl+V, Insert (Shift+Insert), or right-click.

Multi-file Commands

:n    Next file
:p    Previous file
:x    First file
:d    Remove current file from list
:e f  Examine (open) file f

Copy to Clipboard

Mouse drag     Select text; automatically copied to clipboard on release
y              Copy the current top line to the clipboard
Escape         Clear the selection highlight

Toggles and Other Keys

S   Toggle wrap / chop mode (chop truncates long lines; wrap is the default)
H   Toggle syntax highlighting on / off
F   Enter follow mode (live tail); press any key to stop
h   Show the in-pager key reference overlay
=   Show file info (name, current line, total lines, mode)
q   Quit

Syntax Highlighting

Language is detected from the file extension. Supported languages: Go, JavaScript, TypeScript, Python, Shell, JSON, YAML, TOML, CSS/SCSS, HTML/XML, Markdown, Rust, C, C++, Ruby.

Follow Mode

Follow mode (F key or -f flag) polls the file every 250 ms and appends new lines as they arrive, keeping the view scrolled to the bottom — equivalent to tail -f. It requires a real file; stdin is not supported. Press any key to exit follow mode.

Rename-Friendly

The binary reads its own name at startup via os.Args[0], so renaming the .exe changes the name shown in the status bar and help text without recompiling.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL