1ASCIINEMA(1)               Version 2.1.0, 2022-05-07              ASCIINEMA(1)
2
3
4

NAME

6       asciinema - terminal session recorder
7

SYNOPSIS

9       asciinema --version
10       asciinema command [options] [args]
11

DESCRIPTION

13       asciinema  lets  you  easily record terminal sessions, replay them in a
14       terminal as well as in a web browser and share them on the web.   asci‐
15       inema  is  Free and Open Source Software licensed under the GNU General
16       Public License v3.
17

COMMANDS

19       asciinema is composed of multiple commands, similar to git, apt-get  or
20       brew.
21
22       When  you  run asciinema with no arguments a help message is displayed,
23       listing all available commands with their options.
24
25   rec [filename]
26       Record terminal session.
27
28       By running asciinema rec [filename] you start a new recording  session.
29       The  command (process) that is recorded can be specified with -c option
30       (see below), and defaults to $SHELL which is what you want in most cas‐
31       es.
32
33       You  can  temporarily  pause  recording of terminal by pressing Ctrl+\.
34       This is useful when you  want  to  execute  some  commands  during  the
35       recording  session  that should not be captured (e.g. pasting secrets).
36       Resume by pressing Ctrl+\ again.
37
38       Recording finishes when you exit the shell (hit Ctrl+D or  type  exit).
39       If the recorded process is not a shell then recording finishes when the
40       process exits.
41
42       If the filename argument is omitted then (after  asking  for  confirma‐
43       tion)   the   resulting   asciicast  is  uploaded  to  asciinema-server
44       (https://github.com/asciinema/asciinema-server) (by default to asciine‐
45       ma.org), where it can be watched and shared.
46
47       If  the filename argument is given then the resulting recording (called
48       asciicast) is saved to a local file.  It can  later  be  replayed  with
49       asciinema  play  <filename>  and/or  uploaded  to asciinema server with
50       asciinema upload <filename>.
51
52       ASCIINEMA_REC=1 is added to  recorded  process  environment  variables.
53       This can be used by your shell’s config file (.bashrc, .zshrc) to alter
54       the prompt or play a sound when the shell is being recorded.
55
56       Available options:
57
58              --stdin
59                     Enable stdin (keyboard) recording (see below)
60
61              --append
62                     Append to existing recording
63
64              --raw  Save raw STDOUT output,  without  timing  information  or
65                     other metadata
66
67              --overwrite
68                     Overwrite the recording if it already exists
69
70              -c, --command=<command>
71                     Specify command to record, defaults to $SHELL
72
73              -e, --env=<var-names>
74                     List  of  environment  variables  to capture, defaults to
75                     SHELL,TERM
76
77              -t, --title=<title>
78                     Specify the title of the asciicast
79
80              -i, --idle-time-limit=<sec>
81                     Limit recorded terminal inactivity to max <sec> seconds
82
83              --cols=<n>
84                     Override terminal columns for recorded process
85
86              --rows=<n>
87                     Override terminal rows for recorded process
88
89              -y, --yes
90                     Answer “yes” to all prompts (e.g. upload confirmation)
91
92              -q, --quiet
93                     Be quiet, suppress all notices/warnings (implies -y)
94
95       Stdin recording allows for capturing of all characters typed in by  the
96       user  in  the  currently  recorded shell.  This may be used by a player
97       (e.g.   asciinema-player  (https://github.com/asciinema/asciinema-play
98       er))  to  display  pressed  keys.  Because it’s basically a key-logging
99       (scoped to a single shell instance), it’s disabled by default, and  has
100       to be explicitly enabled via –stdin option.
101
102   play <filename>
103       Replay recorded asciicast in a terminal.
104
105       This command replays a given asciicast (as recorded by rec command) di‐
106       rectly in your terminal.  The asciicast can be read from a file or from
107       stdin (`-'):
108
109       Playing from a local file:
110
111              asciinema play /path/to/asciicast.cast
112
113       Playing from HTTP(S) URL:
114
115              asciinema play https://asciinema.org/a/22124.cast
116              asciinema play http://example.com/demo.cast
117
118       Playing   from  asciicast  page  URL  (requires  <link  rel="alternate"
119       type="application/x-asciicast" href="/my/ascii.cast"> in page’s HTML):
120
121              asciinema play https://asciinema.org/a/22124
122              asciinema play http://example.com/blog/post.html
123
124       Playing from stdin:
125
126              cat /path/to/asciicast.cast | asciinema play -
127              ssh user@host cat asciicast.cast | asciinema play -
128
129       Playing from IPFS:
130
131              asciinema play dweb:/ipfs/QmNe7FsYaHc9SaDEAEXbaagAzNw9cH7YbzN4xV7jV1MCzK/ascii.cast
132
133       Available options:
134
135              -i, --idle-time-limit=<sec>
136                     Limit replayed terminal inactivity to max  <sec>  seconds
137                     (can be fractional)
138
139              -s, --speed=<factor>
140                     Playback speed (can be fractional)
141
142       While playing the following keyboard shortcuts are available:
143
144              Space  Toggle pause
145
146              .      Step through a recording a frame at a time (when paused)
147
148              Ctrl+C Exit
149
150       Recommendation:  run  `asciinema  play' in a terminal of dimensions not
151       smaller than the one used for recording as there’s no “transcoding”  of
152       control sequences for the new terminal size.
153
154   cat <filename>
155       Print full output of recorded asciicast to a terminal.
156
157       While  asciinema play  replays the recorded session using timing infor‐
158       mation saved in the asciicast, asciinema cat dumps the full output (in‐
159       cluding all escape sequences) to a terminal immediately.
160
161       asciinema  cat  existing.cast  >output.txt  gives  the  same  result as
162       recording via asciinema rec --raw output.txt.
163
164   upload <filename>
165       Upload recorded asciicast to asciinema.org site.
166
167       This command uploads given asciicast (recorded by rec command) to asci‐
168       inema.org, where it can be watched and shared.
169
170       asciinema  rec  demo.cast + asciinema play demo.cast + asciinema upload
171       demo.cast is a nice combo if you want to  review  an  asciicast  before
172       publishing it on asciinema.org.
173
174   auth
175       Link and manage your install ID with your asciinema.org user account.
176
177       If  you  want to manage your recordings (change title/theme, delete) at
178       asciinema.org you need to link your “install  ID”  with  your  asciine‐
179       ma.org user account.
180
181       This command displays the URL to open in a web browser to do that.  You
182       may be asked to log in first.
183
184       Install ID is a random ID (UUID v4  (https://en.wikipedia.org/wiki/Uni
185       versally_unique_identifier))  generated  locally when you run asciinema
186       for the first time, and  saved  at  $HOME/.config/asciinema/install-id.
187       It’s  purpose  is to connect local machine with uploaded recordings, so
188       they can later be associated with asciinema.org account.  This  way  we
189       decouple  uploading  from  account creation, allowing them to happen in
190       any order.
191
192       Note: A new install ID is generated on each machine and system user ac‐
193       count you use asciinema on.  So in order to keep all recordings under a
194       single asciinema.org account you need to run asciinema auth on  all  of
195       those  machines.   If you’re already logged in on asciinema.org website
196       and you run `asciinema auth' from a new computer then this  new  device
197       will be linked to your account.
198
199       While  you CAN synchronize your config file (which keeps the API token)
200       across all your machines so all use the same token, that’s  not  neces‐
201       sary.   You can assign new tokens to your account from as many machines
202       as you want.
203
204       Note: asciinema versions prior to 2.0 confusingly referred  to  install
205       ID as “API token”.
206

EXAMPLES

208       Record your first session:
209
210              asciinema rec first.cast
211
212       End your session:
213
214              exit
215
216       Now replay it with double speed:
217
218              asciinema play -s 2 first.cast
219
220       Or with normal speed but with idle time limited to 2 seconds:
221
222              asciinema play -i 2 first.cast
223
224       You  can pass -i 2 to asciinema rec as well, to set it permanently on a
225       recording.  Idle time limiting makes the recordings much more interest‐
226       ing to watch, try it.
227
228       If you want to watch and share it on the web, upload it:
229
230              asciinema upload first.cast
231
232       The  above  uploads  it  to <https://asciinema.org>, which is a default
233       asciinema-server (<https://github.com/asciinema/asciinema-server>)  in‐
234       stance, and prints a secret link you can use to watch your recording in
235       a web browser.
236
237       You can record and upload in one step by omitting the filename:
238
239              asciinema rec
240
241       You’ll be asked to confirm the upload when the recording  is  done,  so
242       nothing is sent anywhere without your consent.
243
244   Tricks
245       Record slowly, play faster:
246              First  record  a  session  where  you can take your time to type
247              slowly what you want to show in the recording:
248
249                     asciinema rec initial.cast
250
251              Then record the replay of `initial.cast'  as  `final.cast',  but
252              with  five  times  the initially recorded speed, with all pauses
253              capped to two seconds and with a title set as “My fancy title”::
254
255                     asciinema rec -c "asciinema play -s 5 -i 2 initial.cast" -t "My fancy title" final.cast
256
257       Play from stdin:
258
259              cat /path/to/asciicast.json | asciinema play -
260
261       Play file from remote host accessible with SSH:
262
263              ssh user@host cat /path/to/asciicat.json | asciinema play -
264

ENVIRONMENT

266       ASCIINEMA_API_URL
267              This variable allows overriding asciinema-server URL (which  de‐
268              faults to https://asciinema.org) in case you’re running your own
269              asciinema-server instance.
270
271       ASCIINEMA_CONFIG_HOME
272              This variable allows overriding config directory location.   De‐
273              fault  location  is  $XDG_CONFIG_HOME/asciinema  (when $XDG_CON‐
274              FIG_HOME is set) or $HOME/.config/asciinema.
275

BUGS

277       See GitHub Issues: <https://github.com/asciinema/asciinema/issues>
278

MORE RESOURCES

280       More documentation is available on the asciicast.org  website  and  its
281       GitHub wiki:
282
283       • Web: asciinema.org/docs/ (https://asciinema.org/docs/)
284
285       • Wiki:  github.com/asciinema/asciinema/wiki  (https://github.com/asci
286         inema/asciinema/wiki)
287
288       • IRC: Channel on Libera.Chat  (https://web.libera.chat/gamja/#asciine‐
289         ma)
290
291       • Twitter: @asciinema (https://twitter.com/asciinema)
292

AUTHORS

294       asciinema’s lead developer is Marcin Kulik.
295
296       For  a list of all contributors look here: <https://github.com/asciine
297       ma/asciinema/contributors>
298
299       This Manual Page was written by Marcin Kulik with help from Kurt  Pfei‐
300       fle.
301
302
303
304Version 2.0.1                                                     ASCIINEMA(1)
Impressum