{"id":43022735,"url":"https://github.com/datalad/screencaster","last_synced_at":"2026-01-31T06:38:27.734Z","repository":{"id":69237977,"uuid":"464902905","full_name":"datalad/screencaster","owner":"datalad","description":"Little helpers to automate demos and bring awe to audience with your \"typing\" skills","archived":false,"fork":false,"pushed_at":"2025-12-30T02:34:30.000Z","size":414,"stargazers_count":0,"open_issues_count":3,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2026-01-02T11:52:20.823Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/datalad.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-03-01T13:24:17.000Z","updated_at":"2025-12-30T02:34:34.000Z","dependencies_parsed_at":"2023-02-27T23:46:24.921Z","dependency_job_id":null,"html_url":"https://github.com/datalad/screencaster","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/datalad/screencaster","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datalad%2Fscreencaster","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datalad%2Fscreencaster/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datalad%2Fscreencaster/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datalad%2Fscreencaster/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/datalad","download_url":"https://codeload.github.com/datalad/screencaster/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/datalad%2Fscreencaster/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28931386,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-31T04:05:25.756Z","status":"ssl_error","status_checked_at":"2026-01-31T04:02:35.005Z","response_time":128,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-31T06:38:27.524Z","updated_at":"2026-01-31T06:38:27.710Z","avatar_url":"https://github.com/datalad.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Screencaster - Cast Helpers for Code Demonstrations\n\nA collection of tools to create automated code demonstrations from simple bash scripts. These tools help you create polished, reproducible terminal demos for talks, videos, and documentation by scripting the commands and timing rather than recording live sessions.\n\n![Demo](demo.gif)\n\n## Tools\n\n- ``cast2asciinema`` creates an [asciinema](https://asciinema.org/) from your\n  code\n- ``cast2narration`` creates text-to-speech output from a screencast script\n- ``cast2rst`` turns an asciinema asciicast  into an RST markup\n- ``cast2script`` converts a cast to a script\n- ``cast_live`` creates a remote controlled terminal that can execute a code\n  cast line-wise\n- ``cast_bash.rc`` contains the bash configuration used by some cast helpers\n\n## Installation\n\n### `cast2asciinema` dependencies\n\n- `xterm` - Terminal emulator for running the demos\n- `xdotool` - For simulating keyboard input\n- `asciinema` - For recording the terminal sessions\n- `cowsay` - For cow sayin'\n\n### Setup\n\nClone this repository:\n\n```bash\ngit clone https://github.com/datalad/screencaster.git\ncd screencaster\n```\n\nOptionally, add to your PATH to use from anywhere:\n\n```bash\n# Add to ~/.bashrc or ~/.zshrc\nexport PATH=\"$PATH:/full/path/to/screencaster\"\n```\n\nThen you can run `cast2asciinema` from any directory with your demo scripts.\n\n## Quick Start\n\n**demo.sh:**\n```bash\n#!/bin/bash\n\nsay \"Welcome to my demo\"\nsleep 1\nsay \"Let's run some commands\"\nsleep 1\nrun \"echo 'Hello, World!'\"\nrun \"ls -la\"\nsleep 2\n\nsay \"That's all!\"\n```\n\nMake it executable and run it:\n\n```bash\nchmod +x demo.sh\n# Assuming screencaster is in your PATH\n# SCREENCAST_HOME avoids permission issues with default /demo directory\nSCREENCAST_HOME=/tmp/demo cast2asciinema demo.sh output\n```\n\nThis will create `output/demo.json`. Play it with:\n\n```bash\nasciinema play output/demo.json\n```\n\n### Converting to GIF\n\nTo convert your recording to an animated GIF, use Docker with the `agg` tool:\n\n```bash\ncd output\ndocker run --rm -v \"$PWD:/data\" kayvan/agg /data/demo.json /data/demo.gif\n```\n\nThis creates an optimized GIF suitable for embedding in documentation or sharing.\n\n### Uploading to asciinema.org\n\nYou can upload recordings to asciinema.org for easy sharing:\n\n```bash\nasciinema upload output/demo.json\n```\n\nThis returns a URL you can share. Asciinema.org also allows downloading recordings as GIF directly from their web interface.\n\n### Available Helper Functions\n\n- `say \"text\"` - Display a comment in the terminal (auto-wrapped)\n- `run \"command\"` - Type and execute a command\n- `run_expfail \"command\"` - Run a command expected to fail\n- `show \"text\"` - Display multi-line text as comments\n- `type \"text\"` - Type text without executing\n- `execute` - Press Enter and wait for command completion\n- `sleep N` - Pause for N seconds\n- `key KeyName` - Press a specific key (e.g., `key Return`)\n\n### Working with Virtual Environments\n\nIf your demo requires a Python virtual environment or other shell setup, activate it within the cast script using `run`:\n\n```bash\n#!/bin/bash\n\n# Get the directory where this script is located\nSCRIPT_DIR=\"$( cd \"$( dirname \"${BASH_SOURCE[0]}\" )\" \u0026\u0026 pwd )\"\n\n# Activate virtual environment in the demo terminal\nrun \"source $SCRIPT_DIR/venv/bin/activate\"\n\nsay \"Now running commands with the activated environment...\"\nrun \"python --version\"\nrun \"pip list\"\n```\n\nEach `run` command executes in the same persistent shell session, so environment changes persist across commands.\n\n## Configuration\n\n### SCREENCAST_HOME\n\nBy default, `cast2asciinema` tries to create a temporary home directory at `/demo`, which requires root access. To avoid permission issues, set the `SCREENCAST_HOME` environment variable to a writable location:\n\n```bash\nSCREENCAST_HOME=/tmp/demo cast2asciinema demo.sh output\n```\n\nThis directory is used as a clean, isolated environment for your demo and is cleaned up automatically after the recording completes.\n\n## Troubleshooting\n\n### Asciinema configuration prompt\n\nIf `cast2asciinema` fails with \"Asciinema stopped unexpectedly\", asciinema may be prompting for configuration (e.g., sharing settings). This can happen on first run or if settings are reset. The recording will fail during the prompt. Simply run the command again after responding to the prompt, and it will work correctly.\n\n## Related/Alternatives\n\n- https://github.com/k9withabone/autocast\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatalad%2Fscreencaster","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdatalad%2Fscreencaster","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdatalad%2Fscreencaster/lists"}