Manages top-level CLI invocation, typically via ``setup.py`` entrypoints. Designed for distributing Invoke task collections as standalone programs, but also used internally to implement the ``invoke`` program itself. .. seealso:: :ref:`reusing-as-a-binary` for a tutorial/w
| 30 | |
| 31 | |
| 32 | class Program: |
| 33 | """ |
| 34 | Manages top-level CLI invocation, typically via ``setup.py`` entrypoints. |
| 35 | |
| 36 | Designed for distributing Invoke task collections as standalone programs, |
| 37 | but also used internally to implement the ``invoke`` program itself. |
| 38 | |
| 39 | .. seealso:: |
| 40 | :ref:`reusing-as-a-binary` for a tutorial/walkthrough of this |
| 41 | functionality. |
| 42 | |
| 43 | .. versionadded:: 1.0 |
| 44 | """ |
| 45 | |
| 46 | core: "ParseResult" |
| 47 | |
| 48 | def core_args(self) -> List["Argument"]: |
| 49 | """ |
| 50 | Return default core `.Argument` objects, as a list. |
| 51 | |
| 52 | .. versionadded:: 1.0 |
| 53 | """ |
| 54 | # Arguments present always, even when wrapped as a different binary |
| 55 | return [ |
| 56 | Argument( |
| 57 | names=("command-timeout", "T"), |
| 58 | kind=int, |
| 59 | help="Specify a global command execution timeout, in seconds.", |
| 60 | ), |
| 61 | Argument( |
| 62 | names=("complete",), |
| 63 | kind=bool, |
| 64 | default=False, |
| 65 | help="Print tab-completion candidates for given parse remainder.", # noqa |
| 66 | ), |
| 67 | Argument( |
| 68 | names=("config", "f"), |
| 69 | help="Runtime configuration file to use.", |
| 70 | ), |
| 71 | Argument( |
| 72 | names=("debug", "d"), |
| 73 | kind=bool, |
| 74 | default=False, |
| 75 | help="Enable debug output.", |
| 76 | ), |
| 77 | Argument( |
| 78 | names=("dry", "R"), |
| 79 | kind=bool, |
| 80 | default=False, |
| 81 | help="Echo commands instead of running.", |
| 82 | ), |
| 83 | Argument( |
| 84 | names=("echo", "e"), |
| 85 | kind=bool, |
| 86 | default=False, |
| 87 | help="Echo executed commands before running.", |
| 88 | ), |
| 89 | Argument( |
no outgoing calls
no test coverage detected
searching dependent graphs…