import dev.limebeck.revealkt.dsl.*
import dev.limebeck.revealkt.dsl.slides.*
title = "Hello, Kotlin."slides {
regularSlide {
+title { "Hello, Kotlin." }
+regularText { "From an idea to your first slide." }
}
}
Save as hello.reveal.kts · run with the CLI
{ }
Type-safe DSL
Familiar Kotlin, reusable functions, and version-controlled slides.
↻
Live preview
Save your script. The browser reloads your presentation.
↗
Ready to present
Speaker notes, incremental fragments, and HTML or PDF export.
01 / FROM SCRIPT TO SLIDES
Start in three steps
Linux x86-64 · Java 21 / 25
The packaged CLI needs no Node.js, Gradle, or Maven installation. Use JBang below, or download the standalone JAR.
1
Install the CLI
Check java -version and install JBang. Run these commands and follow the PATH setup instructions.
Download the self-contained CLI JAR from release 1.3.0, rather than the sources, javadoc, or app-jvm artifacts. Rename it to revealkt.jar if needed. In the commands below, replace revealkt with java -jar /path/to/revealkt.jar.
2
Create a presentation
The CLI creates a Demo directory with a script and assets. Open Demo/presentation/Demo.reveal.kts in your editor.
revealkt init Demo
3
Preview and make it yours
Start the server and open localhost:8080. Saving your script or assets updates the presentation.
revealkt run Demo/presentation/Demo.reveal.kts --host 127.0.0.1 --port 8080
←→ navigateEsc overviewS speaker notesCtrl C stop server
i
Chromium is only required for PDF. Install it with revealkt chrome install. Check your environment with revealkt doctor Demo/presentation/Demo.reveal.kts. Missing Chromium fails the check, but HTML preview and export still work.
02 / INCLUDED IN THE CLI
Start with a working example
3 complete Kotlin scripts
Explore real presentations compiled from the bundled Kotlin scripts. Use the slide controls below, or open a presentation in its own tab.
Click inside the presentation to use arrow keys. Press Esc for the slide overview.
View Kotlin source
DslTour.reveal.kts
Run this presentation
These demos track the current source. Use a CLI built from master to get the same slides; released versions may contain earlier examples. The first command creates the script and all assets.
revealkt init DslTour --example technical
revealkt run DslTour/presentation/DslTour.reveal.kts --host 127.0.0.1
03 / YOUR DAILY WORKFLOW
From first draft to final talk
Replace Talk.reveal.kts below with the path to your script.
01 · CHECK
Ready to go?
Check Java, paths, output access, and a real Chromium launch. The script is not executed.
revealkt doctor Talk.reveal.kts
02 · PREVIEW
Edit with live reload
Run a local preview. If an edit fails, the last working presentation stays available.
revealkt run Talk.reveal.kts --host 127.0.0.1
03 · HTML
Share a link
Publish the entire out directory to a static host, including its JavaScript, CSS, and assets.
revealkt bundle Talk.reveal.kts --output-dir out
04 · PDF
Take it with you
Install Chromium first. A separate port lets you keep the preview server running.
revealkt chrome install
revealkt pdf Talk.reveal.kts --port 8081 -o Talk.pdf
04 / MAKE IT YOURS
Your slides. Your style.
Themes and slide numbers
Choose a built-in theme and numbering format. Combine all fragment steps on one slide page in PDF.
Set theme = RevealKt.Configuration.Theme.Custom("assets/theme.css") inside configuration. A custom theme replaces the built-in theme; style .reveal-viewport, .reveal, and headings. URLs inside CSS resolve relative to the CSS file. Start with a complete template: revealkt init ThemeStudio --example custom-theme.
How do incremental list items work?
unorderedListOf and orderedListOf reveal subsequent items as fragments by default. The first item is visible immediately. Pass fragmented = false for a static list. Set pdfSeparateFragments = false to avoid extra PDF pages for fragment steps.
05 / WHEN SOMETHING GOES WRONG
A few quick answers
My edit produced an error. What happens now?
Fix the script and save again. Successful compilation updates the slides and removes the error panel. Until then, you can navigate the last working presentation. An error on the initial launch exits the command; fix the script and start it again.
PDF export fails or Chromium will not start
Run revealkt chrome install, then revealkt doctor Talk.reveal.kts. On Ubuntu, you may need system libraries: revealkt chrome install --with-deps. If the port is busy, stop the preview or use --port 8081. Create the PDF output's parent directory beforehand.
Why is my image missing?
Check that assets/ is beside your script. For assets/images/chart.png, use img(src = "images/chart.png"). Paths are case-sensitive. CSS theme URLs need the full assets/ prefix.
Do exported slides work offline?
Built-in JavaScript and CSS ship with the CLI. External images, fonts, and MathJax may still need a network connection, so offline export is not guaranteed. HTML export is a directory, not one file. Repeating bundle does not remove old assets; use a fresh output directory for a clean export.
Can I run someone else's presentation?
A .reveal.kts file is executable Kotlin with your user's permissions, including file and network access. Review scripts before running them. Preview has no authentication and listens only on localhost unless you pass --host 0.0.0.0. Use bundle for publishing.