Skip to main content

Asciinwriter

Asciinwriter is a CLI tool for scripting and automating interactive terminal sessions, primarily designed to generate asciinema .cast files for demos, documentation, and automated testing. It simulates human-like typing and command execution, making it ideal for producing realistic terminal recordings and GIFs.

Purpose

  • Automate terminal interactions for reproducible demos and documentation
  • Generate .cast files for use with asciinema and conversion to GIFs
  • Script complex shell sessions with SEND/EXPECT primitives
  • Useful for CI, documentation, and teaching

Quick Start

Install dependencies (requires Python 3.11+):

pipx install asciinwriter

Prepare a script file (e.g., demo.scene):

SEND(echo Hello, world!)
ENTER()
EXPECT(Hello, world!)

Run the script and record a cast:

export SCENE_FILE=demo.scene
asciinema rec demo.cast -c asciinwriter

You can then convert the .cast to a GIF using agg or similar tools.

Usage

Asciinwriter reads commands from a scene file specified by the SCENE_FILE environment variable. The file should contain lines like:

  • SEND(...) sends text to the shell.
  • ENTER() sends the Enter key to the shell.
  • EXPECT(...) waits for the given output.
  • DELAY(...) pause the typing for a specified period.

Development

License

GPL-3.0-or-later License. See LICENSES/GPL-3.0-or-later.txt for details.

Author

(C) 2025 Alexei Znamensky

Metadata

Release files for asciinwriter 0.2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for asciinwriter 0.2.2
File Size Uploaded
asciinwriter-0.2.2.tar.gz 16.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for asciinwriter 0.2.2
File Interpreter ABI Platform
asciinwriter-0.2.2-py3-none-any.whl Python 3 none any Details

Total release size: 33.1 kB

Release files / asciinwriter-0.2.2.tar.gz

Download URL asciinwriter-0.2.2.tar.gz
Size 16.1 kB
Tags Source
SHA-256 checksum
How to use checksums
6e8debae6b570d8db7d387db28919b9c6f79ab521c3a7feb66e00230011bd3a6
BLAKE2b-256 checksum
How to use checksums
2a31453ca56de9d01fc6f93f01d9a38578c88332c0c8fdbff2a93c3215ceeaa1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 14, 2025.

Transparency log

Release files / asciinwriter-0.2.2-py3-none-any.whl

Download URL asciinwriter-0.2.2-py3-none-any.whl
Size 16.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5879c5175b831128e55f2844fe1fc1c66fb7ca895217654e71a20d0cfe0dd623
BLAKE2b-256 checksum
How to use checksums
709d3755e27d6eb763f1fdc11f8fe359dcc13c78d7dc29335b398e01d320e0ee
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 14, 2025.

Transparency log

Release history Release notifications | RSS feed

This release

0.2.2 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page