Skip to content

azinsharaf/pyhop

Repository files navigation

pyhop

A CLI to inspect and activate Python environments across venv, poetry, uv, conda, pyenv, and pixi.

Default invocation (pyhop with no arguments) opens an fzf picker to choose an environment, prints the activation shell snippet to stdout, then quits. A small shell function in your rc does eval on the snippet — the CLI never replaces your shell.

Why

If you have many Python projects, you likely have many envs: some via python -m venv, some via poetry, some via uv, some via conda, some via pyenv. Switching between them is fiddly — each has its own activation command, its own naming, its own quirks. pyhop unifies them: one command, one picker, one activation.

Installation

pip install pyhop

Shell setup

Add one of these to your shell rc (~/.bashrc, ~/.zshrc, ~/.config/fish/config.fish, or $PROFILE):

# bash / zsh
pyhop() { eval "$(command pyhop "$@")"; }
# fish
function pyhop; eval (command pyhop $argv); end
# PowerShell
function pyhop { & pyhop @args | Out-String | Invoke-Expression }

Now pyhop with no arguments opens fzf, you pick an env, and your shell activates it.

Commands

Command Description
pyhop Open fzf picker, activate the selected env (default)
pyhop use [name] Activate a specific env by name (skips fzf)
pyhop check Inspect the currently-active env
pyhop list List all detected envs
pyhop info <env> Show details of one env
pyhop create [name] Create a new env
pyhop remove <env> Remove an env
pyhop doctor Diagnose issues across all envs

Supported env managers

  • system Python
  • python -m venv / virtualenv
  • poetry
  • uv
  • conda / mamba / micromamba
  • pyenv
  • pixi

Development

git clone https://github.com/azin/pyhop
cd pyhop
pip install -e ".[dev]"
pre-commit install
pytest

License

MIT — see LICENSE.

About

No description, website, or topics provided.

Resources

Contributing

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages