This repo contains all necessary tools to create and modify videos of terminal sessions
Go to file
2024-06-28 08:08:14 +02:00
casts feat(): Exclude cast files 2024-06-09 13:23:33 +02:00
scripts fix(): Use env var OOSH_INSTALL_SOURCE 2024-06-28 08:08:14 +02:00
.gitignore feat(): Exclude cast files 2024-06-09 13:23:33 +02:00
poetry.lock fix(): Update asciinema-automation and remove debug arg from rec script 2024-06-09 21:59:48 +02:00
pyproject.toml doc(): Init repo 2024-06-03 19:28:18 +02:00
README.md doc(): Update README file 2024-06-08 10:06:27 +02:00
shell.nix doc(): Init repo 2024-06-03 19:28:18 +02:00

asciinema-director

Record and share your terminal sessions, the simple way. Forget screen recording apps and blurry video. Experience a lightweight, text-based approach to terminal recording. https://asciinema.org

Installation

Mandatory dependencies

Optional dependencies

# its easy with nix to install python and poetry, assume you are in the root of this repo
nix-shell

Steps for this project

Prepare your python environment:

# assume you are in the root of this repo
poetry install

With this repo you can direct your terminal sessions by the scripts provided in the ./scripts folder, e.g.:

  • demo_script.sh contains the commands
  • demo_rec.sh runs the recording
# run rec session
cd scripts/
./demo_rec.sh

# upload .cast files - instead to publish your cast to the public server, you can also choose your private
# server instance - see https://docs.asciinema.org/getting-started/#self-hosting-the-server
asciinema upload casts/demo.cast

Example configuration for asciinema

Put this config into your ~/.config/asciinema/config file and modify to your needs:

[api]

; API server URL, default: https://asciinema.org
; If you run your own instance of asciinema server then set its address here
; It can also be overriden by setting ASCIINEMA_API_URL environment variable
url = https://asciinema.starconnect.ch

[record]

; Command to record, default: $SHELL
command = PS1="\u@\h:\w\$ " bash -l

[play]

; Playback speed (can be fractional), default: 1
; speed = 2

; Limit replayed terminal inactivity to max n seconds, default: off
idle_time_limit = 1

; Define hotkey for pausing/resuming playback,
; default: space
; pause_key = p

; Define hotkey for stepping through playback, a frame at a time,
; default: . (dot)
; step_key = s

; Define hotkey for jumping to the next marker,
; default: ]
next_marker_key = m

[notifications]
; Desktop notifications are displayed in several situations, e.g. when
; pausing/resuming the capture of terminal with C-\ keyboard shortcut.

; Should desktop notifications be enabled, default: yes
enabled = no

; Custom notification command
; asciinema automatically detects available desktop notification system
; (notify-send on GNU/Linux, osacript on macOS). Custom command can be
; used if needed.
; When invoked, environment variable $TEXT contains notification text, while
; $ICON_PATH contains path to the asciinema logo image.
; command = tmux display-message "$TEXT"