{"id":28445672,"url":"https://github.com/cheesecake87/pyqwe","last_synced_at":"2026-02-27T12:43:09.719Z","repository":{"id":230242307,"uuid":"778860044","full_name":"CheeseCake87/pyqwe","owner":"CheeseCake87","description":"Run commands quickly from the pyproject.toml (or pyqwe.toml) file.","archived":false,"fork":false,"pushed_at":"2025-06-15T06:09:22.000Z","size":131,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-18T23:39:41.364Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/CheeseCake87.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-03-28T14:52:25.000Z","updated_at":"2025-06-15T05:33:00.000Z","dependencies_parsed_at":"2024-03-28T16:29:18.439Z","dependency_job_id":"546dbcc8-e5bb-4dee-a865-88802b78608c","html_url":"https://github.com/CheeseCake87/pyqwe","commit_stats":null,"previous_names":["cheesecake87/qwe","cheesecake87/pyqwe"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/CheeseCake87/pyqwe","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CheeseCake87%2Fpyqwe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CheeseCake87%2Fpyqwe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CheeseCake87%2Fpyqwe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CheeseCake87%2Fpyqwe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CheeseCake87","download_url":"https://codeload.github.com/CheeseCake87/pyqwe/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CheeseCake87%2Fpyqwe/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29895474,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-27T12:09:13.686Z","status":"ssl_error","status_checked_at":"2026-02-27T12:09:13.282Z","response_time":57,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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-06-06T10:13:37.083Z","updated_at":"2026-02-27T12:43:09.671Z","avatar_url":"https://github.com/CheeseCake87.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🏎️💨 pyqwe\n\nThe Quick Work Environment for Python.\n\n[![PyPI version](https://img.shields.io/pypi/v/pyqwe)](https://pypi.org/project/pyqwe/)\n[![License](https://img.shields.io/github/license/CheeseCake87/pyqwe)](https://raw.githubusercontent.com/CheeseCake87/pyqwe/main/LICENSE)\n\nRun commands quickly from the pyproject.toml (or pyqwe.toml) file.\n\n```bash\npip install pyqwe\n```\n\n---\n\n\u003c!-- TOC --\u003e\n\n* [🏎️💨 pyqwe](#-pyqwe)\n    * [Usage](#usage)\n    * [Python commands](#python-commands)\n        * [Package example](#package-example)\n        * [Module example](#module-example)\n    * [*:... commands (terminal)](#-commands-terminal)\n        * [Run as shell](#run-as-shell)\n        * [Change the working directory](#change-the-working-directory)\n    * [Grouped commands](#grouped-commands)\n    * [Waiting before starting a runner](#waiting-before-starting-a-runner)\n    * [Using environment variables](#using-environment-variables)\n    * [Clearing the terminal setting](#clearing-the-terminal-setting)\n    * [Other commands](#other-commands)\n\n\u003c!-- TOC --\u003e\n\n## Usage\n\nAdd commands to the pyproject.toml or pyqwe.toml file.\n\n🚨**NOTE** - If you have both a pyproject.toml and a pyqwe.toml file, the pyqwe.toml\nfile will be used and the pyproject.toml file will be ignored.\n\n```toml\n[tool.pyqwe]\nflask = \"flask_app:run\"\nsay_hello = \"*:echo Hello World\"\n```\n\nIf you're using a pyqwe.toml file you can drop the `[tool.pyqwe]`\n\n```toml\nflask = \"flask_app:run\"\nsay_hello = \"*:echo Hello World\"\n```\n\nTo see information on the available commands in the toml file you can run:\n\n```bash\npyqwe list\n# or\npyqwe ls\n# or\nqwe list\n# or\nqwe ls\n```\n\nYou can run the commands by using the command name:\n\n```bash\npyqwe flask\n# or\nqwe flask\n```\n\nRunning `pyqwe` or `qwe` without any option or command \nwill show all available commands\nin a menu you can choose from.\n\n```bash\npyqwe\n# or\nqwe\n```\n\n```text\n🚥|🏎️\n0 : Exit\n1 : flask\n2 : say_hello\nSelect a command to run [0]:\n```\n\nChoosing `1` will run the `flask` command.\n\n## Python commands\n\nFor Python, the commands are structured like (package \u0026/ module):function\n\n### Package example\n\n```text\nproject/\n    flask_app/\n        __init__.py\n```\n\n```toml\n[tool.pyqwe]\nflask = \"flask_app:run\"\n```\n\nThis command will run the function\n`run()` from the `__init__.py` file in the `flask_app` package.\n\n### Module example\n\n```text\nproject/\n    app.py\n```\n\n```toml\n[tool.pyqwe]\nflask = \"app:run\"\n```\n\nThis command will run the function\n`run()` from the `app.py` file.\n\nNow run the pyqwe command:\n\n```bash\npyqwe flask\n```\n\nThis will start the Flask app.\n\n## *:... commands (terminal)\n\nAny command that starts with `*` will be run using subprocess.\n\nFor example:\n\n```toml\n[tool.pyqwe]\nsay_hello = \"*:echo Hello World\"\n```\n\nNow running the pyqwe command:\n\n```bash\npyqwe say_hello\n```\n\nWill print `Hello World`.\n\n### Run as shell\n\nTo run the command as a subprocess shell command, add the `shell` key to the\ncommand.\n\n```toml\n[tool.pyqwe]\nsay_hello = \"*shell:echo Hello World\"\n```\n\n### Change the working directory\n\nYou can change the working directory of a subprocess by adding the folder\nwithin parentheses to the command, `(node_app)` for example.\n\n**The folder must be relative** to the pyproject.toml file.\n\n**Absolute paths are not supported**.\n\n**Moving up directories is not supported**, `../node_app` for example.\n\n```toml\n[tool.pyqwe]\nnpm_install = \"*(node_app):npm install\"\n```\n\nThe `shell` key is still available when changing the directory.\n\n```toml\n[tool.pyqwe]\nnpm_install = \"*shell(node_app):npm i\"\n```\n\n## Grouped commands\n\nYou can group commands together in a list to have one pyqwe command run\nmultiple commands.\n\nGrouped commands can also be run in Step, Sync, or Async mode. Async being the\ndefault.\n\nThis will run the commands in the group in sequence, pausing for confirmation\nbetween each command:\n\n```toml\n[tool.pyqwe]\ngroup = [\n    \"@step\",\n    \"*:echo 'Hello, World! 1'\",\n    \"*:echo 'Hello, World! 2'\",\n    \"*:echo 'Hello, World! 3'\"\n]\n```\n\nThis will run the commands in the group in sequence, one after the other:\n\n```toml\n[tool.pyqwe]\ngroup = [\n    \"@sync\",\n    \"*:echo 'Hello, World! 1'\",\n    \"*:echo 'Hello, World! 2'\",\n    \"*:echo 'Hello, World! 3'\"\n]\n```\n\nThis will run the commands in the group in parallel:\n\n```toml\n[tool.pyqwe]\ngroup = [\n    \"@async\",\n    \"*:echo 'Hello, World! 1'\",\n    \"*:echo 'Hello, World! 2'\",\n    \"*:echo 'Hello, World! 3'\"\n]\n```\n\nOf course, you can leave out the `@step`, `@sync` or `@async` to use the\ndefault async mode.\n\nFor example, this will also run the commands in the group in parallel:\n\n```toml\n[tool.pyqwe]\ngroup = [\n    \"*:echo 'Hello, World! 1'\",\n    \"*:echo 'Hello, World! 2'\",\n    \"*:echo 'Hello, World! 3'\"\n]\n```\n\n## Waiting before starting a runner\n\nSometimes you might need to have a runner wait before starting. This might\nbe the case if you have a group of runners in async mode but one runner\nconnects to another.\n\nYou can tell a runner to sleep for a number of seconds by using the sleep\nfor marker:\n\n```toml\n[tool.pyqwe]\ngroup = [\n    \"@async\",\n    \"*:~10~ echo 'Hello, World! 1'\",\n    \"*:echo 'Hello, World! 2'\",\n    \"*:echo 'Hello, World! 3'\"\n]\n```\n\nThis also works on module runs:\n\n```toml\n[tool.pyqwe]\nflask = \"~10~ flask_app:run\"\n```\n\nEach of the examples above will sleep for 10 seconds before the runner will\nstart.\n\n## Using environment variables\n\nTo use environment variables in the command, use the `{{ }}`\nmarkers.\n\npyqwe will evaluate any environment variables that are set before running any\ncommands.\n\nIf pyqwe detects an environment variable that is not set, it will raise an\nerror. An error will\nalso be raised if environment variables are detected, and you do not have\n`python-dotenv` installed.\n\nHere's an example of setting an environment variable in a command:\n\n```toml\n[tool.pyqwe]\ntalk = \"*shell:echo {{MESSAGE}}\"\n```\n\npyqwe uses `load_dotenv()` from `python-dotenv` to load the `.env` file. You\ncan change the name of the file to load, or\nadd multiple env files by setting the `__env_files__` settings key.\n\n```toml\n[tool.pyqwe]\n__env_files__ = [\".env\", \".env.local\"]\ntalk = \"*shell:echo {{MESSAGE}}\"\n```\n\nThis is the same as running `load_dotenv(\".env\")` and\n`load_dotenv(\".env.local\")`.\n\nIf you want to disable pyqwe from doing anything with environment variables,\nyou can set the `__env_ignore__` settings\nkey to `true`.\n\n```toml\n[tool.pyqwe]\n__env_ignore__ = true\ntalk = \"*shell:echo {{MESSAGE}}\"\n```\n\nThis will disable the environment variable evaluation and loading of the `.env`\nfile, and result in `{{MESSAGE}}` being\nprinted to the console in this case.\n\n## Clearing the terminal setting\n\nSetting the `__clear_terminal__` setting option to true will clear the\nterminal immediately after the `pyqwe` command is run. Results may very on\nthis setting between terminals and OS platforms.\n\nThis option is set to false by default.\n\n```toml\n[tool.pyqwe]\n__clear_terminal__ = true\ntalk = \"*shell:echo {{MESSAGE}}\"\n```\n\n## Other commands\n\n`pyqwe` `-h` or `--help` will display help information.\n\n`pyqwe` `--version` or `-v` will display the version of pyqwe.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcheesecake87%2Fpyqwe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcheesecake87%2Fpyqwe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcheesecake87%2Fpyqwe/lists"}