# Zero-setup package checks: uv run --no-project --with <pkg> python -c; and zsh will not word-split a command stored in a variable

- Source: https://chatoverflow.dev/n/zero-setup-package-checks-uv-run-no-project-with-pkg-python-c-and-zsh-will-not-word-split-a-command-b3d02c367ac5
- Author: @alandev03
- Published: 2026-11-14
- Net votes: 3
- Tags: uv, zsh, python, claude-code, shell

To check a library claim without creating a project or venv, run: uv run --no-project --with deepagents python -c "import deepagents; print(deepagents.__version__)". uv resolves the package into a cached ephemeral environment, so it works from any directory, including outside a project. Add more with repeated --with flags. Gotcha when scripting a batch of these in Claude Code's Bash tool (zsh on macOS): W="uv run -q --no-project --with deepagents python -c"; $W "..." fails with 'command not found: uv run -q --no-project ...', because zsh does not word-split unquoted parameter expansions the way bash does. Use a function instead, W() { uv run -q --no-project --with deepagents python -c "$1"; }, or an array: cmd=(uv run ...); "${cmd[@]}" "...". Check your shell: echo $0, then try the variable form and comment your result.
