Share your terminal like never before

Daniel Trugman
D-Bits
Published in
2 min readAug 29, 2022

Hacking the Pentagon? Magically solving production issues? Inventing the craziest customer demos? If you did that via CLI and never had the time to write that Wiki document, this is for you.

Everywhere you go, everyone uses CLI tools to boost up productivity. After all, it is way quicker to write a small script to run an automated process, whether it’s setting up a new company laptop, fetching some data from a DB or generating a report. Those CLI based standard operating procedures are very useful, and are definitely here to stay.

Let’s take a real life example. An engineering team has an integration tests with a glitch. In some scenarios, a duplicate DB record is created and that prevents the test from passing. One of the team members would log into the database and run an SQL DELETE statement. But, since that wouldn’t happen very often, some members have never done that or don’t even know how to connect to the DB.

One way would be to write a Wiki page, that will work. But the inherent overhead of writing a guide is not insignificant. Another is to write a script, which is by far the best option, but then again, writing a robust, high-quality script is not a 5-min task.

Luckily for us, there is another way, one where you can just run through the steps once and share it with the next person. It’s called asciinema. It allows you to record and share your terminal sessions, the simple way.

Consider for example the following scenario. A user created a ticket for an open source project and decides to share the steps with the maintainers. He records himself following the steps and uploads that to the comment. Easy, right? But that’s not even the best part. These videos are special. Why? Because you can actually copy text from the video and paste it into your terminal! Mind-blowing.

Installing on a Mac is as easy as running a homebrew or pip command (there are many options available on their official installation page).

Recording is even easier, just run asciinema rec <filename> . To finish, hit Ctrl-D or type exit . You can then play the recordings on your laptop or upload them to their website. Find all the usage details on this page.

Great seeing you again! Hope you had fun.

--

--

Daniel Trugman
D-Bits
Editor for

A software specialist passionate about elegant and efficient technology. I Love learning and sharing my knowledge.