https://github.com/iamogbz/animaterm
📟 Automatically create terminal animations from script
https://github.com/iamogbz/animaterm
animation automation console gif script terminal
Last synced: 10 months ago
JSON representation
📟 Automatically create terminal animations from script
- Host: GitHub
- URL: https://github.com/iamogbz/animaterm
- Owner: iamogbz
- License: unlicense
- Created: 2020-11-04T17:37:10.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2024-12-09T14:27:45.000Z (about 1 year ago)
- Last Synced: 2025-02-13T04:30:36.601Z (12 months ago)
- Topics: animation, automation, console, gif, script, terminal
- Language: JavaScript
- Homepage: https://ogbizi.com/animaterm/
- Size: 116 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# Animaterm
📟 Automatically create terminal animations from script
## Usage
Install from the github repo
```sh
npm i -g 'github:iamogbz/animaterm'
```
> You do not need the peer dependencies except you need to render in the `gif` format
>
> The terminalizer (`tlz`) renderer produces better gifs but requires an additional dependency
>
> TODO: support rendering fancy console text colors and formatting
Run the `animaterm` bin with cli options
```sh
animaterm script.json output.svg
```
> Also supports [`.gif`](./docs/usage.gif) as the output format
>
> Set the renderer using the output extension e.g. `output.gif` or `output.tlz`

> This demo animation was created using only `animaterm`
### Script
Samples available in the [end-to-end scripts](./e2e/).
This is a `JSON` file with the following structure:
```ts
Step[]
```
That is a `JSON` array at the root where each `Step` is defined by the following interface:
https://github.com/iamogbz/animaterm/blob/d277aae/src/types.d.ts#L49-L83
#### Descriptions
##### clear
Flush terminal output
##### copy
Copy from start line and position to end line and position as defined in `payload`
##### enter
Return and run commands typed in previous steps
##### paste
Paste last copied text
> NOTE: does not paste from system clipboard
##### type
Simulate user typing characters from text in `payload`
##### waitForOutput
Wait for data in `payload` to be displayed in the terminal
### Config
Defined by the interface `Config`:
https://github.com/iamogbz/animaterm/blob/d277aae/src/types.d.ts#L1-L35
> TODO: add instructions on overriding the default config
## Inspirations
-
-