Slides in your terminal.
Instructions
brew install slides
yay -S slides
nix-env -iA nixpkgs.slides
sudo snap install slides
go install github.com/maaslalani/slides@latest
From source:
git clone https://github.com/maaslalani/slides.git
cd slides
go install
You can also download a binary from the releases page.
Create a simple markdown file that contains your slides:
# Welcome to Slides
A terminal based presentation tool
---
## Everything is markdown
In fact, this entire presentation is a markdown file.
---
## Everything happens in your terminal
Create slides and present them without ever leaving your terminal.
---
## Code execution
```go
package main
import "fmt"
func main() {
fmt.Println("Execute code directly inside the slides")
}
```
You can execute code inside your slides by pressing `<C-e>`,
the output of your command will be displayed at the end of the current slide.
---
## Pre-process slides
You can add a code block with three tildes (`~`) and write a command to run *before* displaying
the slides, the text inside the code block will be passed as `stdin` to the command
and the code block will be replaced with the `stdout` of the command.
~~~graph-easy --as=boxart
[ A ] - to -> [ B ]
~~~
The above will be pre-processed to look like:
┌───┐ to ┌───┐
│ A │ ────> │ B │
└───┘ └───┘
For security reasons, you must pass a file that has execution permissions
for the slides to be pre-processed. You can use `chmod` to add these permissions.
```bash
chmod +x file.md
```
Checkout the example slides.
Then, to present, run:
slides presentation.md
If given a file name, slides
will automatically look for changes in the file and update the presentation live.
slides
also accepts input through stdin
:
curl http:https://example.com/slides.md | slides
Go to the next slide with any of the following keys:
- space
- right
- down
- enter
- n
- j
- l
Go to the previous slide with any of the following keys:
- left
- up
- p
- h
- k
If slides finds a code block on the current slides it can execute the code block and display the result as virtual text on the screen.
Press ctrl+e on a slide with a code block to execute it and display the result.
slides
allows you to customize your presentation's look and feel with metadata at the top of your slides.md
.
This section is entirely optional,
slides
will use sensible defaults if this section or any field in the section is omitted.
---
theme: ./path/to/theme.json
author: Gopher
date: January 2, 2006
paging: Slide %d / %d
---
theme
: Path tojson
file containing a glamour theme, can also be a link to a remotejson
file which slides will fetch before presenting.author
: Astring
to display on the bottom-left corner of the presentation view. Defaults to the OS current user's full name. Can be empty to hide the author.date
: Astring
that is used to format today's date in the form2006-01-02
. If the date is not a valid form of2006-01-02
the contents of the string will be displayed. Defaults to2006-01-02
.paging
: Astring
that contains 0 or more%d
directives. The first%d
will be replaced with the current slide number and the second%d
will be replaced with the total slides count. Defaults toSlide %d / %d
.
Credits: This project was heavily inspired by lookatme
.
See the development documentation