Skip to main content

Enter a local .venv created by uv

Project description

uvshell

Open a shell inside a local uv virtual environment.

uvshell creates a local .venv if it does not exist and opens a new shell session with the environment activated. Exit the shell to return to your normal environment.

What It Does

  • Creates a .venv using uv if one does not exist
  • Initializes a uv project first if pyproject.toml is missing
  • Marks newly initialized projects with tool.uv.package = false by default
  • Opens a new interactive shell with the virtual environment activated
  • Works across Windows, macOS, and Linux

Installation

Install From PyPI With uv

uv tool install uvshell

or:

uv pip install uvshell

Install With pip

pip install uvshell

Install From a Local Build

pip install dist/uvshell-0.1.4-py3-none-any.whl

Requirements

  • Python 3.9+
  • uv installed and available on PATH

Install uv if needed:

pip install uv

or:

brew install uv

Usage

From your project directory:

uvshell

Behavior:

  • If .venv does not exist, it will be created
  • If pyproject.toml does not exist, uvshell runs uv init first
  • New auto-initialized projects default to tool.uv.package = false
  • On Windows, uvshell opens a cmd.exe subshell
  • Type exit to leave the environment

Options

Use a Different Virtual Environment Directory

uvshell --venv .venv-dev

Specify Python When Creating the Environment

uvshell --python 3.13

Initialize as a Packaged Project

uvshell --package

Use this if you want uvshell to create a packaged uv project when it has to run uv init.

Error If the Environment Is Missing

uvshell --no-create

Example Workflow

mkdir my-project
cd my-project
uvshell
exit

Local Smoke Test

python -m pip uninstall -y uvshell
python -m pip install .\dist\uvshell-0.1.4-py3-none-any.whl

mkdir C:\temp\uvshell-smoke
cd C:\temp\uvshell-smoke
uvshell --python 3.13

After uvshell starts, confirm that .venv, .gitignore, and optionally .python-version were created as expected.

License

Apache License 2.0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

uvshell-0.1.4.tar.gz (9.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

uvshell-0.1.4-py3-none-any.whl (12.7 kB view details)

Uploaded Python 3

File details

Details for the file uvshell-0.1.4.tar.gz.

File metadata

  • Download URL: uvshell-0.1.4.tar.gz
  • Upload date:
  • Size: 9.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for uvshell-0.1.4.tar.gz
Algorithm Hash digest
SHA256 dff0de30da2ddacfb0685ee592679644720cd886e6b6b4fd79a8eb7c7262190e
MD5 490f81c5dc801ab5b8c20d9e17203fc5
BLAKE2b-256 e8bc2f3adc1c56a878a8c966c144b22122d9470b82650434062020ad55fb64f6

See more details on using hashes here.

File details

Details for the file uvshell-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: uvshell-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 12.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for uvshell-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 c15378d608cb6d9027785c043b9488d5adc8d370a8fdef9a6cb578ebb73b6970
MD5 492654629e3fd1df520490198f6b86b5
BLAKE2b-256 72964d5b6ee575c66a0757ab47b5d85b8f7a1af5d5154c558f0647cc740ca5c5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page