{"id":20359991,"url":"https://github.com/rytswd/cli-demo-helper","last_synced_at":"2025-09-23T15:31:13.357Z","repository":{"id":38188978,"uuid":"391469061","full_name":"rytswd/cli-demo-helper","owner":"rytswd","description":"CLI demo made easier","archived":false,"fork":false,"pushed_at":"2022-06-09T17:53:34.000Z","size":8726,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-11-14T23:36:59.270Z","etag":null,"topics":["bash","cli","shell"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/rytswd.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":"2021-07-31T21:42:20.000Z","updated_at":"2024-11-01T16:06:31.000Z","dependencies_parsed_at":"2022-08-18T13:10:51.405Z","dependency_job_id":null,"html_url":"https://github.com/rytswd/cli-demo-helper","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rytswd%2Fcli-demo-helper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rytswd%2Fcli-demo-helper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rytswd%2Fcli-demo-helper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rytswd%2Fcli-demo-helper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rytswd","download_url":"https://codeload.github.com/rytswd/cli-demo-helper/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":233984680,"owners_count":18761308,"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":["bash","cli","shell"],"created_at":"2024-11-14T23:37:05.412Z","updated_at":"2025-09-23T15:31:07.674Z","avatar_url":"https://github.com/rytswd.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CLI Demo Helper\n\n## 🚀 Examples\n\n![Demo with minimal setup](./assets/demo-minimal.gif)\n\n\u003e Ref: [example-minimal.sh](/example-minimal.sh) file used in above example\n\n```bash\n#!/usr/bin/env bash\n\n# shellcheck source=./demo-helper.sh\nsource \"$(dirname \"$0\")/demo-helper.sh\"\n\ncomment \"Starting demo with demo-helper...\"\nexecute \"ls -la\"\n\ncomment_r \"Special characters are written as is, such as '\\\\~!!@(*#@)\"\ncomment_g \"It is simple to use, you just need to source the helper script.\"\ncomment_b \"No extra tool needed.\"\n\ncomment \"End of demo!\"\n```\n\n## ✨ Usage\n\nYou need to `source` the `demo-helper.sh` file, and use provided functions.\n\nThe simplest approach is to copy the `demo-helper.sh` file to your local, by running something like below.\n\n```bash\ncurl -sSL https://raw.githubusercontent.com/rytswd/cli-demo-helper/main/demo-helper.sh \\\n    \u003e demo-helper.sh\n```\n\nWith that, you can have the following snippet in your shell script to set up functions.\n\n```bash\n# shellcheck source=./demo-helper.sh\nsource \"$(dirname \"$0\")/demo-helper.sh\"\n```\n\n## 🎮 Functions\n\n\u003c!-- == imptr: function-list / begin from: ./docs/functions.md#[list] == --\u003e\n\n| Function                 | Description                                                |\n| ------------------------ | ---------------------------------------------------------- |\n| `comment \"abc\"`          | Write comment like string, with preceding character of `#` |\n| `comment_r \"abc\"`        | Write comment the same way, with red text                  |\n| `comment_g \"abc\"`        | Write comment the same way, with green text                |\n| `comment_b \"abc\"`        | Write comment the same way, with blue text                 |\n| `comment_w \"abc\"`        | Write comment the same way, with white text                |\n| `execute \"some_command\"` | Write string as command, and execute by `eval`             |\n\n\u003c!-- == imptr: function-list / end == --\u003e\n\n## 🧩 Supported Variables\n\n\u003c!-- == imptr: variable-list / begin from: ./docs/variables.md#[list] == --\u003e\n\n| Function                 | Description                                       | Default        |\n| ------------------------ | ------------------------------------------------- | -------------- |\n| `demo_helper_type_speed` | Imitated type speed in character-per-min notation | 1200           |\n| `demo_helper_prompt`     | Prompt for each line like `PS1`                   | `$ ` in yellow |\n\n\u003c!-- == imptr: variable-list / end == --\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frytswd%2Fcli-demo-helper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frytswd%2Fcli-demo-helper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frytswd%2Fcli-demo-helper/lists"}