{"id":18377806,"url":"https://github.com/wszqkzqk/varallel","last_synced_at":"2026-01-23T03:52:53.321Z","repository":{"id":224690250,"uuid":"763947274","full_name":"wszqkzqk/varallel","owner":"wszqkzqk","description":"A cross-platform and easy to use CLI tool to run commands in parallel","archived":false,"fork":false,"pushed_at":"2024-12-22T02:35:52.000Z","size":166,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-15T22:30:43.703Z","etag":null,"topics":["glib","parallel","vala"],"latest_commit_sha":null,"homepage":"","language":"Vala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-2.1","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wszqkzqk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-02-27T07:50:42.000Z","updated_at":"2024-12-22T02:35:56.000Z","dependencies_parsed_at":"2024-02-29T12:10:36.905Z","dependency_job_id":"fefc57a8-7b78-4dee-a3a5-1d28fe7db228","html_url":"https://github.com/wszqkzqk/varallel","commit_stats":null,"previous_names":["wszqkzqk/varallel"],"tags_count":24,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wszqkzqk%2Fvarallel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wszqkzqk%2Fvarallel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wszqkzqk%2Fvarallel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wszqkzqk%2Fvarallel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wszqkzqk","download_url":"https://codeload.github.com/wszqkzqk/varallel/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248347211,"owners_count":21088608,"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":["glib","parallel","vala"],"created_at":"2024-11-06T00:29:20.042Z","updated_at":"2026-01-23T03:52:53.277Z","avatar_url":"https://github.com/wszqkzqk.png","language":"Vala","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Varallel\n\n`varallel` is a simple and easy to use CLI tool to run commands in parallel. It is written in Vala, and with the use of GLib, it is cross-platform.\n\n## Build\n\n### Dependencies\n\n* Runtime:\n  * GLib\n* Build:\n  * Vala\n  * GLib\n  * Meson\n  * Ninja\n\n### Compile\n\nUse meson to configure the build environment and build the project.\n\n```bash\nmeson setup builddir\nmeson compile -C builddir\n```\n\n## Usage\n\n### Help\n\n```\nUsage:\n  varallel [OPTION…] command [:::|::::] [arguments]\n\nOptions:\n  -h, --help                  Show this message\n  -v, --version               Display version number\n  -j, --jobs=n                Run n jobs in parallel\n  -r, --colsep=EXPRESSION     Regex to split the argument\n  -q, --quiet                 Hide subcommands output\n  -s, --shell=SHELL           Manually set SHELL to run the command, set 'n' to disable to use any shell\n  --hide-bar                  Hide progress bar\n  --bar                       Show progress bar (Default behavior)\n  --print-only                Only print the command but not run\n  --color=WHEN                Enable color output, options are 'always', 'never', or 'auto'\n\nReplacements in command:\n  {}                          Input argument\n  {.}                         Input argument without extension\n  {/}                         Basename of input line\n  {//}                        Dirname of input line\n  {/.}                        Basename of input line without extension\n  {#}                         Job index, starting from 1\n  {3} {2.} {4/} {1/.} etc.    Positional replacement strings\n  \nFor more information, or to report bugs, please visit:\n    \u003chttps://github.com/wszqkzqk/varallel\u003e\n```\n\n#### Explanation\n\n* `{}`\n  * Input argument. This replacement will be replaced by a full line read from the input source. The input source may be stdin (standard input), `:::`, or `::::`.\n* `{.}`\n  * Input argument without extension. This replacement string will be replaced by the input with the extension removed. If the input argument contains `.` after the last `/` the last `.` till the end of the string will be removed and `{.}` will be replaced with the remaining.\n    * E.g. `foo.webp` becomes `foo`, `subdir/foo.webp` becomes `subdir/foo`, `sub.dir/foo.webp` becomes `sub.dir/foo`, `sub.dir/bar` remains `sub.dir/bar`. If the input argument does not contain. it will remain unchanged.\n* `{/}`\n  * Basename of input argument. This replacement string will be replaced by the input with the directory part removed.\n* `{//}`\n  * Dirname of input argument. This replacement string will be replaced by the dir of the input argument.\n* `{/.}`\n  * Basename of Input argument without extension. This replacement string will be replaced by the input with the directory and extension part removed. It is a combination of `{/}` and `{.}`. \n* `{#}`\n  * Sequence number of the job to run. This replacement string will be replaced by the sequence number of the job being run. Starting from `1`.\n* `{3}` `{2.}` `{4/}` `{1/.}` `{5//}` etc.\n  * Positional replacement strings. This replacement string will be replaced by the corresponding positional argument group. The first group is `{1}`, the second is `{2}`, and so on. Positional arguments can be combined with other replacement options.\n* `:::`\n  * Read the argument list from the command line.\n* `::::`\n  * Read the argument list from the files provided as the argument.\n* `-j=n` `--jobs=n`\n  * Run n jobs in parallel. The default value is the number of logical CPU cores.\n* `-r=EXPRESSION` `--colsep=EXPRESSION`\n  * User-defined regex to split the argument.\n* `-q` `--quiet`\n  * Hide subcommands output.\n* `-s=SHELL` `--shell=SHELL`\n  * Manually set SHELL to run the command, set it to `n` to disable to use any shell, and the subcommands will be spawned directly.\n  * If the `--shell` option is not provided, the program will use the shell specified in the **`SHELL` environment variable** in **Unix-like systems**, and **directly spawn the subcommands** in **Windows**.\n  * Note: If you use `cmd.exe`, `powershell.exe` and `pwsh.exe` in Windows, arguments contains unicode characters will not be handled correctly.`\n* `--hide-bar`\n  * Hide progress bar.\n  * If both `--hide-bar` and `--bar` are provided, the program will take the last option.\n* `--bar`\n  * Show progress bar. (Default behavior)\n  * If both `--hide-bar` and `--bar` are provided, the program will take the last option.\n* `--print-only`\n  * Only print the command but not run.\n* `--color=WHEN`\n  * Enable color output. Options are `always`, `never`, or `auto`.\n  * If `--color` is not provided, the program will use the `auto` option.\n\n* If there are more than one `:::` or `::::` in the command line, the replacement strings will be the Cartesian product of the argument lists.\n  * Example:\n    * `varallel echo ::: 1 2 ::: a b`\n    * The command will be run with the following arguments:\n      * `echo 1 a`\n      * `echo 1 b`\n      * `echo 2 a`\n      * `echo 2 b`\n\n### Examples\n\n`varallel` can read the argument lists from pipes, files or command line.\n\n#### Use pipes\n\n`varallel` can read the argument lists from pipes.\n\n```bash\nseq 1 6 | varallel echo\nvarallel echo \u003c \u003c(seq 3 7)\n```\n\nTip: You may also use `varallel` with `find` command:\n\n```bash\nfind . -name '*.txt' | varallel cat\nfind . -type f | varallel 'echo \"{}\"'\n```\n\n#### Use command lines\n\n`varallel` can read the argument lists from the command line.\n\n```bash\nvarallel echo ::: 1 2 3 4 5 6\nvarallel 'echo \"{.} {/} {#} {//}\"' ::: /home/wszqkzqk ./README.md ~/Pictures/Arch_Linux_logo.svg\nvarallel 'echo \"{1/} {0} {1.}\"' ::: a b c d e f g ::: /home/wszqkzqk ./README.md ~/Pictures/Arch_Linux_logo.svg\n```\n\n#### Use files\n\nAlso, `varallel` can read the argument lists from files.\n\n```bash\nvarallel echo :::: example.txt file*.txt\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwszqkzqk%2Fvarallel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwszqkzqk%2Fvarallel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwszqkzqk%2Fvarallel/lists"}