Have you just written a new ✨fancy CLI✨ and want to demo it in your Github Readme? Recording your terminal output is a nice way to demonstrate the experience.

Here’s an example of what we’re going to make:

Steps

Install Dependencies

  1. asciinema: brew install asciinema
  2. svg-term-cli: npm install -g svg-term-cli

Setup your terminal

Some tips:

  1. Font/screen size matters. The asciinema output will look just as it does in your terminal. You’ll probably want to bump up the font-size and shrink down the terminal so that the text is legible in your README.
  2. Choose a nice, generic terminal theme. If using ohmyzsh, I recommend the arrow theme.

Lights, camera, action 🎬

The asciinema rec command will start a process to capture the stdout of your terminal session. When you’re done, pressing ctrl+d will end recording. You can then opt to save it to the asciinema server or locally. For our needs, we’ll save locally.

Post Production ✂️🎞

asciinema will place the file in a temporary directory. The output “cast” is a simple newline-delimeted JSON file, which a savvy user could edit by hand to scrub out any mistakes or personal information.

example asciinema cast
  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
{"version": 2, "width": 82, "height": 20, "timestamp": 1632512435, "env": {"SHELL": "/bin/zsh", "TERM": "xterm-256color"}}
[0.3937, "o", "\u001b[1m\u001b[7m%\u001b[27m\u001b[1m\u001b[0m                                                                                 \r \r\u001b]2;alukach@ds:~\u0007\u001b]1;~\u0007"]
[0.401958, "o", "\r\u001b[0m\u001b[27m\u001b[24m\u001b[J\u001b[33m~ ➤ \u001b[00m\u001b[K\u001b[76C\u001b[33m \u001b[00m\u001b[77D"]
[0.402028, "o", "\u001b[?1h\u001b=\u001b[?2004h"]
[1.397944, "o", "asciinema rec"]
[2.038988, "o", "\u001b[?1l\u001b>"]
[2.039271, "o", "\u001b[?2004l\r\r\n"]
[2.040939, "o", "\u001b]2;asciinema rec\u0007\u001b]1;asciinema\u0007"]
[2.12754, "o", "\u001b[0;32masciinema: recording asciicast to /var/folders/3n/3dct2kb54xn1882dpbw0vbdh0000gn/T/tmp0m0d4ri1-ascii.cast\u001b[0m\r\n\u001b[0;32masciinema: press <ctrl-d> or type \"exit\" when you're done\u001b[0m\r\n"]
[2.531341, "o", "\u001b[1m\u001b[7m%\u001b[27m\u001b[1m\u001b[0m                                                                                 \r \r\u001b]2;alukach@ds:~\u0007\u001b]1;~\u0007"]
[2.539224, "o", "\r\u001b[0m\u001b[27m\u001b[24m\u001b[J\u001b[33m~ ➤ \u001b[00m\u001b[K\u001b[76C\u001b[33m \u001b[00m\u001b[77D"]
[2.539294, "o", "\u001b[?1h\u001b=\u001b[?2004h"]
[3.437282, "o", "p"]
[3.573817, "o", "\bpy"]
[3.751574, "o", "t"]
[3.813398, "o", "h"]
[3.893245, "o", "o"]
[3.993249, "o", "n"]
[4.091641, "o", "3"]
[4.227577, "o", " "]
[4.631549, "o", "/"]
[4.759173, "o", "t"]
[4.858853, "o", "m"]
[4.992652, "o", "\u001b[31m…\u001b[39m"]
[5.028749, "o", "\r\r\u001b[0m\u001b[27m\u001b[24m\u001b[J\u001b[33m~ ➤ \u001b[00mpython3 /tmp\u001b[1m/\u001b[0m\u001b[K\u001b[63C\u001b[33m \u001b[00m\u001b[64D"]
[5.257958, "o", "\b\u001b[0m/e"]
[5.436696, "o", "x"]
[5.7675, "o", "\u001b[31m…\u001b[39m"]
[5.776614, "o", "\r\r\u001b[0m\u001b[27m\u001b[24m\u001b[J\u001b[33m~ ➤ \u001b[00mpython3 /tmp/example.py\u001b[1m \u001b[0m\u001b[K\u001b[52C\u001b[33m \u001b[00m\u001b[53D"]
[6.590538, "o", "\b\u001b[0m \b"]
[6.590824, "o", "\u001b[?1l\u001b>\u001b[?2004l"]
[6.590975, "o", "\r\r\n"]
[6.592687, "o", "\u001b]2;python3 /tmp/example.py\u0007\u001b]1;python3\u0007"]
[6.656795, "o", "\r#2, est. 1.20s:   0%|                                    | 0/5000 [00:00<?, ?it/s]"]
[6.656895, "o", "\r\n"]
[6.656981, "o", "\r#6, est. 0.62s:   0%|                                    | 0/5000 [00:00<?, ?it/s]\u001b[A"]
[6.65715, "o", "\r\n\r\n"]
[6.657262, "o", "\r#1, est. 1.70s:   0%|                                    | 0/5000 [00:00<?, ?it/s]\u001b[A\u001b[A"]
[6.657347, "o", "\r\n\r\n\r\n"]
[6.657453, "o", "\r#0, est. 2.50s:   0%|                                    | 0/5000 [00:00<?, ?it/s]\u001b[A\u001b[A\u001b[A"]
[6.657583, "o", "\r\n\r\n\r\n\r\n\r#4, est. 0.83s:   0%|                                    | 0/5000 [00:00<?, ?it/s]\u001b[A\u001b[A\u001b[A\u001b[A"]
[6.657683, "o", "\r\n\r\n\r\n\r\n\r\n"]
[6.657779, "o", "\r#5, est. 0.71s:   0%|                                    | 0/5000 [00:00<?, ?it/s]"]
[6.657931, "o", "\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A"]
[6.658118, "o", "\r\n\r\n\r\n\r\n\r\n\r\n"]
[6.658213, "o", "\r#3, est. 1.00s:   0%|                                    | 0/5000 [00:00<?, ?it/s]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A"]
[6.658368, "o", "\r\n\r\n\r\n\r\n\r\n\r\n\r\n"]
[6.658434, "o", "\r#7, est. 0.56s:   0%|                                    | 0/5000 [00:00<?, ?it/s]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A"]
[6.658526, "o", "\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n"]
[6.658623, "o", "\r#8, est. 0.50s:   0%|                                    | 0/5000 [00:00<?, ?it/s]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A"]
[6.757006, "o", "\r\n"]
[6.757143, "o", "\r#6, est. 0.62s:  13%|███                     | 647/5000 [00:00<00:00, 6468.12it/s]\u001b[A"]
[6.757228, "o", "\r#2, est. 1.20s:   7%|█▌                      | 334/5000 [00:00<00:01, 3327.45it/s]"]
[6.757531, "o", "\r\n\r\n"]
[6.757582, "o", "\r#1, est. 1.70s:   5%|█▏                      | 254/5000 [00:00<00:01, 2533.69it/s]\u001b[A\u001b[A"]
[6.757652, "o", "\r\n\r\n\r\n\r\n"]
[6.757714, "o", "\r#4, est. 0.83s:  10%|██▎                     | 492/5000 [00:00<00:00, 4915.24it/s]\u001b[A\u001b[A\u001b[A\u001b[A"]
[6.75778, "o", "\r\n\r\n\r\n"]
[6.75784, "o", "\r#0, est. 2.50s:   3%|▊                       | 169/5000 [00:00<00:02, 1683.67it/s]"]
[6.757884, "o", "\u001b[A\u001b[A\u001b[A"]
[6.758049, "o", "\r\n\r\n\r\n\r\n\r\n"]
[6.758097, "o", "\r#5, est. 0.71s:  11%|██▋                     | 567/5000 [00:00<00:00, 5665.80it/s]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A"]
[6.758387, "o", "\r\n\r\n\r\n\r\n\r\n\r\n"]
[6.758455, "o", "\r#3, est. 1.00s:   8%|█▉                      | 409/5000 [00:00<00:01, 4082.16it/s]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A"]
[6.758509, "o", "\r\n\r\n\r\n\r\n\r\n\r\n\r\n"]
[6.758555, "o", "\r#7, est. 0.56s:  14%|███▍                    | 716/5000 [00:00<00:00, 7159.09it/s]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A"]
[6.758726, "o", "\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n"]
[6.758759, "o", "\r#8, est. 0.50s:  16%|███▊                    | 790/5000 [00:00<00:00, 7890.77it/s]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A"]
[6.857141, "o", "\r\n"]
[6.85724, "o", "\r#6, est. 0.62s:  26%|█████▉                 | 1302/5000 [00:00<00:00, 6511.76it/s]\u001b[A"]
[6.857278, "o", "\r#2, est. 1.20s:  13%|███▏                    | 674/5000 [00:00<00:01, 3368.38it/s]"]
[6.85771, "o", "\r\n\r\n\r\n\r\n"]
[6.857762, "o", "\r#4, est. 0.83s:  20%|████▋                   | 986/5000 [00:00<00:00, 4928.32it/s]\u001b[A\u001b[A\u001b[A\u001b[A"]
[6.858337, "o", "\r\n\r\n\r\n\r\n\r\n"]
[6.858396, "o", "\r#5, est. 0.71s:  23%|█████▏                 | 1134/5000 [00:00<00:00, 5658.36it/s]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A"]
[6.858422, "o", "\r\n\r\n\r\n\r\n\r\n\r\n\r\n"]
[6.858496, "o", "\r#7, est. 0.56s:  29%|██████▌                | 1434/5000 [00:00<00:00, 7170.93it/s]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A"]
[6.858554, "o", "\r\n\r\n\r\n\r\n\r\n\r\n"]
[6.858584, "o", "\r#3, est. 1.00s:  16%|███▉                    | 819/5000 [00:00<00:01, 4089.50it/s]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A"]
[6.858642, "o", "\r\n\r\n\r\n"]
[6.858674, "o", "\r#0, est. 2.50s:   7%|█▌                      | 338/5000 [00:00<00:02, 1679.15it/s]\u001b[A\u001b[A\u001b[A"]
[6.858728, "o", "\r\n\r\n"]
[6.858775, "o", "\r#1, est. 1.70s:  10%|██▍                     | 508/5000 [00:00<00:01, 2519.60it/s]\u001b[A\u001b[A"]
[6.858828, "o", "\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n"]
[6.85887, "o", "\r#8, est. 0.50s:  32%|███████▎               | 1585/5000 [00:00<00:00, 7921.04it/s]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A"]
[6.957251, "o", "\r\n"]
[6.957276, "o", "\r#6, est. 0.62s:  39%|████████▉              | 1954/5000 [00:00<00:00, 6513.12it/s]\u001b[A"]
[6.957367, "o", "\r#2, est. 1.20s:  20%|████▋                  | 1012/5000 [00:00<00:01, 3372.64it/s]"]
[6.958144, "o", "\r\n\r\n\r\n\r\n"]
[6.958194, "o", "\r#4, est. 0.83s:  30%|██████▊                | 1479/5000 [00:00<00:00, 4919.50it/s]\u001b[A\u001b[A\u001b[A\u001b[A"]
[6.958383, "o", "\r\n\r\n\r\n\r\n\r\n"]
[6.958432, "o", "\r#5, est. 0.71s:  34%|███████▊               | 1703/5000 [00:00<00:00, 5671.37it/s]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A"]
[6.958528, "o", "\r\n\r\n\r\n\r\n\r\n\r\n\r\n"]
[6.958576, "o", "\r#7, est. 0.56s:  43%|█████████▉             | 2161/5000 [00:00<00:00, 7212.74it/s]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A"]
[6.958631, "o", "\r\n\r\n\r\n\r\n\r\n\r\n"]
[6.95866, "o", "\r#3, est. 1.00s:  25%|█████▋                 | 1233/5000 [00:00<00:00, 4110.89it/s]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A"]
[6.958857, "o", "\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n"]
[6.958912, "o", "\r#8, est. 0.50s:  48%|██████████▉            | 2384/5000 [00:00<00:00, 7950.66it/s]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A"]
[6.959242, "o", "\r\n\r\n\r\n"]
[6.959296, "o", "\r#0, est. 2.50s:  10%|██▍                     | 506/5000 [00:00<00:02, 1674.81it/s]\u001b[A\u001b[A\u001b[A"]
[6.959352, "o", "\r\n\r\n"]
[6.959393, "o", "\r#1, est. 1.70s:  15%|███▋                    | 760/5000 [00:00<00:01, 2512.95it/s]\u001b[A\u001b[A"]
[7.057416, "o", "\r\n"]
[7.057472, "o", "\r#6, est. 0.62s:  52%|███████████▉           | 2608/5000 [00:00<00:00, 6519.76it/s]\u001b[A"]
[7.057578, "o", "\r#2, est. 1.20s:  27%|██████▏                | 1351/5000 [00:00<00:01, 3376.65it/s]"]
[7.058204, "o", "\r\n\r\n\r\n\r\n"]
[7.058246, "o", "\r#4, est. 0.83s:  39%|█████████              | 1974/5000 [00:00<00:00, 4930.20it/s]\u001b[A\u001b[A\u001b[A\u001b[A"]
[7.058631, "o", "\r\n\r\n\r\n\r\n\r\n\r\n\r\n"]
[7.058679, "o", "\r#7, est. 0.56s:  58%|█████████████▎         | 2890/5000 [00:00<00:00, 7240.83it/s]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A"]
[7.058766, "o", "\r\n\r\n\r\n\r\n\r\n"]
[7.058825, "o", "\r#5, est. 0.71s:  45%|██████████▍            | 2271/5000 [00:00<00:00, 5666.41it/s]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\r\n\r\n\r\n\r\n\r\n\r\n"]
[7.058875, "o", "\r#3, est. 1.00s:  33%|███████▌               | 1647/5000 [00:00<00:00, 4118.91it/s]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A"]
[7.058936, "o", "\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n"]
[7.058983, "o", "\r#8, est. 0.50s:  64%|██████████████▋        | 3182/5000 [00:00<00:00, 7961.79it/s]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A"]
[7.059486, "o", "\r\n\r\n"]
[7.059523, "o", "\r#1, est. 1.70s:  20%|████▋                  | 1012/5000 [00:00<00:01, 2514.31it/s]\u001b[A\u001b[A"]
[7.059677, "o", "\r\n\r\n\r\n"]
[7.059715, "o", "\r#0, est. 2.50s:  14%|███▏                    | 676/5000 [00:00<00:02, 1681.78it/s]\u001b[A\u001b[A\u001b[A"]
[7.157472, "o", "\r\n"]
[7.157542, "o", "\r#6, est. 0.62s:  65%|███████████████        | 3266/5000 [00:00<00:00, 6538.76it/s]\u001b[A"]
[7.157691, "o", "\r#2, est. 1.20s:  34%|███████▊               | 1689/5000 [00:00<00:00, 3376.30it/s]"]
[7.158976, "o", "\r\n\r\n\r\n\r\n"]
[7.159029, "o", "\r#4, est. 0.83s:  49%|███████████▎           | 2468/5000 [00:00<00:00, 4919.98it/s]\u001b[A\u001b[A\u001b[A\u001b[A"]
[7.159074, "o", "\r\n\r\n\r\n\r\n\r\n\r\n"]
[7.159127, "o", "\r#3, est. 1.00s:  41%|█████████▍             | 2061/5000 [00:00<00:00, 4123.10it/s]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A"]
[7.159181, "o", "\r\n\r\n\r\n\r\n\r\n"]
[7.159211, "o", "\r#5, est. 0.71s:  57%|█████████████          | 2838/5000 [00:00<00:00, 5659.82it/s]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A"]
[7.159252, "o", "\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n"]
[7.159291, "o", "\r#8, est. 0.50s:  80%|██████████████████▎    | 3979/5000 [00:00<00:00, 7954.54it/s]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A"]
[7.159639, "o", "\r\n\r\n\r\n\r\n\r\n\r\n\r\n"]
[7.159686, "o", "\r#7, est. 0.56s:  72%|████████████████▋      | 3615/5000 [00:00<00:00, 7217.32it/s]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A"]
[7.159745, "o", "\r\n\r\n"]
[7.159798, "o", "\r#1, est. 1.70s:  25%|█████▊                 | 1264/5000 [00:00<00:01, 2513.88it/s]\u001b[A\u001b[A"]
[7.159854, "o", "\r\n\r\n\r\n"]
[7.159911, "o", "\r#0, est. 2.50s:  17%|████                    | 845/5000 [00:00<00:02, 1683.62it/s]\u001b[A\u001b[A\u001b[A"]
[7.25807, "o", "\r\n"]
[7.258125, "o", "\r#6, est. 0.62s:  78%|██████████████████     | 3920/5000 [00:00<00:00, 6526.80it/s]\u001b[A"]
[7.25849, "o", "\r#2, est. 1.20s:  41%|█████████▎             | 2027/5000 [00:00<00:00, 3368.46it/s]"]
[7.259193, "o", "\r\n\r\n\r\n\r\n"]
[7.259222, "o", "\r#4, est. 0.83s:  59%|█████████████▋         | 2962/5000 [00:00<00:00, 4923.60it/s]\u001b[A\u001b[A\u001b[A\u001b[A"]
[7.259282, "o", "\r\n\r\n\r\n\r\n\r\n"]
[7.259315, "o", "\r#5, est. 0.71s:  68%|███████████████▋       | 3404/5000 [00:00<00:00, 5657.50it/s]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A"]
[7.259372, "o", "\r\n\r\n\r\n\r\n\r\n\r\n\r\n\r\n"]
[7.259421, "o", "\r#8, est. 0.50s:  96%|█████████████████████▉ | 4775/5000 [00:00<00:00, 7952.80it/s]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A"]
[7.259472, "o", "\r\n\r\n\r\n\r\n\r\n\r\n"]
[7.259508, "o", "\r#3, est. 1.00s:  49%|███████████▍           | 2474/5000 [00:00<00:00, 4120.16it/s]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A"]
[7.259866, "o", "\r\n\r\n"]
[7.259917, "o", "\r#1, est. 1.70s:  30%|██████▉                | 1516/5000 [00:00<00:01, 2514.82it/s]\u001b[A\u001b[A"]
[7.259962, "o", "\r\n\r\n\r\n\r\n\r\n\r\n\r\n"]
[7.260017, "o", "\r#7, est. 0.56s:  87%|███████████████████▉   | 4337/5000 [00:00<00:00, 7210.60it/s]"]
[7.26007, "o", "\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A"]
[7.260299, "o", "\r\n\r\n\r\n"]
[7.260351, "o", "\r#0, est. 2.50s:  20%|████▋                  | 1014/5000 [00:00<00:02, 1683.28it/s]"]
[7.260394, "o", "\u001b[A\u001b[A\u001b[A"]
[7.288047, "o", "\r#8, est. 0.50s: 100%|███████████████████████| 5000/5000 [00:00<00:00, 7944.93it/s]\r\n"]
[7.353676, "o", "\r#7, est. 0.56s: 100%|███████████████████████| 5000/5000 [00:00<00:00, 7192.40it/s]\r\n"]
[7.359093, "o", "\r#2, est. 1.20s:  47%|██████████▊            | 2364/5000 [00:00<00:00, 3363.69it/s]"]
[7.359563, "o", "\r\n"]
[7.359669, "o", "\r#6, est. 0.62s:  91%|█████████████████████  | 4573/5000 [00:00<00:00, 6494.58it/s]\u001b[A"]
[7.359716, "o", "\r\n\r\n\r\n\r\n\r\n\r\n"]
[7.359768, "o", "\r#3, est. 1.00s:  58%|█████████████▎         | 2887/5000 [00:00<00:00, 4120.15it/s]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A"]
[7.359776, "o", "\r\n\r\n\r\n\r\n\r\n"]
[7.359835, "o", "\r#5, est. 0.71s:  79%|██████████████████▎    | 3970/5000 [00:00<00:00, 5648.96it/s]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A"]
[7.360318, "o", "\r\n\r\n"]
[7.360379, "o", "\r#1, est. 1.70s:  35%|████████▏              | 1768/5000 [00:00<00:01, 2512.84it/s]\u001b[A\u001b[A"]
[7.360572, "o", "\r\n\r\n\r\n"]
[7.360613, "o", "\r#0, est. 2.50s:  24%|█████▍                 | 1183/5000 [00:00<00:02, 1683.97it/s]\u001b[A\u001b[A\u001b[A"]
[7.361952, "o", "\r\n\r\n\r\n\r\n"]
[7.362002, "o", "\r#4, est. 0.83s:  69%|███████████████▉       | 3455/5000 [00:00<00:00, 4881.44it/s]\u001b[A\u001b[A\u001b[A\u001b[A"]
[7.427585, "o", "\r#6, est. 0.62s: 100%|███████████████████████| 5000/5000 [00:00<00:00, 6488.86it/s]\r\n"]
[7.459805, "o", "\r\n\r\n\r\n\r\n\r\n\r\n"]
[7.459951, "o", "\r#3, est. 1.00s:  66%|███████████████▎       | 3322/5000 [00:00<00:00, 4192.55it/s]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\r\n\r\n\r\n\r\n\r\n\r#5, est. 0.71s:  91%|████████████████████▉  | 4557/5000 [00:00<00:00, 5717.60it/s]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A"]
[7.460767, "o", "\r\n\r\n\r#1, est. 1.70s:  40%|█████████▎             | 2021/5000 [00:00<00:01, 2515.40it/s]\u001b[A\u001b[A"]
[7.462941, "o", "\r\n\r\n\r\n"]
[7.463183, "o", "\r#0, est. 2.50s:  27%|██████▏                | 1352/5000 [00:00<00:02, 1674.75it/s]\u001b[A\u001b[A\u001b[A"]
[7.464172, "o", "\r\n\r\n\r\n\r\n\r#4, est. 0.83s:  79%|██████████████████▏    | 3944/5000 [00:00<00:00, 4851.69it/s]\u001b[A\u001b[A\u001b[A\u001b[A"]
[7.464692, "o", "\r#2, est. 1.20s:  54%|████████████▍          | 2701/5000 [00:00<00:00, 3306.24it/s]"]
[7.547702, "o", "\r#5, est. 0.71s: 100%|███████████████████████| 5000/5000 [00:00<00:00, 5620.61it/s]\r\n"]
[7.566987, "o", "\r\n\r\n"]
[7.567052, "o", "\r#1, est. 1.70s:  45%|██████████▍            | 2273/5000 [00:00<00:01, 2468.99it/s]\u001b[A\u001b[A"]
[7.567509, "o", "\r\n\r\n\r\n"]
[7.567547, "o", "\r#0, est. 2.50s:  30%|██████▉                | 1520/5000 [00:00<00:02, 1651.79it/s]\u001b[A\u001b[A\u001b[A"]
[7.568657, "o", "\r\n\r\n\r\n\r\n\r\n\r\n"]
[7.568709, "o", "\r#3, est. 1.00s:  75%|█████████████████▏     | 3742/5000 [00:00<00:00, 4081.31it/s]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A"]
[7.570132, "o", "\r\n\r\n\r\n\r\n"]
[7.570181, "o", "\r#4, est. 0.83s:  89%|████████████████████▍  | 4430/5000 [00:00<00:00, 4765.18it/s]\u001b[A\u001b[A\u001b[A\u001b[A"]
[7.570768, "o", "\r#2, est. 1.20s:  61%|█████████████▉         | 3032/5000 [00:00<00:00, 3245.98it/s]"]
[7.668, "o", "\r\n\r\n\r\n"]
[7.668081, "o", "\r#0, est. 2.50s:  34%|███████▊               | 1689/5000 [00:01<00:01, 1661.05it/s]\u001b[A\u001b[A\u001b[A"]
[7.668858, "o", "\r\n\r\n\r\n\r\n\r\n\r\n"]
[7.668916, "o", "\r#3, est. 1.00s:  83%|███████████████████▏   | 4170/5000 [00:01<00:00, 4138.65it/s]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A"]
[7.669846, "o", "\r\n\r\n"]
[7.669918, "o", "\r#1, est. 1.70s:  50%|███████████▌           | 2521/5000 [00:01<00:01, 2450.60it/s]\u001b[A\u001b[A"]
[7.670477, "o", "\r\n\r\n\r\n\r\n"]
[7.670541, "o", "\r#4, est. 0.83s:  98%|██████████████████████▌| 4907/5000 [00:01<00:00, 4761.68it/s]\u001b[A\u001b[A\u001b[A\u001b[A"]
[7.671051, "o", "\r#2, est. 1.20s:  67%|███████████████▍       | 3358/5000 [00:01<00:00, 3247.82it/s]"]
[7.690332, "o", "\r#4, est. 0.83s: 100%|███████████████████████| 5000/5000 [00:01<00:00, 4841.91it/s]\r\n"]
[7.768065, "o", "\r\n\r\n\r\n"]
[7.76816, "o", "\r#0, est. 2.50s:  37%|████████▌              | 1860/5000 [00:01<00:01, 1675.78it/s]\u001b[A\u001b[A\u001b[A"]
[7.76985, "o", "\r\n\r\n"]
[7.769912, "o", "\r#1, est. 1.70s:  55%|████████████▋          | 2767/5000 [00:01<00:00, 2453.22it/s]"]
[7.769943, "o", "\u001b[A\u001b[A"]
[7.771104, "o", "\r#2, est. 1.20s:  74%|████████████████▉      | 3684/5000 [00:01<00:00, 3250.68it/s]"]
[7.773417, "o", "\r\n\r\n\r\n\r\n\r\n\r\n"]
[7.77352, "o", "\r#3, est. 1.00s:  92%|█████████████████████  | 4585/5000 [00:01<00:00, 4085.90it/s]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A"]
[7.868367, "o", "\r\n\r\n\r\n"]
[7.868446, "o", "\r#0, est. 2.50s:  41%|█████████▎             | 2031/5000 [00:01<00:01, 1684.31it/s]\u001b[A\u001b[A\u001b[A"]
[7.871357, "o", "\r#2, est. 1.20s:  80%|██████████████████▍    | 4012/5000 [00:01<00:00, 3257.22it/s]"]
[7.871835, "o", "\r\n\r\n"]
[7.871897, "o", "\r#1, est. 1.70s:  60%|█████████████▊         | 3013/5000 [00:01<00:00, 2440.74it/s]\u001b[A\u001b[A"]
[7.8774, "o", "\r\n\r\n\r\n\r\n\r\n\r\n"]
[7.877474, "o", "\r#3, est. 1.00s: 100%|██████████████████████▉| 4995/5000 [00:01<00:00, 4042.20it/s]\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A\u001b[A"]
[7.878852, "o", "\r#3, est. 1.00s: 100%|███████████████████████| 5000/5000 [00:01<00:00, 4096.34it/s]\r\n"]
[7.973438, "o", "\r#2, est. 1.20s:  87%|███████████████████▉   | 4338/5000 [00:01<00:00, 3239.50it/s]"]
[7.974947, "o", "\r\n\r\n\r\n"]
[7.975032, "o", "\r#0, est. 2.50s:  44%|██████████             | 2200/5000 [00:01<00:01, 1653.04it/s]\u001b[A\u001b[A\u001b[A"]
[7.975125, "o", "\r\n\r\n"]
[7.975179, "o", "\r#1, est. 1.70s:  65%|██████████████▉        | 3258/5000 [00:01<00:00, 2419.88it/s]\u001b[A\u001b[A"]
[8.076423, "o", "\r#2, est. 1.20s:  93%|█████████████████████▍ | 4663/5000 [00:01<00:00, 3213.92it/s]"]
[8.077467, "o", "\r\n\r\n"]
[8.077557, "o", "\r#1, est. 1.70s:  70%|████████████████       | 3501/5000 [00:01<00:00, 2406.05it/s]\u001b[A\u001b[A"]
[8.079458, "o", "\r\n\r\n\r\n"]
[8.079529, "o", "\r#0, est. 2.50s:  47%|██████████▉            | 2366/5000 [00:01<00:01, 1633.21it/s]\u001b[A\u001b[A\u001b[A"]
[8.178546, "o", "\r#2, est. 1.20s: 100%|██████████████████████▉| 4985/5000 [00:01<00:00, 3195.52it/s]"]
[8.179391, "o", "\r\n\r\n"]
[8.179504, "o", "\r#1, est. 1.70s:  75%|█████████████████▏     | 3742/5000 [00:01<00:00, 2393.54it/s]\u001b[A\u001b[A"]
[8.182663, "o", "\r\n\r\n\r\n"]
[8.182739, "o", "\r#0, est. 2.50s:  51%|███████████▋           | 2530/5000 [00:01<00:01, 1619.95it/s]\u001b[A\u001b[A\u001b[A"]
[8.183485, "o", "\r#2, est. 1.20s: 100%|███████████████████████| 5000/5000 [00:01<00:00, 3275.13it/s]\r\n"]
[8.281006, "o", "\r\n\r\n"]
[8.281153, "o", "\r#1, est. 1.70s:  80%|██████████████████▎    | 3982/5000 [00:01<00:00, 2384.53it/s]\u001b[A\u001b[A"]
[8.285647, "o", "\r\n\r\n\r\n"]
[8.285786, "o", "\r#0, est. 2.50s:  54%|████████████▍          | 2693/5000 [00:01<00:01, 1608.86it/s]\u001b[A\u001b[A\u001b[A"]
[8.382223, "o", "\r\n\r\n"]
[8.382445, "o", "\r#1, est. 1.70s:  84%|███████████████████▍   | 4221/5000 [00:01<00:00, 2377.93it/s]\u001b[A\u001b[A"]
[8.387564, "o", "\r\n\r\n\r\n"]
[8.387724, "o", "\r#0, est. 2.50s:  57%|█████████████▏         | 2854/5000 [00:01<00:01, 1600.17it/s]\u001b[A\u001b[A\u001b[A"]
[8.483547, "o", "\r\n\r\n"]
[8.483742, "o", "\r#1, est. 1.70s:  89%|████████████████████▌  | 4459/5000 [00:01<00:00, 2369.39it/s]\u001b[A\u001b[A"]
[8.489688, "o", "\r\n\r\n\r\n"]
[8.489909, "o", "\r#0, est. 2.50s:  60%|█████████████▊         | 3015/5000 [00:01<00:01, 1593.19it/s]\u001b[A\u001b[A\u001b[A"]
[8.584999, "o", "\r\n\r\n"]
[8.585144, "o", "\r#1, est. 1.70s:  94%|█████████████████████▌ | 4696/5000 [00:01<00:00, 2359.34it/s]"]
[8.585323, "o", "\u001b[A\u001b[A"]
[8.59157, "o", "\r\n\r\n\r\n"]
[8.591749, "o", "\r#0, est. 2.50s:  64%|██████████████▌        | 3175/5000 [00:01<00:01, 1586.38it/s]\u001b[A\u001b[A\u001b[A"]
[8.685366, "o", "\r\n\r\n"]
[8.685433, "o", "\r#1, est. 1.70s:  99%|██████████████████████▋| 4932/5000 [00:02<00:00, 2356.50it/s]"]
[8.685557, "o", "\u001b[A\u001b[A"]
[8.692435, "o", "\r\n\r\n\r\n"]
[8.692538, "o", "\r#0, est. 2.50s:  67%|███████████████▎       | 3334/5000 [00:02<00:01, 1583.22it/s]\u001b[A\u001b[A\u001b[A"]
[8.714479, "o", "\r#1, est. 1.70s: 100%|███████████████████████| 5000/5000 [00:02<00:00, 2430.65it/s]\r\n"]
[8.792931, "o", "\r\n\r\n\r\n"]
[8.793065, "o", "\r#0, est. 2.50s:  70%|████████████████       | 3493/5000 [00:02<00:00, 1583.51it/s]\u001b[A\u001b[A\u001b[A"]
[8.893839, "o", "\r\n\r\n\r\n"]
[8.894077, "o", "\r#0, est. 2.50s:  73%|████████████████▊      | 3652/5000 [00:02<00:00, 1581.30it/s]\u001b[A\u001b[A\u001b[A"]
[8.995009, "o", "\r\n\r\n\r\n"]
[8.995199, "o", "\r#0, est. 2.50s:  76%|█████████████████▌     | 3811/5000 [00:02<00:00, 1578.37it/s]\u001b[A\u001b[A\u001b[A"]
[9.095512, "o", "\r\n\r\n\r\n"]
[9.095724, "o", "\r#0, est. 2.50s:  79%|██████████████████▎    | 3969/5000 [00:02<00:00, 1576.50it/s]\u001b[A\u001b[A\u001b[A"]
[9.196695, "o", "\r\n\r\n\r\n"]
[9.19733, "o", "\r#0, est. 2.50s:  83%|██████████████████▉    | 4127/5000 [00:02<00:00, 1573.48it/s]\u001b[A\u001b[A\u001b[A"]
[9.299529, "o", "\r\n\r\n\r\n"]
[9.300196, "o", "\r#0, est. 2.50s:  86%|███████████████████▋   | 4285/5000 [00:02<00:00, 1562.31it/s]\u001b[A\u001b[A\u001b[A"]
[9.401289, "o", "\r\n\r\n\r\n"]
[9.401869, "o", "\r#0, est. 2.50s:  89%|████████████████████▍  | 4442/5000 [00:02<00:00, 1556.92it/s]\u001b[A\u001b[A\u001b[A"]
[9.502155, "o", "\r\n\r\n\r\n"]
[9.502554, "o", "\r#0, est. 2.50s:  92%|█████████████████████▏ | 4598/5000 [00:02<00:00, 1553.27it/s]\u001b[A\u001b[A\u001b[A"]
[9.602158, "o", "\r\n\r\n\r\n"]
[9.602435, "o", "\r#0, est. 2.50s:  95%|█████████████████████▊ | 4754/5000 [00:02<00:00, 1553.92it/s]\u001b[A\u001b[A\u001b[A"]
[9.703135, "o", "\r\n\r\n\r\n"]
[9.704004, "o", "\r#0, est. 2.50s:  98%|██████████████████████▌| 4911/5000 [00:03<00:00, 1555.83it/s]\u001b[A\u001b[A\u001b[A"]
[9.761857, "o", "\r#0, est. 2.50s: 100%|███████████████████████| 5000/5000 [00:03<00:00, 1610.96it/s]\r\n"]
[9.776273, "o", "\u001b[1m\u001b[7m%\u001b[27m\u001b[1m\u001b[0m                                                                                 \r \r"]
[9.776549, "o", "\u001b]2;alukach@ds:~\u0007\u001b]1;~\u0007"]
[9.790267, "o", "\r\u001b[0m\u001b[27m\u001b[24m\u001b[J\u001b[33m~ ➤ \u001b[00m\u001b[K\u001b[76C\u001b[33m \u001b[00m\u001b[77D"]
[9.790433, "o", "\u001b[?1h\u001b=\u001b[?2004h"]
[11.262646, "o", "\u001b[?2004l\r\r\n"]
[11.329092, "o", "\u001b[0;32masciinema: recording finished\u001b[0m\r\n"]
[11.329167, "o", "\u001b[0;32masciinema: press <enter> to upload to asciinema.org, <ctrl-c> to save locally\u001b[0m\r\n"]
[12.316311, "o", "^C"]
[12.316399, "o", "\r\u001b[0;32masciinema: asciicast saved to /var/folders/3n/3dct2kb54xn1882dpbw0vbdh0000gn/T/tmp0m0d4ri1-ascii.cast\u001b[0m\r\n"]
[12.326841, "o", "\u001b[1m\u001b[7m%\u001b[27m\u001b[1m\u001b[0m                                                                                 \r \r"]
[12.326974, "o", "\u001b]2;alukach@ds:~\u0007\u001b]1;~\u0007"]
[12.338523, "o", "\r\u001b[0m\u001b[27m\u001b[24m\u001b[J\u001b[33m~ ➤ \u001b[00m\u001b[K\u001b[76C\u001b[33m \u001b[00m\u001b[77D"]
[12.338637, "o", "\u001b[?1h\u001b=\u001b[?2004h"]
[13.935243, "o", "s"]
[14.097389, "o", "\bsv"]
[14.314987, "o", "g"]
[14.46684, "o", "-"]
[15.209977, "o", "t"]
[15.350363, "o", "e"]
[15.428225, "o", "\u001b[31m…\u001b[39m"]
[15.45927, "o", "\r\r\u001b[0m\u001b[27m\u001b[24m\u001b[J\u001b[33m~ ➤ \u001b[00msvg-term\u001b[1m \u001b[0m\u001b[K\u001b[67C\u001b[33m \u001b[00m\u001b[68D"]
[16.030755, "o", "\b\u001b[0m -"]
[16.194477, "o", "-"]
[16.425867, "o", "i"]
[16.508727, "o", "n"]
[16.668521, "o", " "]
[16.876205, "o", "/"]
[17.019105, "o", "v"]
[17.145906, "o", "a"]
[17.246531, "o", "r"]
[17.421279, "o", "\u001b[31m…\u001b[39m"]
[17.427675, "o", "\r\r\u001b[0m\u001b[27m\u001b[24m\u001b[J\u001b[33m~ ➤ \u001b[00msvg-term --in /var\u001b[1m/\u001b[0m\u001b[K\u001b[57C\u001b[33m \u001b[00m\u001b[58D"]
[17.909204, "o", "\b\u001b[0m/f"]
[17.994984, "o", "o"]
[18.158413, "o", "l"]
[18.209194, "o", "d"]
[18.509358, "o", "\u001b[31m…\u001b[39m"]
[18.515598, "o", "\r\r\u001b[0m\u001b[27m\u001b[24m\u001b[J\u001b[33m~ ➤ \u001b[00msvg-term --in /var/folders\u001b[1m/\u001b[0m\u001b[K\u001b[49C\u001b[33m \u001b[00m\u001b[50D"]
[19.542164, "o", "\b\u001b[0m/3"]
[19.598027, "o", "n"]
[19.790912, "o", "/"]
[20.75741, "o", "3"]
[21.118463, "o", "d"]
[21.375089, "o", "c"]
[21.564873, "o", "t"]
[21.829205, "o", "\u001b[31m…\u001b[39m"]
[21.837442, "o", "\r\r\u001b[0m\u001b[27m\u001b[24m\u001b[J\u001b[33m~ ➤ \u001b[00msvg-term --in /var/folders/3n/3dct2kb54xn1882dpbw0vbdh0000gn\u001b[1m/\u001b[0m\u001b[K\u001b[15C\u001b[33m \u001b[00m\u001b[16D"]
[23.183211, "o", "\b\u001b[0m/T"]
[23.603098, "o", "/"]
[23.928987, "o", "t"]
[24.172937, "o", "m"]
[24.489561, "o", "p"]
[25.657377, "o", "0"]
[26.161103, "o", "m"]
[26.404008, "o", "0"]
[26.603732, "o", "\u001b[31m…\u001b[39m"]
[26.618252, "o", "\r\r\u001b[0m\u001b[27m\u001b[24m\u001b[J\u001b[33m~ ➤ \u001b[00msvg-term --in /var/folders/3n/3dct2kb54xn1882dpbw0vbdh0000gn/T/tmp0m0d4ri1-ascii.cast\u001b[1m \u001b[0m\u001b[K"]
[27.742006, "o", "\b\u001b[0m -"]
[27.890346, "o", "-"]
[28.099862, "o", "o"]
[28.166638, "o", "u"]
[28.250838, "o", "t"]
[28.3748, "o", " "]
[28.551619, "o", "/"]
[29.509291, "o", "t"]
[29.603613, "o", "m"]
[29.712099, "o", "p"]
[29.955365, "o", "/"]
[30.657315, "o", "e"]
[30.843608, "o", "x"]
[31.023734, "o", "a"]
[31.108809, "o", "m"]
[31.159277, "o", "p"]
[31.341015, "o", "l"]
[31.43148, "o", "e"]
[31.533268, "o", "."]
[31.649616, "o", "s"]
[31.831633, "o", "v"]
[32.007106, "o", "g"]
[32.651262, "o", " "]
[32.923743, "o", "-"]
[33.065427, "o", "-"]
[33.208844, "o", "w"]
[33.328877, "o", "i"]
[33.379628, "o", "n"]
[33.44376, "o", "d"]
[33.562365, "o", "o"]
[33.692507, "o", "w"]
[34.074411, "o", "\u001b[?1l\u001b>"]
[34.074507, "o", "\u001b[?2004l\r\r\n"]
[34.096816, "o", "\u001b]2;svg-term --in  --out /tmp/example.svg --window\u0007\u001b]1;svg-term\u0007"]
[35.927703, "o", "\u001b[1m\u001b[7m%\u001b[27m\u001b[1m\u001b[0m                                                                                 \r \r"]
[35.927783, "o", "\u001b]2;alukach@ds:~\u0007\u001b]1;~\u0007"]
[35.934493, "o", "\r\u001b[0m\u001b[27m\u001b[24m\u001b[J\u001b[33m~ ➤ \u001b[00m\u001b[K\u001b[76C\u001b[33m \u001b[00m\u001b[77D"]
[35.934557, "o", "\u001b[?1h\u001b=\u001b[?2004h"]
[36.939863, "o", "\u001b[?2004l\r\r\n"]

