Metadata-Version: 2.4
Name: mdtv
Version: 0.1.0
Summary: A friendly, polished terminal Markdown viewer.
Requires-Python: >=3.13
Description-Content-Type: text/markdown
Requires-Dist: textual>=0.89.1
Requires-Dist: typer>=0.12.5

# mdtv

`mdtv` is a friendly terminal Markdown viewer built with Typer and Textual.

## Install

```bash
uv sync
```

## Use

Open a file:

```bash
uv run mdtv README.md
```

Read from stdin:

```bash
cat README.md | uv run mdtv
```

Hide the contents sidebar:

```bash
uv run mdtv README.md --no-toc
```

The sidebar is closed by default. Press `t` to open it on the right side.

Start with a Textual theme:

```bash
uv run mdtv README.md --theme nord
```

Built-in themes include `textual-dark`, `textual-light`, `nord`, `gruvbox`,
`catppuccin-mocha`, `dracula`, `tokyo-night`, `monokai`, `flexoki`,
`catppuccin-latte`, `solarized-light`, `solarized-dark`, `rose-pine`,
`atom-one-dark`, and `atom-one-light`.

## Preferences

`mdtv` stores minimal preferences in `~/.mdtv.json`:

```json
{
  "theme": "textual-dark"
}
```

Selecting a theme with `d` updates that file. Sidebar visibility is session-only
and always starts closed unless `--toc` is passed.

## Development

```bash
uv run ruff format .
uv run ruff check .
uv run pytest
```

## Keys

- `Up` / `Down` or `k` / `j` scroll line by line
- `PageUp` / `PageDown` scroll by page
- `Space` or `f` scrolls forward by page
- `b` scrolls backward by page
- `Home` jumps to the top
- `End` jumps to the bottom
- `t` toggles the contents sidebar
- `d` opens Textual's theme picker
- `r` reloads file-backed documents
- `?` opens the help modal
- `q` or `Esc` quits
