{"id":16679013,"url":"https://github.com/dcoles/asciicast-tools","last_synced_at":"2025-10-08T17:41:41.099Z","repository":{"id":68738047,"uuid":"129666643","full_name":"dcoles/asciicast-tools","owner":"dcoles","description":"Tools for creating recordings of console sessions.","archived":false,"fork":false,"pushed_at":"2020-06-18T19:00:35.000Z","size":190,"stargazers_count":10,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-05-26T14:58:23.291Z","etag":null,"topics":["asciicast","recording","terminal","tmux"],"latest_commit_sha":null,"homepage":"https://dcoles.net/asciicast-tools","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dcoles.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}},"created_at":"2018-04-16T01:14:49.000Z","updated_at":"2024-04-07T01:16:19.000Z","dependencies_parsed_at":"2023-02-27T00:01:00.126Z","dependency_job_id":null,"html_url":"https://github.com/dcoles/asciicast-tools","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dcoles/asciicast-tools","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dcoles%2Fasciicast-tools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dcoles%2Fasciicast-tools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dcoles%2Fasciicast-tools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dcoles%2Fasciicast-tools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dcoles","download_url":"https://codeload.github.com/dcoles/asciicast-tools/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dcoles%2Fasciicast-tools/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265791721,"owners_count":23829165,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["asciicast","recording","terminal","tmux"],"created_at":"2024-10-12T13:32:37.861Z","updated_at":"2025-10-08T17:41:40.999Z","avatar_url":"https://github.com/dcoles.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# asciicast tools\n\nTools for creating recordings of console sessions.\n\n[![image](https://user-images.githubusercontent.com/1007415/55848841-32fd4780-5b03-11e9-919f-b7c232f942a3.png)](https://asciinema.org/a/239501)\n\n## Introduction\n\nOriginally this project was started as a way of recording from a tmux session using `tmux pipe-pane`. After doing some research I found out there was already the [asciicast format][asciicast-format], so figured it made sense to use that as the interchange format.\n\nAs for the question of why not just use `asciinema rec`, I can give a couple of reasons.\nFirst, recording directly from a tmux pane means you can start recording without needing\nto start a new shell session (for example the output of an already running program).\nSecond, I like the idea of small programs that do one thing and one thing well.\nFinally (the most selfish reason) is I just wanted to see if it was possible to do 😊.\n\n[asciicast-format]: https://github.com/asciinema/asciinema/blob/develop/doc/asciicast-v2.md\n\n## Player\n\nThis is a [hterm][hterm]-based player for asciicasts. It depends on\n`hterm_all.js` which can be built by running\n`third_party/libapps/hterm/bin/mkdist.sh` and copying into the player directory\n(or using the existing symlink).\n\n[hterm]: https://chromium.googlesource.com/apps/libapps/+/master/hterm\n\nA hosted version can be found on [the website](https://dcoles.net/asciicast-tools/player).\n\n## Related projects\n\n- [cast2gif](https://github.com/katharostech/cast2gif) Convert `asciicast` files to GIF, Animated PNG, or SVG\n- [asciinema](https://github.com/asciinema/asciinema) Terminal recorder, player and upload tool for [asciinema.org](https://asciinema.org/)\n\n## Commands\n\n## `asciicast-pipe`\n\nA filter to convert input to [asciicast v2 format][asciicast-format].\n\n```\nUsage: asciicast-pipe [-h] [-W WIDTH] [-H HEIGHT] [-S SHELL] [-T TERM] [-r]\n                      [--encoding ENCODING]\n\noptional arguments:\n  -h, --help            show this help message and exit\n  -W WIDTH, --width WIDTH\n  -H HEIGHT, --height HEIGHT\n  -S SHELL, --shell SHELL\n  -T TERM, --term TERM\n  -r, --force-cr        Force newlines to be treated as CR+NL\n  -e, --echo            Echo stdinput to stderr\n  --encoding ENCODING\n```\n\nBy default the script will attempt to detect the correct terminal settings, but\nthis can be overridden using command-line flags.\n\nThis is not expected to be called directly, but rather by a tool like\n`tmux pipe-pane` or `scriptreplay`:\n\n```bash\n# Convert a typescript+timing information to asciicast\n$ scriptreplay -t timing typescript | asciicast-pipe \u003e typescript.cast\n\n# Record terminal session as asciicast\n$ script -q -f \u003e(asciicast-pipe \u003e output.cast)\n```\n\n`asciicast-pipe` can also be used to capture output from simple programs.\nUse `--force-cr` (`-r`) to ensure output contains required carriage returns.\n\n```bash\n$ ping -c 4 127.0.0.1 | asciicast-pipe --echo --force-cr \u003e ping.cast\n```\n\n## `tmux-asciicast-pane`\n\nHelper-script for recording output from a [tmux](https://tmux.github.io) pane.\n\n```\nUsage: tmux-asciicast-pane [path]\n```\n\nTo start recording the current tmux pane, provide an output file to write the\nasciicast:\n\n```bash\n$ tmux-asciicast-pane output.cast\n```\n\nTo stop recording, just run without any output file specified:\n\n```bash\n$ tmux-asciicast-pane\n```\n\n# Binding to a tmux key\n\nAlternatively you may wish to set up a shortcut in `~/.tmux.conf`:\n\n```\nbind-key H pipe-pane -o 'asciicast-pipe -W #{pane_width} -H #{pane_height} -T \"${TERM}\" -S \"${SHELL}\" \u003e $HOME/tmux-%Y%m%d%H%M%S.cast' \\; display-message 'Toggled logging'\n```\n\nPressing `\u003ctmux-prefix\u003e H` will toggle logging to a file in your home directory.\n\n## License\n\nCopyright © 2018 David Coles\n\nAll code is licensed under MIT License. See LICENSE for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdcoles%2Fasciicast-tools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdcoles%2Fasciicast-tools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdcoles%2Fasciicast-tools/lists"}