{"id":33185818,"url":"https://github.com/docsion/rfsh","last_synced_at":"2025-11-27T00:01:05.928Z","repository":{"id":194743482,"uuid":"691485097","full_name":"docsion/rfsh","owner":"docsion","description":"RFSH: Run shell scripts in batch, concurrently, fully customized with variable .","archived":false,"fork":false,"pushed_at":"2023-12-14T07:49:13.000Z","size":28497,"stargazers_count":20,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-04-22T04:50:41.480Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/docsion.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-09-14T09:19:33.000Z","updated_at":"2024-03-17T05:53:00.000Z","dependencies_parsed_at":"2023-09-15T00:01:30.852Z","dependency_job_id":"7b246ecb-8e47-4551-ae05-86e705c5084f","html_url":"https://github.com/docsion/rfsh","commit_stats":null,"previous_names":["docsion/rfsh"],"tags_count":24,"template":false,"template_full_name":null,"purl":"pkg:github/docsion/rfsh","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/docsion%2Frfsh","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/docsion%2Frfsh/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/docsion%2Frfsh/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/docsion%2Frfsh/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/docsion","download_url":"https://codeload.github.com/docsion/rfsh/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/docsion%2Frfsh/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286079811,"owners_count":27282121,"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","status":"online","status_checked_at":"2025-11-26T02:00:06.075Z","response_time":193,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2025-11-16T05:00:20.102Z","updated_at":"2025-11-27T00:01:05.911Z","avatar_url":"https://github.com/docsion.png","language":"Shell","funding_links":[],"categories":["\u003ca name=\"system\"\u003e\u003c/a\u003eSystem tools"],"sub_categories":[],"readme":"\u003ca href=\"https://github.com/docsion/rfsh\"\u003e\n  \u003cpicture\u003e\n    \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://github.com/docsion/rfsh/blob/main/static/rfsh_banner_v6_dark.png\"\u003e\n    \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"https://github.com/docsion/rfsh/blob/main/static/rfsh_banner_v6.png\"\u003e\n    \u003cimg alt=\"RFSH: Supercharge your shell scripts - Running shell scripts in batch, concurrently, fully customized with variable .\" src=\"https://github.com/docsion/rfsh/blob/main/static/rfsh_banner_v6.png\"\u003e\n  \u003c/picture\u003e\n\n  \u003ch1 align=\"left\"\u003eRFSH\u003c/h1\u003e\n\u003c/a\u003e\n\n[![Releases](https://img.shields.io/github/v/release/docsion/rfsh.svg?style=flat?maxAge=86400)](https://github.com/docsion/rfsh/releases)\n[![Downloads](https://img.shields.io/github/downloads/docsion/rfsh/total?maxAge=3600)](https://github.com/docsion/rfsh#install)\n\n\u003e @RUNFLOW_SH\n\n\u003cp align=\"left\"\u003e\n    Run shell scripts in batch, concurrently, fully customized with variable .\n\u003c/p\u003e\n\n\n## What is it?\nAt the first point of view, I want to create a tool which can help our team run the bash script easier, faster, safer, with clearly reports, so I build RFSH.\n\nYou put a .csv file, a bash script as a template file, RFSH will take care the rest, then you will receive the clearly reports after all. Things happen on your machine, safe and sound.\n\n## How it works?\nRFSH works by 3 simple steps:\n1. Parse your .csv file to a list of variable and its value, `variable_name` defined at the first row of the .csv file.\n2. Combine value + template file, by `{{variable_name}}` matching, to scripts.\n3. Run scripts concurrently.\n\n## Features\n1. Concurrently run template with values from a CSV file, http/https URL, Github, Google Spreadsheet or stdin.\n2. Effectively run with rate limit, retries on failure, dry run.\n3. Generate an all-in-one job file which contains input data, template script, command flags that can run anywhere.\n4. Test with script template.\n5. Customize exports file's column.\n6. Send reports to remotely stream. Support: telegram.\n\n## Sample\n\n![RFSH Sample](https://raw.githubusercontent.com/docsion/rfsh/main/static/sample%20hn%20v2.png)\n\n\u003ctable style=\"float: left; width: 180px; margin: 0 25px 25px 25px; border-collapse: collapse\"\u003e\n  \u003ctr\u003e\n    \u003ctd valign=\"top\"\u003e\n\t\u003cimg src=\"https://raw.githubusercontent.com/docsion/rfsh/main/static/sample%20echo%20v2.png\" alt=\"RFSH Sample - Echo\" width=\"250\"/\u003e\n    \u003c/td\u003e\n    \u003ctd valign=\"top\"\u003e\n\t\u003cimg src=\"https://raw.githubusercontent.com/docsion/rfsh/main/static/sample%20coffee%20v2.png\" alt=\"RFSH Sample - Coffee\" width=\"250px\"/\u003e\n    \u003c/td\u003e\n    \u003ctd valign=\"top\"\u003e\n\t\u003cimg src=\"https://raw.githubusercontent.com/docsion/rfsh/main/static/sample%20hn%20v2.png\" alt=\"RFSH Sample - Hn\" width=\"250\"/\u003e\n    \u003c/td\u003e\n    \u003ctd valign=\"top\"\u003e\n\t\u003cimg src=\"https://raw.githubusercontent.com/docsion/rfsh/main/static/sample%20meme%20v2.png\" alt=\"RFSH Sample - Meme\" width=\"250\"/\u003e\n    \u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n\u003cdetails\u003e\n  \u003csummary\u003e 🎥 Sample Test Runs\u003c/summary\u003e\n  \u003chr\u003e\n  \u003cvideo src=\"https://github.com/docsion/rfsh/assets/4256921/f1cb9c5c-ce37-4b93-b226-27ed25ffda7d\" type=\"video/mp4\"\u003e\u003c/video\u003e\n  \u003ca href=\"https://github.com/docsion/rfsh/assets/4256921/f1cb9c5c-ce37-4b93-b226-27ed25ffda7d\"\u003eRaw link (Just in case the video player does not work)\u003c/a\u003e\n \u003c/details\u003e\n\n### Basic\n ```\nrunflow basic -i sample/sample.csv -t sample/sample.template\n```\n\nOr run the following stand-alone job script.\n ```\ncurl https://raw.githubusercontent.com/docsion/rfsh/main/sample/4411d688-6988-11ee-a507-f297ad799bdb.sh | sh\n#\n# |- generated by:\n# |- $ runflow --generate-job basic -i https://github.com/docsion/rfsh/blob/main/sample/sample.csv -t https://github.com/docsion/rfsh/blob/main/sample/sample.template\n```\n\nYou can find more examples at [test.sh](test.sh).\n\n## Install\nRun the following install script to install the latest version of RFSH:\n```\ncurl https://raw.githubusercontent.com/docsion/rfsh/main/i.sh | sh\n```\n\n## Command\n\n### help\n```\n$ runflow help\nrunflow - Supercharge your shell scripts - Run shell scripts in batch, concurrently, fully customized with variable .\nUsage: runflow [options...] command [options...]\n\nCommands:\n   basic    Execute a basic flow .\n   version  Show the version .\n\nOptions:\n   --generate-job       Generate an all-in-one job file which contains input data, template script, command flags that can run anywhere .\n   --auth-phrase value  Provide an auth phrase to automatically authenticate the running flow as your *supercharge* .\n   --built-in           Print built-in functions .\n   --meme               *Supercharge* Show meme at the end of reports .\n\nAuthor:\n   Beast. D \u003cbeast@docsion.com\u003e\n\nCopyright:\n   (c) 2023 Docsion Team .\n```\n\n### basic\n```\n$ runflow basic\nrunflow basic - Execute a basic flow .\nUsage: runflow basic [options...]\n\nDescription:\n   Concurrently run a template with values from a CSV file .\n   Example: $runflow basic -i sample.csv -t sample.template\n   More info: https://github.com/docsion/rfsh#sample\n\nOptions:\n   -i file, --input file            CSV file with values in comma-separated format. Headers define variable_name(s). Support: file, url (http/https), github, spreadsheets . (default: \"std\")\n   -t file, --template file         Location of the template file. Variables are in the format {{variable_name}}. Support: file, url (http/https), github .\n   -o file, --output file           Location of the export file .\n   --test-template file             Location of the test template file, which use to validate running result. More info: https://github.com/docsion/rfsh#--test-template .\n   --export-template file           Location of the export template file, which use to customize output file. More info: https://github.com/docsion/rfsh#--export-template .\n   --retries value                  Number of retries on failure . (default: 0)\n   --concurrent value               Number of concurrent workers . (default: 4)\n   --rate-limit value               Rate limit. Usage: \u003cnumber request\u003e,\u003cn seconds\u003e. Example: 10,100 means 10 requests per 100 seconds .\n   --dry-run                        Only print the script to --output that would execute, without executing it .\n   --report-remote-stream value     Send reports to remotely stream. Support: telegram .\n   --report-telegram-token value    Telegram Bot Token. More info: https://github.com/docsion/rfsh#telegram .\n   --report-telegram-channel value  Telegram channel .\n   --continuous                     Run continuously on current job run until done . Note: --output must be fixed .\n```\n\n## Flag\n\n### --template\nTemplate is the require bash script when using RFSH. It's a bash script file, so you can write anything you want in bash. RFSH will pass the value from `--input` to your `--template` by matching `{{variable_name}}`. \n\nYou can find the sample at [sample/sample.template](https://github.com/docsion/rfsh/blob/main/sample/sample.template):\n\n ```\necho No. {{id}} {{content}} - {{philosopher}}\n```\n\nYou can also use [built-in](https://github.com/docsion/rfsh/blob/main/script/built_in.sh) functions in template file, likes [sample/built-in/item.template.sh](https://github.com/docsion/rfsh/blob/main/sample/built-in/item.template.sh):\n\n  ```\nrf_http https://hacker-news.firebaseio.com/v0/item/{{id}}.json\n```\n\n### --test-template\nYou can write test with `--test-template`. Runflow will pass the result as input data (stdin) to your test template file after running script. Please note that, the input result is base64 encoded as default. Use `exit` command to mark the result as bad. You can also retrive the variable with format `{{variable_name}}` .\n\nRun the following job script to explore how it works:\n ```\ncurl https://raw.githubusercontent.com/docsion/rfsh/main/sample/30969f5a-6369-11ee-a32e-f297ad799bdb.sh | sh\n#\n# |- generated by:\n# |- $ runflow --generate-job basic -i sample/sample.csv -t sample/sample.template --test-template sample/sample.test.template --export-template sample/sample.export.template\n```\n\nYou can find sample test at [sample/sample.test.template](https://github.com/docsion/rfsh/blob/main/sample/sample.test.template):\n ```\n# RESULT FROM SCRIPT RUNS\n# $RESULT_IN\n\n# TEST START HERE\nif [[ ! \"$RESULT_IN\" =~ \"{{id}}\" ]];\nthen \n\techo \"ops!!!\" \u003e\u00262 # print to stderr\n\texit 1\nfi\n\necho \"good\" \"{{content}}\"\n```\n\nOr using built-in function [sample/built-in/item.test.template.sh](https://github.com/docsion/rfsh/blob/main/sample/built-in/item.test.template.sh)\n ```\n# http status\nrf_asserts \"Status 200\" \\\n\t200 \\\n\t$(rf_result_in | jq -r '.response_code')\n```\n\n### --export-template\nIf you want to add more column the export .csv (--output) file. Use --export-template options. You receive the input JSON result (via stdin), customize then reply the output as JSON with format: `{\"new_column_name\": \"new_column_value\"}`. Please note that, the input result is base64 encoded as default. \n\nRun the following job script to explore how it works:\n ```\ncurl https://raw.githubusercontent.com/docsion/rfsh/main/sample/30969f5a-6369-11ee-a32e-f297ad799bdb.sh | sh\n#\n# |- generated by:\n# |- $runflow --generate-job basic -i sample/sample.csv -t sample/sample.template --test-template sample/sample.test.template --export-template sample/sample.export.template\n```\n\nYou can find sample test at [sample/sample.export.template](https://github.com/docsion/rfsh/blob/main/sample/sample.export.template):\n ```\n# RESULT FROM SCRIPT RUNS\n# $RESULT_IN\n\n# CUSTOM EXPORT START HERE\nvalue=\"ohhh!\"\n\n# THEN OUTPUT JSON\necho '{\"new_custom_column_name\": \"'$value'\"}'\n```\n\n### --built-in\nRFSH support built-in functions to help you writing template easier. You can find the latest built-in functions at [script/built_in.sh](https://github.com/docsion/rfsh/blob/main/script/built_in.sh). And, check it out [sample/built-in](https://github.com/docsion/rfsh/tree/main/sample/built-in) to understand how easy it is.\n\n### --auth-phrase\n\u003e Provide an auth phrase to automatically authenticate the running flow as your *supercharge*\n\nYou can find the --auth-phrase [here](auth_phrase.txt) for the period running flows (phrase will be expired in 3 months - You can renew it anytime, free \u0026 forever). Or Buy me a coffee ($1) with [ a Lifetime --auth-phrase](https://docsion.com/product/rfsh) (END SOON!!! 🏄‍♀️ 481/500 remains, thanks to 19 supporters 🙏).\n\n## Github\nYou can import an input or a template file from Github repository. Note that if you use private repository, please set `GITHUB_TOKEN` environment variable before running $runflow command. For example:\n ```\n$ GITHUB_TOKEN=\u003ctoken\u003e runflow basic -i https://github.com/my/privaterepo/blob/main/sample/sample.csv -t https://github.com/docsion/rfsh/blob/main/sample/sample.template\n```\n\nYou can find Github guideline [here](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens#creating-a-personal-access-token-classic) to generate new token.\n\n## Telegram\nYou can send reports to Telegram with Telegram bots, check Telegram guidline [here](https://core.telegram.org/bots). Please note that, the channel must be in public.\n\n## Support\n- Beast. D \u003cbeast@docsion.com\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdocsion%2Frfsh","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdocsion%2Frfsh","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdocsion%2Frfsh/lists"}