A beautiful TUI for browsing files and reading markdown/code: - Two-pane layout with file tree and content viewer - Markdown rendering via Glamour - Syntax highlighting via Chroma - Auto-detects light/dark terminal theme - Arrow key navigation, Esc to go back - Page Up/Down, Home/End for scrolling Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
67 lines
1.5 KiB
Markdown
67 lines
1.5 KiB
Markdown
# Reader
|
|
|
|
A beautiful terminal file browser and markdown viewer built with Go and the Charm ecosystem.
|
|
|
|
## Features
|
|
|
|
- **File Tree Navigation**: Browse directories with expand/collapse functionality
|
|
- **Markdown Rendering**: Beautiful markdown display using Glamour
|
|
- **Syntax Highlighting**: Code files rendered with Chroma
|
|
- **Vim-like Keybindings**: Navigate efficiently with familiar keys
|
|
- **Responsive Layout**: Adapts to terminal size
|
|
|
|
## Installation
|
|
|
|
```bash
|
|
go build -o reader
|
|
```
|
|
|
|
## Usage
|
|
|
|
```bash
|
|
# Open current directory
|
|
./reader
|
|
|
|
# Open a specific directory
|
|
./reader ~/Documents
|
|
|
|
# Show help
|
|
./reader --help
|
|
```
|
|
|
|
## Keyboard Shortcuts
|
|
|
|
### File Browser
|
|
| Key | Action |
|
|
|-----|--------|
|
|
| `↑` / `↓` | Move up/down |
|
|
| `Enter` | Open file or folder |
|
|
| `←` | Collapse folder / go to parent |
|
|
| `→` | Expand folder / open file |
|
|
|
|
### Reading a File
|
|
| Key | Action |
|
|
|-----|--------|
|
|
| `↑` / `↓` | Scroll up/down |
|
|
| `PgUp` / `PgDn` | Page up/down |
|
|
| `Home` / `End` | Jump to top/bottom |
|
|
| `Esc` | Back to file browser |
|
|
|
|
### General
|
|
| Key | Action |
|
|
|-----|--------|
|
|
| `?` | Show help |
|
|
| `q` | Quit |
|
|
|
|
## Built With
|
|
|
|
- [Bubbletea](https://github.com/charmbracelet/bubbletea) - TUI framework
|
|
- [Lipgloss](https://github.com/charmbracelet/lipgloss) - Styling
|
|
- [Glamour](https://github.com/charmbracelet/glamour) - Markdown rendering
|
|
- [Chroma](https://github.com/alecthomas/chroma) - Syntax highlighting
|
|
- [Bubbles](https://github.com/charmbracelet/bubbles) - UI components
|
|
|
|
## License
|
|
|
|
MIT
|