ManT makes local Unix manual pages easier to explore for people and easier to
query for software. It presents the complete page in a responsive terminal UI,
then exposes the same structured document through the mant CLI and MCP
server for agents and scripts.
| Tool | Best for | Highlights |
|---|---|---|
mantui |
Reading in a terminal | Complete manual, hierarchy-aware sidebar, in-page links, search, and optional tldr quick reference |
mant |
Agents and automation | Markdown, text, JSON, generated schemas, semantic option lookups, location-aware search, and MCP stdio |
Both tools parse local man and mdoc sources with bundled libmandoc. A
system mandoc installation is not required. If an installed tldr client has
data for the topic, ManT puts that quick reference before the manual.
Download the archive for your architecture from the
latest release, extract
it, and put both executables on PATH:
tar -xzf mant-<version>-linux-<arch>.tar.gz
cd mant-<version>-linux-<arch>
install -Dm755 mantui mant -t ~/.local/binmantui locates its companion CLI through MANT_PATH first and then
PATH, so keep mantui and mant together when installing from an archive.
The release archive includes the relevant bundled-parser license and a SHA-256
checksum is published alongside it.
Source builds support Linux and macOS. They require local manual pages and the
man command, plus Bun, Rust 1.88+, and a C compiler (GCC on Linux or Clang on
macOS by default).
bun install
bun run build
PATH="$PWD/dist:$PATH" mantui gitThe build produces dist/mantui and dist/mant. For a fast development
loop, use bun run dev -- git; it builds and selects the local mant binary
automatically.
mantui git
mantui printf --section 3
mantui tarThe UI always shows the complete manual. Its sidebar mirrors nested sections,
can reveal normalized command-line options on demand, follows page-local
references, and synchronizes with the reading position after scrolling settles.
Use mantui -h for the focused interactive command reference.
Direct content queries default to Markdown:
mant git
mant printf --section 3 --format text
mant git --format json --compactDiscover a document before retrieving only the content you need. Paths are
one-based; 0 is reserved for an available tldr quick reference.
mant gcc --outline
mant gcc --outline sections
mant tar --node acls --format markdown
mant gcc --node 4.2 --node 4.7 --format jsonAsk directly about one semantic entry without first walking the outline:
mant tar --explain=--exclude
mant tar --explain excludeUse the = form when the selector starts with -. --explain returns one
option, command, or environment-variable entry; use --node for a whole
section or tldr content.
Search returns matches with stable Markdown line and column coordinates, plus the nearest reusable outline path:
mant tar --search=--acls --context 1
mant gcc --search 'worktree|branch' --regex --case smartFor machine integration, the versioned JSON Schema is discoverable from the binary rather than copied from documentation:
mant --schema request
mant --schema all --compact
mant -hRun mant --update-tldr to refresh data through the installed client when
available, otherwise through ManT's private cache.
Run the same native executable as a read-only MCP server over standard input and output:
mant --mcpConfigure an MCP client with command mant and arguments ["--mcp"].
tools/list exposes generated input and output JSON Schemas for four tools:
mant_manual_outline, mant_manual_get, mant_manual_explain, and
mant_manual_search. They return the same versioned ManT projections as the
direct CLI. The server has no network transport and no mutation tools; its
standard output is reserved for MCP JSON-RPC, while diagnostics use standard
error.
mantui (Bun / OpenTUI React)
└─ versioned JSON over stdio → mant
└─ mant-core
├─ mant-ast
└─ libmandoc-rs
└─ vendored libmandoc + private C shim
MCP client ── stdio JSON-RPC → mant --mcp ──→ mant-core
Rust owns source discovery, parsing, the stable AST, tldr integration, and
Markdown/text/JSON output. libmandoc-rs exposes an owned, renderer-neutral
parse tree; mant-core lowers that tree into ManT's document contract.
TypeScript owns only terminal interaction and presentation after validating the
native response boundary.
ManT is licensed under the Apache License 2.0. The bundled mandoc source retains its upstream license.
