tox
$ tox Community Low Risktox automates isolated Python virtual environment creation, dependency installation, and test execution across interpreter matrices from tox.ini or pyproject.toml. Supports tox list for environment discovery and tox run --result-json for structured reporting.
brew install tox Local Python environment and matrix test runner; MCP servers cannot manage local .tox/ virtualenvs.
Agent-Readiness Checklist
Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.
FCRS-1.0 6-Dimension Breakdown
Supports tox run --result-json, --colored no, and NO_COLOR=1, though --result-json is incompatible with parallel mode (-p) and writes to a file rather than stdout.
tox run --result-json <path>emits structured JSON report--colored nodisables ANSI escape sequences
Isolates dependencies inside .tox/ directories and runs locally, though installing packages from PyPI triggers network writes.
- Environment isolation under
.tox/
Cross-platform across macOS, Linux, and Windows via brew, pip, pipx, or uvx, requiring Python interpreters for target matrix entries.
- Available via
brew install tox,pip install tox, anduvx tox
Standardizes multi-Python version and tool matrix testing in one config, though virtualenv creation can be slower than uv without tox-uv.
- Unified runner for pytest, linters, and type checkers
Long-standing PyPA-adjacent tox-dev/tox project under the MIT license.
- Maintained by
tox-devteam
Comprehensive v4 documentation on tox.wiki and detailed --help output.
- Official CLI reference at tox.wiki
Security, Auth & Guardrails
No built-in credentials; inherits local pip / PyPI index credentials if configured in the environment.
MIT open-source Python tool; free.
# tox Agent Rules - Run `tox list --colored no` first and target specific environments with `-e <env>` rather than the full matrix. - Note that `--result-json` cannot be combined with `--parallel` (`-p`) or `--no-capture` (`-i`). - Avoid `tox run -r` (recreate) unless dependencies actually changed.
Agent-Ready Command Recipes
Safe Read-Only Queries
tox list --colored no
Displays configured test, lint, and type-check environments without creating virtualenvs.
Controlled Writes & Previews
tox run -e py312 --result-json .tox/result.json --colored no
Provisions .tox/py312, runs configured commands, and writes structured execution metadata to .tox/result.json.
Strengths for Agents
- + Standard
tox.ini/pyproject.tomlsupport across thousands of Python repositories. - +
--result-jsoncaptures per-environment commands, exit codes, and durations. - + Clean
--colored noandtox listinspection.
Caveats & Pitfalls
- !
--result-jsonis mutually exclusive with parallel execution (-p) and-i(--no-capture). - ! Creating virtualenvs for multiple Python versions can take time unless
tox-uvis installed.