Transform to SVG

Now, for us to place a cast into a Github README or Issue, we need to convert the cast to an animated SVG. svg-term-cli allows us to do this with either a raw cast file or the ID of a cast uploaded to asciinema. Adding the --window flag wraps the cast in a MacOS-style terminal window.

1
svg-term --in /var/folders/3n/3dct2kb54xn1882dpbw0vbdh0000gn/T/tmp0m0d4ri1-ascii.cast --out /tmp/example.svg --window

Embedding

Now that we have our animated SVG, we just need to put it online and reference it.

README

If you’re looking to add your SVG to a README, you can include the SVG in the git repo (e.g. in docs/) and reference it in markdown:

1
![example cli usage](./docs/example.svg)

Issue

Unfortunately, Github does not allow users to drag/drop SVGs into Github Issues.

Screen Shot 2021-09-24 at 1 16 53 PM

Instead, you must figure out your own way to upload the SVG to the internet. One simple solution is to upload it to a gist and then reference the images from your Github Issue.

1
![](https://gist.githubusercontent.com/alukach/7c510d45080d5b2c1d42a0309ad25411/raw/9e42a8904b8da9a289d45b44491f39a1586293fb/example.svg)

Example Process

Here’s an example of the entire process, from start to finish:

yes, I did use asciinema to make a recording of me using asciinema to make a recording 🤸‍♀️