{"id":33185842,"url":"https://github.com/vim-zz/swordfish-rs","last_synced_at":"2026-01-18T14:06:00.218Z","repository":{"id":58925197,"uuid":"534241543","full_name":"vim-zz/swordfish-rs","owner":"vim-zz","description":"Typing effect cli tool for screencasts and demos","archived":false,"fork":false,"pushed_at":"2023-06-11T10:01:44.000Z","size":1344,"stargazers_count":52,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-14T11:36:46.620Z","etag":null,"topics":["cli","demos","rust","simple"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/vim-zz.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}},"created_at":"2022-09-08T14:08:23.000Z","updated_at":"2025-08-22T21:29:20.000Z","dependencies_parsed_at":"2023-01-30T00:16:04.817Z","dependency_job_id":null,"html_url":"https://github.com/vim-zz/swordfish-rs","commit_stats":null,"previous_names":["vim-zz/swordfish"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/vim-zz/swordfish-rs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vim-zz%2Fswordfish-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vim-zz%2Fswordfish-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vim-zz%2Fswordfish-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vim-zz%2Fswordfish-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vim-zz","download_url":"https://codeload.github.com/vim-zz/swordfish-rs/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vim-zz%2Fswordfish-rs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28537492,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-18T13:04:05.990Z","status":"ssl_error","status_checked_at":"2026-01-18T13:01:44.092Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["cli","demos","rust","simple"],"created_at":"2025-11-16T05:00:20.103Z","updated_at":"2026-01-18T14:06:00.171Z","avatar_url":"https://github.com/vim-zz.png","language":"Rust","funding_links":[],"categories":["\u003ca name=\"text-processing\"\u003e\u003c/a\u003eText processing"],"sub_categories":[],"readme":"# swordfish-rs\n\n\u003e **Typing effect cli tool for screencasts and demos**\n\n[![Crates.io](https://img.shields.io/crates/v/swordfish-rs)](https://crates.io/crates/swordfish-rs)\n[![Crates.io](https://img.shields.io/crates/d/swordfish-rs)](https://crates.io/crates/swordfish-rs)\n\n1. 💬 Describe what you are doing\n2. ⚡️ Run any terminal command and get their outputs to screen\n3. 🤖 Reproducible steps - iterate on the `screenplay` file till perfection\n4. 😎 Mimics real person behavior with realtime typing into terminal\n\n![Swordfish hack scene](swordfish_hack_scene.gif)\n\n## Demo\n\nExample `screenplay.yaml` file:\n\n```yaml\n- !clear\n# - !turbo {by: 3}\n- !write {msec: 0, color: green, text:  \"$ \"}\n- !write {msec: 20, text:    \"i am going to list this dir\"}\n- !wait {msec: 1000}\n- !erase {msec: 20, by_chars: xxxxxxxxxxxxxxxxxxxxxxxxxxx }\n- !wait {msec: 1000}\n- !write {msec: 20, text: ls}\n- !wait {msec: 1000}\n- !execute {line: ls -la}\n- !wait {msec: 3000}\n- !write {msec: 1000, color: green, text:  \"$ \"}\n- !write {msec: 20, text: \"bye, press any key...\"}\n- !pause\n```\n\nRunning `swordfish screenplay.yaml`:\n\n![demo](demo.gif)\n\n## Quick start\n\n1. Install: \n\n```\ncargo install swordfish-rs\n```` \n\nRequires Rust on your machine, get it from [https://rustup.rs](https://rustup.rs)\n\nor [download a binary](https://github.com/vim-zz/swordfish-rs/releases)\n\n2. Create this getting started screenplay file as `getting_started.yaml`:\n\n```yaml\n- !clear\n- !prompt {color: green, text:  \"$\"}\n- !write {msec: 20, text: \"swordfish reads screenplay files, in yaml format\"}\n- !wait {msec: 2000}\n- !erase {msec: 20, amount: 1000 }\n- !wait {msec: 1000}\n- !write {msec: 20, text: \"it contains a list of commands, each command can have parameters that control it\"}\n- !wait {msec: 2000}\n- !new_line\n- !write {msec: 20, text: \"that's it\"}\n- !new_line\n```\n\n3. Run swordfish\n\n```\nswordfish getting_started.yaml\n```\n\n## Commands\n\nThe following commands are available, written with `!` before the command name, for example `!clear`.\n\n#### `clear` \n\nClear screen command.\n\n#### `erase` \n\nErase characters to the left.\n\n| Argument | Type | Description |\n| - | - | - |\n|`amount` (optional)| String | the amount of backspaces |\n|`by_chars` (optional)| String | the amount of backspace is determined by the length of the provided text |\n|`msec`| Integer | delay between individual backspaces in millisecs |\n\nUse either `amount` or `by_chars` or both.\n\n#### `execute` \n\nExecute shell commands or other applications and show their output.\n\n| Argument | Type | Description |\n| - | - | - |\n|`line`| String | command line to execute, respects quoted arguments |\n\nThe output is presented, while the executed command itself will not show.\n\n#### `new_line` \n\nSimulate user's `ENTER`.\n\n#### `pause` \n\nPause before next command and wait for user input (any key...)\n\n#### `prompt`\n\nPrompt specify a constant text that is shown after every `execute` and cis not affected by `erase`.\n\n| Argument | Type | Description |\n| - | - | - |\n|`text`| String | the prompt text |\n|`color` (optional)| String | text's color: `black`, `red`, `green`, `yellow`, `blue`, `magenta`, `cyan`, `white` or a brighter variant, for example `bright_red` |\n\n#### `title` \n\nSets the terminal window title.\n\n| Argument | Type | Description |\n| - | - | - |\n|`text`| String | the text to use for the terminal window title |\n\n#### `turbo` \n\nSpeed everything, useful when iterating over the screenplay.\n\n| Argument | Type | Description |\n| - | - | - |\n|`by`| Integer | Speed everything by this factor |\n    \n#### `wait` \n\nPauses execution for the specified time, then contrinues.\n\n| Argument | Type | Description |\n| - | - | - |\n|`msec`| Integer |  delay before next command in millisecs |\n\n#### `write` \n\nWrite text to the terminal.\n\n| Argument | Type | Description |\n| - | - | - |\n|`text`| String | the text to type in the terminal, each character will be entered one by one with some delay |\n|`msec`| Integer | delay between typed chars in millisecs |\n|`color` (optional)| String | text's color: `black`, `red`, `green`, `yellow`, `blue`, `magenta`, `cyan`, `white` or a brighter variant, for example `bright_red` |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvim-zz%2Fswordfish-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvim-zz%2Fswordfish-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvim-zz%2Fswordfish-rs/lists"}