{"id":35670238,"url":"https://github.com/wylee/runcommands","last_synced_at":"2026-01-05T19:01:10.469Z","repository":{"id":62584459,"uuid":"82964784","full_name":"wylee/runcommands","owner":"wylee","description":"Simple command/task runner that uses Python's standard library argparse under the hood","archived":false,"fork":false,"pushed_at":"2025-01-25T03:10:19.000Z","size":899,"stargazers_count":10,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"dev","last_synced_at":"2025-09-29T12:26:48.906Z","etag":null,"topics":["argparse","command-line","commands","completion","console-scripts","python","python3","runner","tasks"],"latest_commit_sha":null,"homepage":"https://runcommands.readthedocs.io/","language":"Python","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/wylee.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGELOG.md","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":"2017-02-23T19:44:07.000Z","updated_at":"2025-02-01T18:55:01.000Z","dependencies_parsed_at":"2023-01-25T13:45:28.593Z","dependency_job_id":null,"html_url":"https://github.com/wylee/runcommands","commit_stats":null,"previous_names":[],"tags_count":70,"template":false,"template_full_name":null,"purl":"pkg:github/wylee/runcommands","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wylee%2Fruncommands","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wylee%2Fruncommands/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wylee%2Fruncommands/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wylee%2Fruncommands/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wylee","download_url":"https://codeload.github.com/wylee/runcommands/tar.gz/refs/heads/dev","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wylee%2Fruncommands/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28218047,"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":"2026-01-05T02:00:06.358Z","response_time":57,"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":["argparse","command-line","commands","completion","console-scripts","python","python3","runner","tasks"],"created_at":"2026-01-05T19:00:21.518Z","updated_at":"2026-01-05T19:01:10.463Z","avatar_url":"https://github.com/wylee.png","language":"Python","readme":"RunCommands\n+++++++++++\n\nA simple command runner that uses ``argparse`` from the Python standard\nlibrary under the hood. Runs on Python 3 only (3.9 and up). Uses\nannotations to configure options.\n\nThere are two basic use cases:\n\n1. Standalone console scripts (including scripts with subcommands).\n2. Collections of commands (similar to make, Fabric, etc).\n\nBuilding on these, especially #2, there are a couple of more advanced\nuse cases:\n\n1. A simple orchestration/deployment tool. If you have a simple build\n   process and just need to ``rsync`` some files to a server, a few\n   simple commands might be all you need.\n2. A wrapper for more sophisticated orchestration/deployment tools--an\n   alternative to the Bash scripts you might use to drive Ansible\n   playbooks and the like.\n\nBasic Usage\n===========\n\nDefine a command:\n\n.. code-block:: python\n\n    from runcommands import arg, command\n    from runcommands.commands import local\n\n    @command\n    def test(*tests: arg(help='Specific tests to run (instead of using discovery)')):\n        if tests:\n            local(('python', '-m', 'unittest', tests))\n        else:\n            local('python -m unittest discover .')\n\nShow its help::\n\n    \u003e run test -h\n    test [-h] [TESTS [TESTS ...]]\n\n    positional arguments:\n      TESTS       Specific tests to run (instead of using discovery)\n\n    optional arguments:\n      -h, --help  show this help message and exit\n\nRun it::\n\n    \u003e run test\n    ..........\n    ----------------------------------------------------------------------\n    Ran 0 tests in 0.000s\n\n    OK\n\nCreate a standalone console script using a standard setuptools entry\npoint:\n\n.. code-block:: toml\n\n    # pyproject.toml\n    [project.scripts]\n    my-test-script = \"package.module:test.console_script\"\n\nReinstall the package to install the script and then run it::\n\n    \u003e my-test-script\n    ..........\n    ----------------------------------------------------------------------\n    Ran 0 tests in 0.000s\n\n    OK\n\nSee the `main documentation`_ for more information on installation,\ndefining \u0026 running commands, configuration, etc.\n\nFeatures\n========\n\n* Easily create standalone console scripts: simply define a function and\n  wrap it with the ``@command`` decorator.\n* Easily create standalone console scripts that have subcommands (a la\n  ``git``).\n* Create collections of commands (similar to make, Fabric, etc).\n* Run multiple commands in sequence: ``run build deploy``.\n* Uses ``argparse`` under the hood so command line usage is familiar.\n* Provides built-in help/usage for all commands via ``argparse``.\n* Provides command line completion (including example scripts for bash\n  and fish).\n\nDocumentation\n=============\n\nDetailed documentation is on `Read the Docs`_.\n\nLicense\n=======\n\nMIT. See the LICENSE file in the source distribution.\n\nTODO\n====\n\n* Improve command line completion\n* Add more documentation and examples\n* Add more tests (current coverage is 45%)\n\n.. _main documentation: http://runcommands.readthedocs.io/\n.. _Read the Docs: `main documentation`_\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwylee%2Fruncommands","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwylee%2Fruncommands","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwylee%2Fruncommands/lists"}