vantage

module
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2026 License: Apache-2.0

README ΒΆ

Vantage πŸ”­

CI

A beautiful local Markdown viewer with live reload and Git awareness.

Website Β· GitHub Β· Issues

Vantage screenshot

Vantage renders your Markdown files the way GitHub does β€” locally, instantly, with live reload as you edit. Point it at one directory or several, and browse your docs in a polished web UI with file tree navigation, Mermaid diagrams, commit history, and diffs.

Vantage ships as a single Go binary with an embedded React frontend β€” no runtime dependencies, no background services to babysit. Built for developers who write docs alongside code, and especially useful for reviewing LLM-generated Markdown output in real time.

Platform: Linux and macOS are fully supported. Windows is not supported.


Install

go install
go install github.com/mschulkind-oss/vantage/cmd/vantage@latest

This installs a vantage binary to your $GOBIN (typically ~/go/bin). Make sure it's on your PATH.

brew install mschulkind-oss/tap/vantage
From source
git clone https://github.com/mschulkind-oss/vantage
cd vantage
mise install               # installs Go 1.26, Node 22, just
just build                 # produces ./vantage

The resulting ./vantage binary embeds the compiled frontend, so it's fully self-contained.


πŸš€ Quick Start

Single Directory

Point Vantage at any directory containing Markdown files β€” or a specific file:

vantage ~/Documents/notes          # open a directory
vantage ~/Documents/notes/intro.md # open a specific file

The server starts, your default browser opens to the file (or directory root), and the sidebar focuses on the parent directory of what you opened. Pass --no-open to suppress the browser launch.

Multiple Directories (Daemon Mode)

To serve several directories at once, create a config and run the daemon:

# Generate a config file
vantage init-config

# Edit it
$EDITOR ~/.config/vantage/config.toml

# Start the daemon
vantage daemon

✨ Features

  • GitHub-Style Rendering β€” Full GitHub Flavored Markdown with syntax highlighting, tables, task lists, and footnotes
  • Math & Diagrams β€” KaTeX math rendering and inline Mermaid diagrams from fenced code blocks
  • Live Reload β€” Files update instantly in the browser via WebSocket when modified on disk
  • Git Integration β€” View commit history, diffs, working-tree changes, file status, and recent changes for any file
  • Review Mode β€” Inline comments with tracked agent responses (delivered via .vantage/inbox files or pasted into the panel) for collaborative review
  • Multi-Repo Mode β€” Serve multiple directories from a single daemon, each accessible by name
  • Source Directory Auto-Discovery β€” Point at parent directories to automatically find and add all git repos
  • File Tree Navigation β€” Lazy-loaded sidebar with directory expansion
  • Frontmatter Support β€” Displays YAML and TOML frontmatter as a clean metadata table
  • Static Site Export β€” Build a standalone static site from a directory of Markdown
  • Dark Mode β€” Toggle with Shift+D, persisted across sessions
  • Keyboard Shortcuts β€” Quick file picker with t, fuzzy search, keyboard navigation
  • Performance Diagnostics β€” Built-in perf-report command for anonymized timing data
  • systemd Service (Linux) β€” Run as a background service that starts on login

βš™οΈ Configuration

The config file lives at ~/.config/vantage/config.toml. Generate one with:

vantage init-config
Example Config
# Server settings
host = "127.0.0.1"
port = 8000

# Auto-discover git repos under these directories
source_dirs = ["~/code", "~/projects"]

# Or list repos explicitly (both methods can be combined)
[[repos]]
name = "notes"
path = "~/Documents/notes"

[[repos]]
name = "work-docs"
path = "~/work/documentation"

Each repo is accessible at http://localhost:8000/{name}/.

Configuration Reference
Key Type Default Description
host string "127.0.0.1" Server bind address
port integer 8000 Server port
source_dirs array of strings [] Parent directories to scan for git repos
repos[].name string required Display name and URL slug for the directory
repos[].path string required Path to directory (supports ~)
repos[].allowed_read_roots array of strings [] Additional directories this repo may read
exclude_dirs array of strings (see below) Directories to hide from file listings
show_hidden boolean true Show dotfiles in sidebar
walk_max_depth integer or null null (unlimited) Max directory depth for untracked file discovery
walk_timeout float 30.0 Timeout (seconds) for git ls-files subprocess
use_ignore_files boolean true Honor .gitignore and ignore files during walks
log_level string "info" Logging verbosity
Excluded Directories

By default, Vantage hides common build and dependency directories from the sidebar, file picker, and recent files β€” for example node_modules, dist, build, .cache, .git, .hg, and .svn.

Override this in your config:

exclude_dirs = ["node_modules", "vendor", "dist"]

πŸ”§ Service Management (Linux)

On Linux, Vantage can run as a systemd user service that starts automatically on login. On macOS, run vantage directly or wrap it in a launchd agent yourself.

Install the Service
vantage install-service
Enable and Start
systemctl --user daemon-reload
systemctl --user enable vantage
systemctl --user start vantage
Common Commands
# Check status
systemctl --user status vantage

# View logs
journalctl --user -u vantage -f

# Restart after config changes
systemctl --user restart vantage

# Stop the service
systemctl --user stop vantage
Keep Running After Logout

By default, user services stop when you log out. To keep Vantage running:

loginctl enable-linger $USER

πŸ–₯️ CLI Reference

The command is vantage.

