Invenv
A tool to automatically create and run your Python scripts in a virtual environment with installed dependencies
Install / Use
/learn @jsnjack/InvenvREADME
invenv
invenv is a tool to run your Python scripts in an automatically created virtual
environment with installed dependencies.
It tries to simplify running Python scripts (or even applications!) by taking from you the burden of creating and maintaining virtual environments.
Description
Usage:
invenv [invenv-flags] -- [VAR=val] python-script.py [flags]
invenv [command]
Examples:
invenv -- somepath/myscript.py
invenv -n -- somepath/myscript.py --version
invenv -r req.txt -- DEBUG=1 somepath/myscript.py
Available Commands:
completion Generate the autocompletion script for the specified shell
help Help about any command
init initialize a virtual environment in the current directory
Flags:
-d, --debug enable debug mode with verbose output
-h, --help help for invenv
-n, --new-environment create a new virtual environment even if it already exists
-p, --python string use specified Python interpreter
-r, --requirements-file string use specified requirements file. If not provided, it
will try to guess the requirements file name:
requirements_<script_name>.txt, <script_name>_requirements.txt or
requirements.txt
-s, --silent silence progress output. --debug flag overrides this
-v, --version print version and exit
-w, --which print the location of virtual environment folder and exit. If
the virtual environment does not exist, it will be created with
installed requirements
Details
When you run invenv the first time it will:
- detect python interpreter which should be used to run your script (by analyzing shebang)
- in case if python interpreter is not found in your
PATH, it will try to use default python interpreter in your system - it is possible to specify a custom interpreter with
-pflag
- in case if python interpreter is not found in your
- create a virtual environment in
~/.local/invenv/folder - try to automatically install all dependencies from
requirements_<script_name>.txt,<script_name>_requirements.txtorrequirements.txtfiles (it is possible to specify a custom requirements file with-rflag) - run your script with all the arguments you passed
Next time you run invenv it will try to use the existing virtual environment and install
dependencies only if they are changed.
Installation
- Using grm
grm install jsnjack/invenv - Download binary from Release page
- One liner:
curl -s https://api.github.com/repos/jsnjack/invenv/releases/latest | jq -r .assets[0].browser_download_url | xargs curl -LOs && chmod +x invenv && sudo mv invenv /usr/local/bin/ - From COPR repository (Fedora, CentOS, RHEL and etc.)
dnf copr enable surfly/invenv dnf install invenv
Credits
- qguv for the original idea
Related Skills
node-connect
345.4kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
claude-opus-4-5-migration
104.6kMigrate prompts and code from Claude Sonnet 4.0, Sonnet 4.5, or Opus 4.1 to Opus 4.5
frontend-design
104.6kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
model-usage
345.4kUse CodexBar CLI local cost usage to summarize per-model usage for Codex or Claude, including the current (most recent) model or a full model breakdown. Trigger when asked for model-level usage/cost data from codexbar, or when you need a scriptable per-model summary from codexbar cost JSON.
