Live demos are like Global Thermonuclear War: the only way to win is to not do a live demo in front of hundreds of strangers in the first place.
Say you want to show off a new software library that you wrote, or a neat feature of a language you just discovered. Live demos — where someone flips away from their prepared deck to show how to use something — are notoriously failure-prone. As an audience member, you brace yourself as you go from a prepared haven to the wild west of demoing software.
They can be done, and they can be done well, but it’s likely that you will not do it well.
Fortunately, there are a number of ways to fake a live demo. One is to take a screencast of yourself performing all of the commands and then you play back that video in front of your audience. This has the benefit of being able to embed the video directly into your presentation deck, so you don’t have to flip between apps and display mirroring (which is always going to be a pain in the butt to watch).
I find this approach pretty great, as you don’t have to stress about what you’re typing and can focus entirely on providing the commentary. You can also pre-record the commentary too, if that makes you more comfortable, although be sure not to overdo it since before long you’re basically just playing a movie for people and that’s no fun for anyone.
You can also do a live demo, but with a “script” — in other words, literally have a text document that you copy and paste commands from, if you’re demonstrating a CLI. While watching a demo, I don’t particularly care about whether someone is typing something in real-time, and copying from a script ensures you won’t make any typos.