Cheat Sheet
The commands you keep forgetting, with a one-line description and a real example you can copy - 629 across 38 tools. Pick a tool in the sidebar, or search across all of them.
Python (pip, venv & uv)
Virtual environments and package management - classic pip/venv and modern uv.| Command | What it does | Example |
|---|---|---|
python -m venv | Create a virtual environment. | python -m venv .venv |
activate (mac/Linux) | Enter the virtual environment. | source .venv/bin/activate |
activate (Windows) | Enter the venv on Windows. | .venv\Scripts\activate |
deactivate | Leave the virtual environment. | deactivate |
pip install | Install a package. | pip install requests |
pip install (pinned) | Install an exact version. | pip install "django==5.0" |
pip install -r | Install everything in a requirements file. | pip install -r requirements.txt |
pip freeze | Write exact installed versions to a file. | pip freeze > requirements.txt |
pip list | List installed packages. | pip list |
pip uninstall | Remove a package. | pip uninstall requests |
pip show | Show details about an installed package. | pip show requests |
pip install -U | Upgrade a package to the latest. | pip install -U pip |
python -m | Run a module as a script. | python -m http.server 8000 |
pipx | Install a CLI tool in its own isolated env. | pipx install black |
uv venv | Create a venv, much faster than python -m venv. | uv venv |
uv pip install | Drop-in pip replacement inside the venv. | uv pip install requests |
uv init | Start a project with a pyproject.toml. | uv init myproject |
uv add | Add a dependency to the project (and its lockfile). | uv add fastapi |
uv run | Run a command in the project env - no activate needed. | uv run pytest |
uv sync | Install exactly what the lockfile says. | uv sync |
uvx | Run a CLI tool without installing it (like npx). | uvx ruff check . |
uv python install | Install a Python version itself via uv. | uv python install 3.12 |