CLEO(1p)
β¨ cleo β NAME π
okay so bestie, welcome to cleo(1p), from the User Contributed Perl Documentation crew, and it is literally the tool for playing back shell commands during a live demo. like, you pre-write your commands, and cleo types them out for you like the main character you are. π
π¦ SYNOPSIS
cleo COMMAND_FILE
πΈ DESCRIPTION
cleo is a lil utility for playing back pre-recorded shell commands in a live demonstration. cleo displays the commands as if you had actually typed them, and then it executes them interactively. it's giving effortless. π
ngl there's probably an easy way to do this with expect or a similar tool. but I couldn't figure it out, so I built this. your mileage may vary. π
π PLAYBACK
cleo always pauses and waits for a keypress before displaying a command and before executing it. pressing any key besides the ones listed below just advances the playback:
sβ skip the current commandrβ redo the current commandpβ redo the previous commandqβ quit playback
so iconic. those four keys are the whole vibe check. β¨
π COMMANDS
cleo reads commands from a file. each line is treated as one command. blank lines and lines starting with # get ignored, no cap. the commands themselves can be anything you'd type into an interactive shell. plus you can sprinkle in a few special tokens that cleo recognizes:
!!!β commands starting with!!!(three exclamation points) are not displayed and will be executed immediately. this is useful for running setup commands at the beginning of your demonstration. lowkey the best part. π₯%%%β within a command,%%%(three percent signs) will causecleoto pause and wait for a keypress before displaying the rest of the command. this is useful if you want to stop in the middle of a command to give some explanation. perfect for the dramatic pause. π
otherwise, cleo displays and executes the commands verbatim. note that some interactive commands like vim are picky about STDOUT and STDIN. to make them work properly with cleo, you may need to force them to attach to the terminal like this:
(exec < /dev/tty vim)
fr fr, if your fancy interactive program is acting brand new, that (exec < /dev/tty ...) trick is the fix. π«Ά
π EXAMPLE
I use this for giving demonstrations of pinto, such as the one seen at <https://www.youtube.com/watch?v=H-JkFXm8Xgk> (the live demonstration part starts around 10:47).
the command file that I use for that presentation is included inside this distribution at examples/pinto.demo. this file is for illustration only, so don't expect it to actually work for you. π
π LIMITATIONS
cleo only works on Unix-like platforms. it may work on Windows if you use Cygwin. personally, I have only used cleo on Mac OS X.
β TODO
- Jump to arbitrary command number
- Support backspacing in recorded command
- Support multi-line recorded commands
- Write unit tests
(the to-do list is to-doing, bestie. it'll get there. π§)
π AUTHOR
Jeffrey Ryan Thalhammer <thaljef@cpan.org>
π COPYRIGHT
Copyright (c) 2014, Imaginative Software Systems
and that's the whole page, bestie β written by perl v5.40.1, dated 2025-12-10, filed under CLEO(1p). slay, go give the demo of your dreams. πβ¨πΈ
π¦ where this page comes from
- ubuntu resolute: cleo 0.004-4build1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: cleo 0.004-4build1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms