magical markdown slides
1# lantern
2
3> A modern, fast, terminal presentation tool inspired by [`maaslalani/slides`](https://github.com/maaslalani/slides), built with Rust.
4
5<details>
6<summary>
7Now with image support (if your terminal supports it!)
8</summary>
9
10
11
12
13
14</details>
15
16## Quickstart
17
18### Installation
19
20From a local clone:
21
22```bash
23cargo install --path cli
24```
25
26From GitHub:
27
28```bash
29cargo install --git https://github.com/stormlightlabs/lantern.git lantern-cli
30```
31
32From Tangled:
33
34```bash
35cargo install --git https://tangled.sh/desertthunder.dev/lantern lantern-cli
36```
37
38### Create Your First Deck
39
40Create a markdown file `presentation.md`:
41
42````markdown
43---
44theme: nord
45---
46
47# Welcome to lantern
48
49A terminal presentation tool built with Rust
50
51---
52
53## Features
54
55- Base16 theming system
56- Syntax highlighting
57- Live reload
58- Export to image/video
59
60---
61
62## Code Example
63
64```rust
65fn main() {
66 println!("Hello, lantern!");
67}
68```
69
70---
71
72## That's it
73
74Press `q` to quit, `←/→` to navigate
75
76````
77
78### Present
79
80```bash
81# Interactive TUI mode
82lantern present presentation.md
83
84# Print to stdout
85lantern print presentation.md
86
87# With custom theme
88lantern present presentation.md --theme catppuccin-mocha
89```
90
91### Navigation
92
93| Key | Action |
94| ------------- | ------------------- |
95| `→`, `j`, `n` | Next slide |
96| `←`, `k`, `p` | Previous slide |
97| `q` | Quit |
98
99## Design Principles
100
101__Color as Data:__
102All color use flows through typed wrappers using `owo-colors`. No ad-hoc ANSI escapes.
103
104__Themeable:__
105Built on the [Base16](https://github.com/chriskempson/base16) theming system with 10 prebuilt themes (Catppuccin, Nord, Gruvbox Material, Solarized, Oxocarbon). Each theme defines 16 semantic colors mapped to content and UI elements. Themes can be selected via frontmatter, CLI flags, or environment variables.
106
107__Reproducible:__
108Everything is reproducible in plain text — decks can render without TUI (using `lantern print`).
109
110__Composable:__
111Parser → Model → Renderer are independent modules with tests and traits.
112
113__Portable:__
114Runs on any terminal supporting UTF-8; dependencies limited to core crates.
115
116## Testing
117
118This project uses `cargo-llvm-cov` for coverage
119
120Installation:
121
122```sh
123# MacOS
124brew install cargo-llvm-cov
125
126# Linux
127cargo +stable install cargo-llvm-cov --locked
128```
129
130Run tests:
131
132```sh
133cargo llvm-cov
134
135# Open the browser
136cargo llvm-cov --open
137```