{"id":23197196,"url":"https://github.com/jsnjack/invenv","last_synced_at":"2025-08-18T22:32:40.649Z","repository":{"id":204570010,"uuid":"712163344","full_name":"jsnjack/invenv","owner":"jsnjack","description":"A tool to automatically create and run your Python scripts in a virtual environment with installed dependencies","archived":false,"fork":false,"pushed_at":"2024-07-06T10:10:46.000Z","size":67,"stargazers_count":19,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-07-06T11:26:54.851Z","etag":null,"topics":["python","python-venv","python-virtual-environment","python-virtualenv"],"latest_commit_sha":null,"homepage":"","language":"Go","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/jsnjack.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}},"created_at":"2023-10-30T23:22:01.000Z","updated_at":"2024-07-06T10:10:45.000Z","dependencies_parsed_at":"2023-11-19T21:26:15.429Z","dependency_job_id":"9a30304d-f846-46d7-b6d6-1656c51ecdd6","html_url":"https://github.com/jsnjack/invenv","commit_stats":null,"previous_names":["jsnjack/ave","jsnjack/venv","jsnjack/invenv"],"tags_count":26,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsnjack%2Finvenv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsnjack%2Finvenv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsnjack%2Finvenv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsnjack%2Finvenv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jsnjack","download_url":"https://codeload.github.com/jsnjack/invenv/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230286550,"owners_count":18202722,"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":["python","python-venv","python-virtual-environment","python-virtualenv"],"created_at":"2024-12-18T14:28:54.889Z","updated_at":"2024-12-18T14:28:55.693Z","avatar_url":"https://github.com/jsnjack.png","language":"Go","readme":"invenv\n==============\n\n`invenv` is a tool to run your Python scripts in an automatically created virtual\nenvironment with installed dependencies.\n\nIt tries to simplify running Python scripts (or even applications!) by taking\nfrom you the burden of creating and maintaining virtual environments.\n\n### Description\n```\nUsage:\n  invenv [invenv-flags] -- [VAR=val] python-script.py [flags]\n  invenv [command]\n\nExamples:\ninvenv -- somepath/myscript.py\ninvenv -n -- somepath/myscript.py --version\ninvenv -r req.txt -- DEBUG=1 somepath/myscript.py\n\nAvailable Commands:\n  completion  Generate the autocompletion script for the specified shell\n  help        Help about any command\n  init        initialize a virtual environment in the current directory\n\nFlags:\n  -d, --debug                      enable debug mode with verbose output\n  -h, --help                       help for invenv\n  -n, --new-environment            create a new virtual environment even if it already exists\n  -p, --python string              use specified Python interpreter\n  -r, --requirements-file string   use specified requirements file. If not provided, it\n                                   will try to guess the requirements file name:\n                                   requirements_\u003cscript_name\u003e.txt, \u003cscript_name\u003e_requirements.txt or\n                                   requirements.txt\n  -s, --silent                     silence progress output. --debug flag overrides this\n  -v, --version                    print version and exit\n  -w, --which                      print the location of virtual environment folder and exit. If\n                                   the virtual environment does not exist, it will be created with\n                                   installed requirements\n\n```\n\n### Details\nWhen you run `invenv` the first time it will:\n - detect python interpreter which should be used to run your script (by analyzing shebang)\n   - in case if python interpreter is not found in your `PATH`, it will try to use default python interpreter in your system\n   - it is possible to specify a custom interpreter with `-p` flag\n - create a virtual environment in `~/.local/invenv/` folder\n - try to automatically install all dependencies from `requirements_\u003cscript_name\u003e.txt`, `\u003cscript_name\u003e_requirements.txt` or\n   `requirements.txt` files (it is possible to specify a custom requirements file with `-r` flag)\n - run your script with all the arguments you passed\n\nNext time you run `invenv` it will try to use the existing virtual environment and install\ndependencies only if they are changed.\n\n### Installation\n - Using [grm](https://github.com/jsnjack/grm)\n    ```bash\n    grm install jsnjack/invenv\n    ```\n - Download binary from [Release](https://github.com/jsnjack/invenv/releases/latest/) page\n - One liner:\n   ```bash\n   curl -s https://api.github.com/repos/jsnjack/invenv/releases/latest | jq -r .assets[0].browser_download_url | xargs curl -LOs \u0026\u0026 chmod +x invenv \u0026\u0026 sudo mv invenv /usr/local/bin/\n   ```\n - From COPR repository (Fedora, CentOS, RHEL and etc.)\n   ```bash\n   dnf copr enable surfly/invenv\n   dnf install invenv\n   ```\n\n### Credits\n- [qguv](https://github.com/qguv) for the original idea\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjsnjack%2Finvenv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjsnjack%2Finvenv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjsnjack%2Finvenv/lists"}