{"id":16278588,"url":"https://github.com/sigoden/runme","last_synced_at":"2025-07-04T07:34:57.468Z","repository":{"id":60047428,"uuid":"540476643","full_name":"sigoden/runme","owner":"sigoden","description":"[Deprecatd] A shell-script based task runner.","archived":false,"fork":false,"pushed_at":"2023-06-02T03:02:47.000Z","size":129,"stargazers_count":14,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-29T13:13:38.915Z","etag":null,"topics":["build-tool","devops","make","make-alternitive","runmefile","rust","task-automation","task-runner"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sigoden.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","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":"2022-09-23T14:22:20.000Z","updated_at":"2025-02-21T15:55:30.000Z","dependencies_parsed_at":"2024-10-27T21:40:47.463Z","dependency_job_id":"3e8b2189-3ae1-4c0c-b978-a82326264ae1","html_url":"https://github.com/sigoden/runme","commit_stats":{"total_commits":35,"total_committers":1,"mean_commits":35.0,"dds":0.0,"last_synced_commit":"3c6c0e99ab725e2e0c3008d8f72c956fba5e06d2"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/sigoden/runme","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sigoden%2Frunme","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sigoden%2Frunme/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sigoden%2Frunme/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sigoden%2Frunme/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sigoden","download_url":"https://codeload.github.com/sigoden/runme/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sigoden%2Frunme/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262834928,"owners_count":23371862,"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":["build-tool","devops","make","make-alternitive","runmefile","rust","task-automation","task-runner"],"created_at":"2024-10-10T18:59:05.232Z","updated_at":"2025-07-04T07:34:57.435Z","avatar_url":"https://github.com/sigoden.png","language":"Rust","readme":"# Runme (Deprecated, use [argc](https://github.com/sigoden/argc) instead)\n\n[![CI](https://github.com/sigoden/runme/actions/workflows/ci.yaml/badge.svg)](https://github.com/sigoden/runme/actions/workflows/ci.yaml)\n[![Crates](https://img.shields.io/crates/v/runme.svg)](https://crates.io/crates/runme)\n\nA shell-script based task runner.\n\n![demo](https://user-images.githubusercontent.com/4012553/224712229-fdb08a5b-f04a-4b32-85b5-aae020f87096.gif)\n\n## Install\n\n### With cargo\n\n```\ncargo install --force runme\n```\n\n### Binaries on macOS, Linux, Windows\n\nDownload from [Github Releases](https://github.com/sigoden/runme/releases), unzip and add runme to your $PATH.\n\n### GitHub Actions\n\n[extractions/setup-crate](https://github.com/marketplace/actions/setup-crate) can be used to install just in a GitHub Actions workflow.\n\n```yaml\n- uses: extractions/setup-crate@v1\n  with:\n    owner: sigoden\n    name: runme\n```\n\n## Get Started\n\nFirst, run `runme --runme-create build test` to quickly create boilerplate `Runmefile.sh`\n\n```sh\n#!/usr/bin/env bash\n\n# @cmd build project\n# @alias b\nbuild() {\n    echo Run build\n}\n\n# @cmd test project\ntest() {\n    echo Run test\n}\n\neval \"$(runme --runme-eval \"$0\" \"$@\")\"\n```\n\n\u003e To define a new task, simply create the bash function and add the [`@cmd`](https://github.com/sigoden/argc#cmd) above it.  **Task is just function**\n\n```\n$ runme -h\nUSAGE: Runmefile.sh \u003cCOMMAND\u003e\n\nCOMMANDS:\n  build  build project [aliases: b]\n  test   test project\n\n$ runme test\nRun test\n$ runme b\nRun build\n```\n\n\u003e Runme uses [`argc`](https://github.com/sigoden/argc) to parse Runmefile.\n\n## Features\n\n### Cross platform\n\n`runme` binary is available in linux, macos, and windows.\n\n`runme` depends on bash which already built into linux/macos. In windows, runme automatically locates and uses bash that comes with **git** by default.\n\nGnu tools like `ls`, `rm`, `grep`, `sed`, `awk`... also provided with bash, so you can uses them freely and confidently in the Runmefile.\n\n### Task parameters\n\nUse [comment tags](https://github.com/sigoden/argc#comment-tags) to define task parameters.\n\n- [`@arg`](https://github.com/sigoden/argc#arg): define positional argument\n- [`@option`](https://github.com/sigoden/argc#option): define option argument\n- [`@flag`](https://github.com/sigoden/argc#flag): define flag argument\n\n```sh\n# @cmd Download a file\n# @alias    d\n# @flag     -f --force              Override existing file\n# @option   -t --tries \u003cNUM\u003e        Set number of retries to NUM\n# @arg      source!                 Url to download from\n# @arg      target                  Save file to\ndownload() {\n    echo \"cmd:                      download\"\n    echo \"flag:   --force           $argc_force\"\n    echo \"option: --tries           $argc_tries\"\n    echo \"arg:    source            $argc_source\"\n    echo \"arg:    target            $argc_target\"\n}\n```\n\n```\n$ runme download -h\nDownload a file\n\nUSAGE: Runmefile.sh download [OPTIONS] \u003cSOURCE\u003e [TARGET]\n\nARGS:\n  \u003cSOURCE\u003e  Url to download from\n  [TARGET]  Save file to\n\nOPTIONS:\n  -f, --force        Override existing file\n  -t, --tries \u003cNUM\u003e  Set number of retries to NUM\n  -h, --help         Print help information\n```\n\n```\n$ runme download  -f --tries 3 from.txt to.txt\ncmd:                      download\nflag:   --force           1\noption: --tries           3\narg:    source            from.txt\narg:    target            to.txt\n```\n\nYou can also use shell variables to access task parameters.\n\n```sh\n# @cmd\nrun() {\n  echo $2 $1 $#\n}\n```\n```\n$ runme run foo bar\nbar foo 2\n```\n\n### Task aliases\n\n```sh\n# @cmd\n# @alias t,tst\ntest() {\n  echo \"Test...\"\n}\n```\n\n```\n$ runme t\nTest...\n```\n\n### Task dependencies\n\nDependencies are established by function calling.\n\n```sh\n# @cmd\nbar() { foo;\n  echo bar\nbaz; }\n\n# @cmd\nfoo() {\n  echo foo\n}\n\n# @cmd\nbaz() { \n  echo baz\n}\n```\n\n```\n$ runme bar\nfoo\nbar\nbaz\n```\n\n### Task group\n\nTasks can be semantically grouped with `_`, `-`, `@`, `.`, `:`.\n\n```sh\n# @cmd\ntest@unit() {}\n# @cmd\ntest@bin() {}\n\n# @cmd\napp.build() {}\n# @cmd\napp.test() {}\n```\n\n### Default task\n\nWhen `runme` is invoked without a task name, it runs the `main` function. \nIf the `main` function does not exist, runme will print help information.\n\n```sh\nmain() { \n  foo\n}\n\n# @cmd\nfoo() {\n  echo foo\n}\n```\n\n```\n$ runme\nfoo\n```\n\n## Advanced Topics\n\n### Completions\n\n[Shell completion scripts](completions) are available for bash/zsh/fish/powershell.\n\n### Customize shell path\n\nYou can use environment variable `RUNME_SHELL` to customize shell path.\n\n```\nRUNME_SHELL=\"C:\\\\Program Files\\\\Git\\\\bin\\\\bash.exe\"\n```\n### Customize script name\n\nBy default, runme searches for runme script file of the following:\n\n- Runmefile.sh or Runmefile\n- runmefile.sh or runmefile\n- RUNMEFILE.sh or RUNMEFILE\n\nYou can use environment variable `RUNME_SCRIPT` to custom script name.\n\n```\nRUNME_SCRIPT=taskfile.sh\n```\n## License\n\nCopyright (c) 2022 runme-developers.\n\nrunme is made available under the terms of either the MIT License or the Apache License 2.0, at your option.\n\nSee the LICENSE-APACHE and LICENSE-MIT files for license details.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsigoden%2Frunme","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsigoden%2Frunme","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsigoden%2Frunme/lists"}