Skip to content

Guide · Open source

How to use slides: present Markdown in your terminal

Updated · written with AI from the project's own documentation and checked against our catalogue data

Slides is an open-source command-line program written in Go that shows a Markdown file as a presentation inside your terminal. It suits developers who already work in a terminal and prefer writing slides as plain text. After this guide you will be able to install it, write a slide file, move through slides with the keyboard, and share a talk over SSH.

slidesmaaslalani/slides · ★ 11.7k · MIT

Quick start

  1. 1Install slides. Install it with Homebrew, an AUR helper, Nix, snapd or the Go toolchain, using the command for your route.
  2. 2Create a Markdown file. Write your slides in one file and separate each slide with a line containing three dashes.
  3. 3Start the presentation. Run slides with your file name. Changes you save to the file appear live.
  4. 4Move through the slides. Use space or the arrow keys to go forward, left or up to go back, and gg or G to jump to the start or end.
  5. 5Run code or pre-process diagrams. Press ctrl+e on a code block to run it. For pre-processing, run chmod +x on the file first.
  6. 6Share over SSH if needed. Run slides serve with your file and have viewers connect with ssh to the port it prints.

Install slides on macOS, Arch, Nix, snapd or with Go

The README lists several install routes. Choose the one that matches your system. On macOS it is available through Homebrew, on Arch through an AUR helper, on Nixpkgs, on any Linux distribution running snapd, and through the Go toolchain on any system where Go is installed.

You can also download a binary from the releases page on the project's GitHub repository, or build from source by cloning the repository and running go install inside it.

  • macOS (Homebrew): brew install slides
  • Arch (AUR helper): yay -S slides
  • Nixpkgs (unstable): nix-env -iA nixpkgs.slides
  • Any Linux running snapd: sudo snap install slides
  • Go: go install github.com/maaslalani/slides@latest
go install github.com/maaslalani/slides@latest

Write your slides as a Markdown file

A slide deck is a single Markdown file. You separate slides with a horizontal rule, which is three dashes on their own line. Each slide can use ordinary Markdown headings and text, so the file also reads as a normal document.

The README's own example uses a title slide, then slides with headings and short sentences. Code blocks can appear inside a slide as well.

  • Put --- on its own line between slides.
  • Use a # or ## heading at the top of each slide.
  • Keep each slide short, since the output is text in a terminal.
# Welcome to Slides A terminal based presentation tool --- ## Everything is markdown In fact, this entire presentation is a markdown file.

Present your file and move between slides

To start a presentation, pass the file name to slides. If you give it a file name, slides watches that file and updates the presentation as you save changes, so you can edit and see the result side by side.

You can also pipe a file in through stdin. Navigation uses the keyboard. Space, the right arrow, enter, n, j and l all move forward, while left, up, p, h, k and N move back. gg jumps to the first slide and G jumps to the last. Typing a number before a movement key moves that many slides, and number followed by G goes to a specific slide. Press / to search, which accepts a regular expression, and ctrl+n for the next match.

  • gg: first slide
  • G: last slide
  • number + G: go to a specific slide
  • / then Enter: search, with /i for case-insensitive matching
  • ctrl+n: next search result
slides presentation.md

Run code and pre-process diagrams in slides

If a slide contains a code block, press ctrl+e on that slide to run it. The output appears as virtual text at the end of the current slide.

Pre-processing works differently. A block that starts with three tildes holds a command. Before the presentation runs, slides passes the block's text to that command as stdin and replaces the block with the command's stdout. The README's example uses graph-easy to turn a text description into a box diagram.

For security, slides only pre-processes a file that has execution permission. Run chmod +x on the file first.

  • Code execution: ctrl+e on a slide with a code block
  • Pre-processing: tilde block with a command, output replaces the block
  • Required for pre-processing: chmod +x on the Markdown file
chmod +x file.md

Customise the look with a metadata block

You can add an optional YAML block at the top of the file to change the presentation. Every field is optional, and slides uses defaults for anything you leave out.

The theme field points to a glamour theme JSON file, either a local path or a remote link. The author field sets text at the bottom-left, and an empty value hides it. The date field formats today's date and the paging field sets the slide counter, with %d placeholders for the current and total slide numbers.

  • theme: path or link to a glamour theme JSON file
  • author: shown bottom-left; defaults to your full name; empty hides it
  • date: format string, defaults to YYYY-MM-DD
  • paging: counter text, defaults to Slide %d / %d
--- theme: ./path/to/theme.json author: Gopher date: MMMM dd, YYYY paging: Slide %d / %d ---

Share a talk over SSH

Run slides serve with your file on a machine that has slides installed. It prints a port, and anyone who can reach that machine can connect with ssh to that port and view the presentation. The viewer does not need slides or the presentation file installed.

The README's example connects to the local machine on port 53531, which is the port the serve command reported in that example. Your port will be whatever your own serve command shows.

  • Host: slides serve presentation.md
  • Viewer: ssh to the host on the port the serve command printed
  • Viewers need only an ssh client
slides serve [file] ssh 127.0.0.1 -p 53531

What people use it for

  • Walking a team through a technical design in the same terminal used for coding.
  • Running a live coding demo where a code block is executed on the slide with ctrl+e.
  • Drawing simple text diagrams in a talk by pre-processing them with an external command such as graph-easy.
  • Presenting to a remote group that connects with ssh rather than installing anything.

Frequently asked questions

Is slides free and open source?

Yes. The project is released under the MIT licence and its source code is on GitHub, written in Go. The README does not mention any cost.

How do I install slides?

The README lists Homebrew for macOS (brew install slides), yay for Arch, Nixpkgs, snapd on Linux, and go install github.com/maaslalani/slides@latest for systems with Go. You can also download a binary from the releases page.

What do I need to use slides?

You need one of the install routes in the README: Homebrew, an Arch AUR helper, Nix, snapd, or the Go toolchain. Presentations are plain Markdown files, so you can write them in any text editor.

Why won't my diagram pre-process?

For security, slides only pre-processes a file that has execution permission. Run chmod +x on your Markdown file and try again.

Can slides show images, videos or animations?

The README describes only terminal rendering and a glamour theme option, so it does not promise images, embedded video or animations. Slides output is text in a terminal.

How does slides compare to presenterm or sli.dev?

The README lists lookatme, sli.dev, sent and presenterm as comparable projects and says slides was heavily inspired by lookatme. Choose by whether you want a terminal tool or a browser-based deck; the README does not benchmark them against each other.

New agent skills, repos and AI tools — every week

The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.

Our verdict

Slides suits developers who live in the terminal, like writing presentations as Markdown, and want to share a talk over SSH without installing anything on the viewer's side. If you need a graphical editor, themes, image-heavy layouts or embedded video, pick a different tool, since slides only renders text in a terminal.

Install options & downloads