Scroll to navigation

NOX(1) User Commands NOX(1)

NAME

nox - Flexible test automation

DESCRIPTION

usage: nox [-h] [--version] [-l] [--json] [-s [SESSIONS ...]]

[-p [PYTHONS ...]] [-k KEYWORDS] [-t [TAGS ...]] [-v] [-ts] [-db {conda,mamba,micromamba,virtualenv,venv,uv,none}] [-fb {conda,mamba,micromamba,virtualenv,venv,uv,none}] [--no-venv] [--reuse-venv {yes,no,always,never}] [-r] [-N] [-R] [-f NOXFILE] [--envdir ENVDIR] [--extra-pythons [EXTRA_PYTHONS ...]] [-P [FORCE_PYTHONS ...]] [-x] [--no-stop-on-first-error] [--error-on-missing-interpreters] [--no-error-on-missing-interpreters] [--error-on-external-run] [--no-error-on-external-run] [--install-only] [--no-install] [--report REPORT] [--non-interactive] [--nocolor] [--forcecolor] ...

Nox is a Python automation toolkit.

General options:

These are general arguments used when invoking Nox.
Show this help message and exit.
Show the Nox version and exit.
Arguments following ``--`` that are passed through to the session(s).
Location of the Python file containing Nox sessions.

Sessions options:

These arguments are used to control which Nox session(s) to execute.
List all available sessions and exit.
JSON output formatting. Requires list-sessions currently.
Which sessions to run. By default, all sessions will run.
Only run sessions that match the given expression.
Only run sessions with the given tags.

Python options:

These arguments are used to control which Python version(s) to use.
Only run sessions that use the given python interpreter versions.
Additionally, run sessions using the given python interpreter versions.
Run sessions with the given interpreters instead of those listed in the Noxfile. This is a shorthand for ``--python=X.Y --extra-python=X.Y``. It will also work on sessions that don't have any interpreter parametrized.

Environment options:

These arguments are used to control Nox's creation and usage of virtual environments.
Virtual environment backend to use by default for Nox sessions, this is ``'virtualenv'`` by default but any of ``['conda', 'mamba', 'micromamba', 'virtualenv', 'venv', 'uv', 'none']`` are accepted.
Virtual environment backend to force-use for all Nox sessions in this run, overriding any other venv backend declared in the Noxfile and ignoring the default backend. Any of ``['conda', 'mamba', 'micromamba', 'virtualenv', 'venv', 'uv', 'none']`` are accepted.
Runs the selected sessions directly on the current interpreter, without creating a venv. This is an alias for '--force-venv-backend none'.
Controls existing virtualenvs recreation. This is ``'no'`` by default, but any of ``('yes', 'no', 'always', 'never')`` are accepted.
This is an alias for '--reuse-venv=yes|no'.
Disables --reuse-existing-virtualenvs if it is enabled in the Noxfile.
Reuse existing virtualenvs and skip package reinstallation. This is an alias for '--reuse-existingvirtualenvs --no-install'.
Directory where Nox will store virtualenvs, this is ``.nox`` by default.

Execution options:

These arguments are used to control execution of sessions.
Stop after the first error.
Disables --stop-on-first-error if it is enabled in the Noxfile.
Error instead of skipping sessions if an interpreter can not be located.
Disables --error-on-missing-interpreters if it is enabled in the Noxfile.
Error if run() is used to execute a program that isn't installed in a session's virtualenv.
Disables --error-on-external-run if it is enabled in the Noxfile.
Skip session.run invocations in the Noxfile.
Skip invocations of session methods for installing packages (session.install, session.conda_install, session.run_install) when a virtualenv is being reused.
Force session.interactive to always be False, even in interactive sessions.

Reporting options:

These arguments are used to control Nox's reporting during execution.
Logs the output of all commands run including commands marked silent.
Adds a timestamp to logged output.
Output a report of all sessions to the given filename.
Disable all color output.
Force color output, even if stdout is not an interactive terminal.

SEE ALSO

The full documentation for nox is maintained as a Texinfo manual. If the info and nox programs are properly installed at your site, the command

info nox

should give you access to the complete manual.

December 2024 nox 2024.4.15