Debian Codegraph @

docs/reference/cli.rst

raw
1 .. _cli:
2
3 ###############
4 CLI interface
5 ###############
6
7 ******************
8 Shell completion
9 ******************
10
11 tox supports shell completion for commands, flags, and environment names via :pypi:`argcomplete`. Install tox with the
12 ``completion`` extra:
13
14 .. code-block:: bash
15
16 uv tool install 'tox[completion]'
17
18 Then configure your shell:
19
20 .. tab:: bash
21
22 Add to ``~/.bashrc``:
23
24 .. code-block:: bash
25
26 eval "$(register-python-argcomplete tox)"
27
28 .. tab:: zsh
29
30 Add to ``~/.zshrc``:
31
32 .. code-block:: zsh
33
34 autoload -U bashcompinit
35 bashcompinit
36 eval "$(register-python-argcomplete tox)"
37
38 .. tab:: fish
39
40 Add to ``~/.config/fish/config.fish``:
41
42 .. code-block:: fish
43
44 register-python-argcomplete --shell fish tox | source
45
46 Once configured, pressing ``<TAB>`` completes subcommands (``tox r`` → ``tox run``), flags (``tox run --``), and
47 environment names (``tox run -e`` lists environments from your tox configuration).
48
49 **********
50 Man page
51 **********
52
53 tox ships a Unix man page accessible via ``man tox`` (see :ref:`howto` for setup). The man page source is at
54 ``docs/man/tox.1.rst`` and can be regenerated from the CLI parser with ``tox run -e manpage``.
55
56 **********************
57 Command-line options
58 **********************
59
60 .. sphinx_argparse_cli::
61 :module: tox.config.cli.parse
62 :func: _get_parser_doc