poetry-plugin-shell
Poetry plugin to run subshell with virtual environment activated
What it is and what it does
Poetry-plugin-shell is a Poetry plugin that adds a `shell` command to launch an interactive subshell with your project's virtual environment pre-activated. It detects your current shell automatically (or falls back to the SHELL or COMSPEC environment variable) and creates the virtual environment if it doesn't exist. The plugin uses shellingham internally to identify the active shell, then spawns a new shell process with the venv activated—you exit with `exit` rather than `deactivate` to properly leave both the shell and the environment.
This plugin restores functionality that was previously built into Poetry itself. It depends on pexpect for subprocess interaction, poetry as the host framework, and shellingham for shell detection. The package supports Python 3.9 through 3.13 and is actively maintained.
Use it for:
- Quickly enter a project's virtual environment from the command line without manually sourcing activation scripts.
- Ensure a clean shell session with the correct venv activated when switching between Poetry projects.
- Automate shell setup in scripts or CI/CD workflows that need to run commands inside a Poetry project's environment.
- Detect and use the developer's preferred shell (bash, zsh, fish, etc.) automatically when activating the venv.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
A Poetry plugin that launches a subshell with the project's virtual environment automatically activated, replacing Poetry's built-in shell command.
Yes, if you use Poetry and want a convenient way to activate your project's virtual environment. Install friction is low, maintenance is active, and there are no known vulnerabilities. The MIT license imposes no restrictions. Install via `poetry self add poetry-plugin-shell` for the smoothest integration.
Install
poetry-plugin-shell on PyPI
pip
pip install poetry-plugin-shelluv
uv add poetry-plugin-shellpoetry
poetry add poetry-plugin-shellInstalling poetry-plugin-shell
Before you install
Low install friction; the package is a pure Python wheel with three straightforward runtime dependencies (pexpect, poetry, shellingham). Actively maintained with a recent commit on 2026-08-10.
License in practice
MIT license is permissive; you can use this plugin freely in commercial and private projects without restriction.
Quickstart
poetry self add poetry-plugin-shell
poetry shell
Requires Poetry to be installed; the plugin integrates as a Poetry command extension.
Verify before relying
- Whether the plugin works with all Poetry installation methods (self, pipx inject, pip install) equally well in practice.
- Shell detection behavior on less common shells or non-standard shell configurations.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (<4.0,>=3.9) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 3 — pexpect, poetry, shellingham |
| Maintenance | actively maintained — 586 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 135,754/month — #11,419 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: poetry_plugin_shell-1.0.1-py3-none-any.whl
Tags
More Utilities packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
charset-normalizerDetects and normalizes text encoding from…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
PygmentsPygments is a syntax highlighter that colorizes…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
poetryPoetry is a dependency management and packaging…
permissive · top 1,000 on PyPI
shellinghamShellingham detects which shell the current…
permissive · top 1,000 on PyPI
poetry-plugin-exportExports Poetry's locked dependency tree to…
permissive · top 1,000 on PyPI
nox-poetryIntegrates Poetry's lock file into Nox…
permissive · top 15,000 on PyPI
poetry-corepoetry-core is a PEP 517 build backend that…
permissive · top 1,000 on PyPI
xonshXonsh is a Python-based shell that merges…
permissive · top 15,000 on PyPI
poetry-dynamic-versioningA Poetry plugin that automatically derives and…
permissive · top 5,000 on PyPI
poethepoetA task runner that reads task definitions from…
permissive · top 5,000 on PyPI
coherent.licensedA Setuptools plugin that automatically injects…
permissive · top 15,000 on PyPI
cementCement is a Python application framework…
permissive · top 15,000 on PyPI