vantage [PATH]                      # Serve a dir or file, auto-open browser
vantage serve [PATH] [flags]        # Same as above, with explicit flags
vantage daemon [-c config.toml]     # Serve multiple directories from config
vantage init-config                 # Generate example config file
vantage install-service             # Install systemd user service (Linux only)
vantage build PATH -o OUTPUT        # Build a static site
vantage perf-report [--url]         # Performance diagnostics from a running instance
serve flags
Flag Description
--host Bind address (default 127.0.0.1)
--port Server port (default 8000)
--no-open Don't open the browser on start
--show-hidden Show dotfiles in the sidebar
--exclude-dirs Directories to hide from file listings
--use-ignore-files Honor .gitignore and ignore files during walks
--walk-max-depth Max directory depth for untracked file discovery
--walk-timeout Timeout (seconds) for git ls-files subprocess

πŸ”Œ API

Vantage exposes a REST API for programmatic access under /api.

Single-Repo Endpoints
Endpoint Description
GET /api/tree?path=. File tree listing
GET /api/content?path=file.md File content
GET /api/files List all Markdown files
GET /api/files/all List all files
GET /api/recent/all Recently accessed files
GET /api/info Repository metadata
GET /api/git/history?path=file.md Commit history
GET /api/git/diff?path=file.md&commit=SHA Diff for a commit
GET /api/git/diff/working?path=file.md Uncommitted changes diff
GET /api/git/status?path=file.md File status (modified, committed)
GET /api/git/recent?limit=20 Recently changed files
GET /api/review Read review comments
DELETE /api/review Remove review data
POST /api/review/comments (+ subroutes) Review commands (create, reply, …)
Multi-Repo Endpoints

In daemon mode, endpoints are prefixed with /api/r/{repo}/:

Endpoint Description
GET /api/repos List configured repositories
GET /api/r/{repo}/tree?path=. File tree for a repo
GET /api/r/{repo}/content?path=file.md File content for a repo
(all single-repo endpoints above) Prefixed with /api/r/{repo}
Utility Endpoints
Endpoint Description
GET /api/health Health check
GET /api/version Server version info
GET /api/perf/diagnostics Performance diagnostics (anonymized)
POST /api/perf/reset Reset performance counters
WS /ws WebSocket for live reload notifications

πŸ› οΈ Development

Run the quality gate with just check (gofmt, go vet, staticcheck, go test, plus frontend lint, tsc, and vitest). See docs/development.md for more on building, testing, and contributing to Vantage.


πŸ“„ License

Apache 2.0 β€” see LICENSE.

Directories ΒΆ

Path Synopsis
cmd
vantage command
Command vantage is a local Markdown viewer with live reload and Git awareness.
Command vantage is a local Markdown viewer with live reload and Git awareness.
internal
api
Package api implements the Vantage HTTP API: the request handlers behind every /api route and the pure response builders they share with the static site builder.
Package api implements the Vantage HTTP API: the request handlers behind every /api route and the pure response builders they share with the static site builder.
buildinfo
Package buildinfo exposes version metadata for the running binary.
Package buildinfo exposes version metadata for the running binary.
config
Package config holds the unified runtime configuration for Vantage.
Package config holds the unified runtime configuration for Vantage.
fs
Package fs serves the file-tree and file-content queries behind the backend's /tree, /content, and /files endpoints.
Package fs serves the file-tree and file-content queries behind the backend's /tree, /content, and /files endpoints.
git
Package git provides a GitService that shells out to the "git" binary to answer the backend's history, status, diff, and recent-files queries.
Package git provides a GitService that shells out to the "git" binary to answer the backend's history, status, diff, and recent-files queries.
gitenv
Package gitenv sanitizes the process environment before the codebase shells out to the git binary.
Package gitenv sanitizes the process environment before the codebase shells out to the git binary.
ignore
Package ignore layers gitignore-style ignore files for a single repo.
Package ignore layers gitignore-style ignore files for a single repo.
live
Package live provides the realtime layer of the Vantage server: a WebSocket connection Manager, the /api/ws handler, and an fsnotify-backed file Watcher that broadcasts file-change notifications to connected browsers.
Package live provides the realtime layer of the Vantage server: a WebSocket connection Manager, the /api/ws handler, and an fsnotify-backed file Watcher that broadcasts file-change notifications to connected browsers.
model
Package model defines the wire-format DTOs exchanged between the Vantage backend and its React frontend.
Package model defines the wire-format DTOs exchanged between the Vantage backend and its React frontend.
perf
Package perf provides in-memory performance instrumentation: a ring buffer of timing records, request-timing middleware, percentile diagnostics, and an anonymized repo-shape walk.
Package perf provides in-memory performance instrumentation: a ring buffer of timing records, request-timing middleware, percentile diagnostics, and an anonymized repo-shape walk.
review
Package review persists review-mode data (threaded comments) and applies agent responses delivered through the .vantage/inbox files, turning their JSONL lines into reviewer-visible reactions.
Package review persists review-mode data (threaded comments) and applies agent responses delivered through the .vantage/inbox files, turning their JSONL lines into reviewer-visible reactions.
reviewanchor
Package reviewanchor implements the canonicalization and hashing that anchor review comments to Markdown blocks.
Package reviewanchor implements the canonicalization and hashing that anchor review comments to Markdown blocks.
server
Package server is the integrator: it assembles the resolved configuration, per-repository services, the shared singletons (review store, perf store, live Manager), and the api handlers into a single chi router and runs the background lifecycle (file watchers + the repo-activity refresh loop).
Package server is the integrator: it assembles the resolved configuration, per-repository services, the shared singletons (review store, perf store, live Manager), and the api handlers into a single chi router and runs the background lifecycle (file watchers + the repo-activity refresh loop).
static
Package static builds a self-contained static site from a Markdown repository.
Package static builds a self-contained static site from a Markdown repository.
Package web embeds the built frontend single-page application.
Package web embeds the built frontend single-page application.

Jump to

Keyboard shortcuts

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