swordfish-rs
Cli tool for typing effect in Termainl for screencasts and demos:
- 💬 Describe what you are doing
- ⚡️ Run any terminal command and get their outputs to screen
- 🤖 Reproducable steps - iterate on the
screenplay
file till perfection - 😎 Mimick real person behaviour with realtime typing into terminal
Demo
Example screenplay.yaml
file:
-
-
-
-
-
-
-
-
-
-
-
-
-
Running swordfish screenplay.yaml
:
Quick start
Install
Usage
Create a screenplay file and run swordfish:
Commands
The follwoing comamnds are available, commands are witten with !
before the command name, for example !clear
.
write
Write text to the terimal.
Argument | Type | Description |
---|---|---|
text |
String | the text to type in the terimal, each charecter will be entered on by one with some delay |
msec |
Integer | delay between typed chars in milisec |
color (optional) |
String | text's color: black , red , green , yellow , blue , magenta , cyan , white or a brighter variant, for example bright_red |
erase
Erase charecters to the left.
Argument | Type | Description |
---|---|---|
amount (optional) |
String | the amount of backspaces |
by_chars (optional) |
String | the amount of backspace is determind by the length of the provided text |
msec |
Integer | delay between individual backspaces in milisec |
Use either amount
or by_chars
or both.
execute
Execute shell commands or other applications and show their output.
Argument | Type | Description |
---|---|---|
line |
String | command line to execute, respects quoted arguments |
The output is presented, while the executed command itself will not show.
wait
Argument | Type | Description |
---|---|---|
msec |
Integer | delay before next command in milisec |
clear
Clear screen command.
pause
Pause before next command and wait for user input (any key...)
prompt
Prompt specify a constant text that is shown after every execute
and cis not affected by erase
.
Argument | Type | Description |
---|---|---|
text |
String | the prompt text |
color (optional) |
String | text's color: black , red , green , yellow , blue , magenta , cyan , white or a brighter variant, for example bright_red |