IssueRaiser

Add a command to activate the virtual environment, e.g., `uv shell`

**Summary** I propose the introduction of a new command, `uv shell`. This command would provide users with a quick and straightforward way to enter the associated Python virtual environment (venv) for their projects. **Motivation** The inspiration for `uv shell` comes from the convenience and simplicity offered by the `poetry shell` command in Poetry. Having worked with poetry on multiple OSs over the last year, I miss this intuitive approach to environment management. I propose introducing a similar capability into uv. **Proposed Solution** The `uv shell` command would activate the project's Python virtual environment (basically a shorthand for `.venv/bin/activate`), allowing users to immediately start working within the context of that environment **OR** return an error message if the venv is missing. This feature would abstract away the need to manually source the venv activation script, thus providing a more seamless development workflow across operating systems.

Posted by twiddles on Feb 23, 2024, 12:26 PM

Tags

Related issues

Raise real-world problems, find people facing the same issue, and discuss solutions.2,000 issues0 comments

github (Other)

Add a command to activate the virtual environment, e.g., `uv shell`

twiddlesFeb 23, 2024, 12:26 PM

**Summary** I propose the introduction of a new command, `uv shell`. This command would provide users with a quick and straightforward way to enter the associated Python virtual environment (venv) for their projects. **Motivation** The inspiration for `uv shell` comes from the convenience and simplicity offered by the `poetry shell` command in Poetry. Having worked with poetry on multiple OSs over the last year, I miss this intuitive approach to environment management. I propose introducing a similar capability into uv. **Proposed Solution** The `uv shell` command would activate the project's Python virtual environment (basically a shorthand for `.venv/bin/activate`), allowing users to immediately start working within the context of that environment **OR** return an error message if the venv is missing. This feature would abstract away the need to manually source the venv activation script, thus providing a more seamless development workflow across operating systems.

Comments (0)

No comments yet. Start the discussion.

Comment on this issue