# Poetry Plugin: Shell
[![Poetry](https://img.shields.io/endpoint?url=https://python-poetry.org/badge/v0.json)](https://python-poetry.org/)
> [!NOTE]
> We are looking for maintainers, see the [issue](https://github.com/python-poetry/poetry-plugin-shell/issues/3).
This package is a plugin that runs a subshell with virtual environment activated.
This plugin replaces the same feature as the `shell` command previously available in Poetry.
## Installation
The easiest way to install the `shell` plugin is via the `self add` command of Poetry.
```bash
poetry self add poetry-plugin-shell
```
If you used `pipx` to install Poetry you can add the plugin via the `pipx inject` command.
```bash
pipx inject poetry poetry-plugin-shell
```
Otherwise, if you used `pip` to install Poetry you can add the plugin packages via the `pip install` command.
```bash
pip install poetry-plugin-shell
```
## Usage
The plugin provides a `shell` command to run a subshell with virtual environment activated.
```bash
poetry shell
```
By default, the current active shell is detected and used. Failing that,
the shell defined via the environment variable `SHELL` (on *nix) or
`COMSPEC` (on Windows) is used.
If a virtual environment does not exist, it will be created.
Note that this command starts a new shell and activates the virtual environment.
As such, `exit` should be used to properly exit the shell and the virtual environment instead of `deactivate`.
> [!NOTE]
> This plugin internally uses the [Shellingham](https://github.com/sarugaku/shellingham) project to detect current active shell.
Raw data
{
"_id": null,
"home_page": "https://python-poetry.org/",
"name": "poetry-plugin-shell",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.9",
"maintainer_email": null,
"keywords": null,
"author": "S\u00e9bastien Eustace",
"author_email": "sebastien@eustace.io",
"download_url": "https://files.pythonhosted.org/packages/88/f1/48059713a5a4ec40770c1f907cc6448b60610fc3d64a2f093f95c6f56ddf/poetry_plugin_shell-1.0.0.tar.gz",
"platform": null,
"description": "# Poetry Plugin: Shell\n\n[![Poetry](https://img.shields.io/endpoint?url=https://python-poetry.org/badge/v0.json)](https://python-poetry.org/)\n\n> [!NOTE]\n> We are looking for maintainers, see the [issue](https://github.com/python-poetry/poetry-plugin-shell/issues/3).\n\nThis package is a plugin that runs a subshell with virtual environment activated.\n\n\nThis plugin replaces the same feature as the `shell` command previously available in Poetry.\n\n\n## Installation\n\nThe easiest way to install the `shell` plugin is via the `self add` command of Poetry.\n\n```bash\npoetry self add poetry-plugin-shell\n```\n\nIf you used `pipx` to install Poetry you can add the plugin via the `pipx inject` command.\n\n```bash\npipx inject poetry poetry-plugin-shell\n```\n\nOtherwise, if you used `pip` to install Poetry you can add the plugin packages via the `pip install` command.\n\n```bash\npip install poetry-plugin-shell\n```\n\n\n## Usage\n\nThe plugin provides a `shell` command to run a subshell with virtual environment activated.\n\n```bash\npoetry shell\n```\n\nBy default, the current active shell is detected and used. Failing that,\nthe shell defined via the environment variable `SHELL` (on *nix) or\n`COMSPEC` (on Windows) is used.\n\nIf a virtual environment does not exist, it will be created.\n\nNote that this command starts a new shell and activates the virtual environment.\n\nAs such, `exit` should be used to properly exit the shell and the virtual environment instead of `deactivate`.\n\n> [!NOTE]\n> This plugin internally uses the [Shellingham](https://github.com/sarugaku/shellingham) project to detect current active shell.\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Poetry plugin to run subshell with virtual environment activated",
"version": "1.0.0",
"project_urls": {
"Homepage": "https://python-poetry.org/",
"Repository": "https://github.com/python-poetry/poetry-plugin-shell"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "61629620cfd53ce1647e9700fc782d85cca0e7010fb005ff510bfc882642007e",
"md5": "f84f2fd26676c8902d43aff2cafefcd2",
"sha256": "db6a4c26c584c4c8c87c1a0679dc5e947916004c73cccbe86dc78a8a7541b0fc"
},
"downloads": -1,
"filename": "poetry_plugin_shell-1.0.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "f84f2fd26676c8902d43aff2cafefcd2",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.9",
"size": 6403,
"upload_time": "2024-10-14T18:49:24",
"upload_time_iso_8601": "2024-10-14T18:49:24.689709Z",
"url": "https://files.pythonhosted.org/packages/61/62/9620cfd53ce1647e9700fc782d85cca0e7010fb005ff510bfc882642007e/poetry_plugin_shell-1.0.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "88f148059713a5a4ec40770c1f907cc6448b60610fc3d64a2f093f95c6f56ddf",
"md5": "9dee7cd75727702c620731682e949d36",
"sha256": "691932d0409b5ad0b9dc91c911fa621a360ebbd461b33c65f0f43c3e9b1fb6bc"
},
"downloads": -1,
"filename": "poetry_plugin_shell-1.0.0.tar.gz",
"has_sig": false,
"md5_digest": "9dee7cd75727702c620731682e949d36",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.9",
"size": 9869,
"upload_time": "2024-10-14T18:49:25",
"upload_time_iso_8601": "2024-10-14T18:49:25.927171Z",
"url": "https://files.pythonhosted.org/packages/88/f1/48059713a5a4ec40770c1f907cc6448b60610fc3d64a2f093f95c6f56ddf/poetry_plugin_shell-1.0.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-10-14 18:49:25",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "python-poetry",
"github_project": "poetry-plugin-shell",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "poetry-plugin-shell"
}