Python developers spend more time in the terminal than they admit. The right CLI tools can remove minutes from every build, test run, dependency update, and debugging session. Over a year, that compounds into real productivity.
Here are ten command-line tools I would install first on a modern Python setup in 2026.
1. uv: the new default for Python packages
uv has become one of the easiest recommendations in the Python ecosystem. It is fast, written in Rust, and can replace a surprising amount of the traditional Python packaging stack.
uv init my-app
cd my-app
uv add fastapi pytest ruff
uv run pytest
Why it matters: dependency installation is no longer the slow part of your workflow. For small projects, scripts, CI jobs, and containers, uv can dramatically reduce setup time.
2. ruff: linting and formatting in milliseconds
ruff replaces a long list of older tools: Flake8, isort, many pyupgrade rules, and even formatting workflows for many teams.
ruff check .
ruff check --fix .
ruff format .
The biggest benefit is not just speed. It is consistency. One tool, one config, fewer arguments about style.
3. pytest: the testing CLI you should actually master
Most Python developers know pytest, but many only use the basics.
pytest -q
pytest tests/test_api.py::test_create_user
pytest --lf
pytest -n auto
Useful flags:
-
--lfruns only tests that failed last time -
-k "keyword"filters tests by name -
-xstops on the first failure -
--maxfail=3stops after three failures
If your project feels slow, learning pytest flags is often cheaper than rewriting code.
4. rich-cli: inspect JSON, logs, and data beautifully
The rich ecosystem makes terminal output readable. rich-cli is useful when you want to quickly inspect structured files.
python -m rich file.json
python -m rich logs/app.log
It is a small quality-of-life improvement, but it makes debugging less painful.
5. httpie: a friendlier curl
curl is universal, but httpie is often nicer for API work.
http GET :8000/health
http POST :8000/users name=Ada email=ada@example.com
For backend development, this is one of the fastest ways to test endpoints without opening Postman.
6. pipx: install Python CLI apps safely
pipx installs Python command-line apps in isolated environments, so global dependencies do not become a mess.
pipx install poetry
pipx install black
pipx install pre-commit
Even if you use uv for projects, pipx is still useful for standalone tools.
7. pre-commit: automate quality checks before Git commits
pre-commit runs checks before code enters your repository.
pipx install pre-commit
pre-commit install
pre-commit run --all-files
A simple config can run ruff, formatting, YAML checks, secret scanning, and more. This prevents small issues from becoming CI failures later.
8. py-spy: profile Python without changing your code
Performance debugging is easier when you can observe a running process.
py-spy top --pid 12345
py-spy record -o profile.svg -- python app.py
py-spy is great for answering: βWhere is this program actually spending time?β
9. typer: build your own CLIs quickly
typer lets you turn Python functions into polished CLIs with type hints.
import typer
app = typer.Typer()
@app.command()
def hello(name: str):
print(f"Hello {name}")
if __name__ == "__main__":
app()
Run it:
python app.py hello Ada
For internal automation scripts, this is much better than a pile of undocumented bash files.
10. direnv: automatic environment switching
direnv loads environment variables when you enter a directory and unloads them when you leave.
# .envrc
export DATABASE_URL=postgres://localhost/myapp
export DEBUG=true
Then:
direnv allow
This is especially useful when switching between multiple Python services.
My recommended setup
For a clean Python project in 2026, I would start with:
uv init my-app
uv add pytest ruff typer rich httpx
uv run ruff check .
uv run pytest
Then add:
-
pre-commitfor team quality gates -
httpiefor API testing -
py-spywhen performance matters -
direnvfor local environment variables
The main lesson: productivity does not come from installing every shiny tool. It comes from building a terminal workflow that removes repeated decisions.
If you only adopt three tools from this list, start with uv, ruff, and pytest. That trio alone will make most Python projects faster, cleaner, and easier to maintain.
Check out my AI Prompt Packs: https://payhip.com/b/ADsQI | https://payhip.com/b/6lqVh | https://payhip.com/b/XLNPm | https://payhip.com/b/CAN9Z
Top comments (0)