Skip to content

nodef/extra-asciinema

Repository files navigation

asciinema is a terminal screen recorder.
📦 Node.js, 🌐 Web, 📜 Files, 📰 Docs. 📘 Wiki.

With this package you can auto-generate terminal recordings for Node.js examples through asciinema programmatically. But you need to install asciinema first!

This package is available in Node.js and Web formats (for retimeData()). The web format is exposed as extra_asciinema standalone variable and can be loaded from jsDelivr CDN.

Stability: Experimental.


const asciinema = require('extra-asciinema');
// import * as asciinema from 'extra-asciinema';

asciinema.recSync('saved.cast', {input: 'example.js'});
// runs example.js interactively in node.js, saves 'saved.cast'

asciinema.retimeSync('saved.cast', {inputDelay: 2});
// 'saved.cast' is updated

asciinema.uploadSync('saved.cast');
// asciicast URL


Index

Property Description
rec Record terminal session.
recSync Record terminal session.
cat Print full output of recorded asciicast to a terminal.
catSync Print full output of recorded asciicast to a terminal.
retime Update time in asciicast file.
retimeData Update time in asciicast data.
retimeSync Update time in asciicast file.
upload Upload recorded asciicast to asciinema.org site.
uploadSync Upload recorded asciicast to asciinema.org site.


References




ORG