ASCIInema is a screen capturing tool for your terminal. The resulting records are viewable online as "video" but the viewer can stop the playback and just copy any part of visible text. The latter feature makes asciinema an ideal tool for the tutorials and demos for your CLI-related projects.
Any asciinema's record is a JSON-file named "asciicast" (here is a spec). You can upload it to the cloud or convert it to an animated GIF using asciicast2gif.
Asciinema and asciicast2gif are written in [/Clojure] :)