invoke-toolkit 0.0.74__tar.gz → 0.0.76__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (167) hide show
  1. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/.gitignore +3 -4
  2. invoke_toolkit-0.0.76/PKG-INFO +200 -0
  3. invoke_toolkit-0.0.76/README.md +138 -0
  4. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/pyproject.toml +32 -9
  5. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/src/invoke_toolkit/__init__.py +63 -1
  6. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/src/invoke_toolkit/context/context.py +5 -22
  7. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/src/invoke_toolkit/context/types.py +6 -0
  8. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/src/invoke_toolkit/extensions/tasks/create.py +18 -5
  9. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/src/invoke_toolkit/extensions/uv_tools.py +30 -6
  10. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/src/invoke_toolkit/output/console.py +16 -18
  11. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/src/invoke_toolkit/program/program.py +62 -2
  12. invoke_toolkit-0.0.76/src/invoke_toolkit/program/task_changes.py +184 -0
  13. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/src/invoke_toolkit/runners/rich.py +85 -16
  14. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/src/invoke_toolkit/scripts/loader.py +2 -0
  15. invoke_toolkit-0.0.76/src/invoke_toolkit/tasks/_cache_security.py +147 -0
  16. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/src/invoke_toolkit/tasks/autocomplete.py +3 -8
  17. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/src/invoke_toolkit/tasks/cache.py +14 -2
  18. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/src/invoke_toolkit/utils/fzf.py +5 -4
  19. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/tests/extensions/test_create.py +32 -0
  20. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/tests/extensions/test_uv_plugins.py +60 -0
  21. invoke_toolkit-0.0.76/tests/tasks/test_cache_security.py +247 -0
  22. invoke_toolkit-0.0.76/tests/test_console.py +451 -0
  23. invoke_toolkit-0.0.76/tests/test_list_changed.py +383 -0
  24. invoke_toolkit-0.0.76/tests/test_public_api.py +17 -0
  25. invoke_toolkit-0.0.76/tests/typecheck/public_api.json +8 -0
  26. invoke_toolkit-0.0.76/tests/typecheck/public_api.py +77 -0
  27. invoke_toolkit-0.0.74/PKG-INFO +0 -306
  28. invoke_toolkit-0.0.74/README.md +0 -245
  29. invoke_toolkit-0.0.74/tests/test_console.py +0 -222
  30. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/LICENSE.txt +0 -0
  31. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/src/invoke_toolkit/__main__.py +0 -0
  32. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/src/invoke_toolkit/collections.py +0 -0
  33. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/src/invoke_toolkit/completion.py +0 -0
  34. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/src/invoke_toolkit/config/__init__.py +0 -0
  35. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/src/invoke_toolkit/config/config.py +0 -0
  36. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/src/invoke_toolkit/config/registry.py +0 -0
  37. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/src/invoke_toolkit/config/schema.py +0 -0
  38. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/src/invoke_toolkit/config/status_helper.py +0 -0
  39. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/src/invoke_toolkit/context/__init__.py +0 -0
  40. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/src/invoke_toolkit/context/async_tools.py +0 -0
  41. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/src/invoke_toolkit/executor.py +0 -0
  42. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/src/invoke_toolkit/extensions/__init__.py +0 -0
  43. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/src/invoke_toolkit/extensions/tasks/__init__.py +0 -0
  44. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/src/invoke_toolkit/extensions/tasks/config.py +0 -0
  45. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/src/invoke_toolkit/extensions/tasks/dist.py +0 -0
  46. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/src/invoke_toolkit/extensions/tasks/plugin.py +0 -0
  47. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/src/invoke_toolkit/extensions/tasks/shell.py +0 -0
  48. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/src/invoke_toolkit/field_resolvers.py +0 -0
  49. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/src/invoke_toolkit/loader/entrypoint.py +0 -0
  50. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/src/invoke_toolkit/log/__init__.py +0 -0
  51. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/src/invoke_toolkit/log/logger.py +0 -0
  52. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/src/invoke_toolkit/output/__init__.py +0 -0
  53. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/src/invoke_toolkit/output/utils.py +0 -0
  54. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/src/invoke_toolkit/parser.py +0 -0
  55. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/src/invoke_toolkit/program/__init__.py +0 -0
  56. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/src/invoke_toolkit/program/main.py +0 -0
  57. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/src/invoke_toolkit/py.typed +0 -0
  58. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/src/invoke_toolkit/runners/__init__.py +0 -0
  59. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/src/invoke_toolkit/scripts/__init__.py +0 -0
  60. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/src/invoke_toolkit/tasks/__init__.py +0 -0
  61. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/src/invoke_toolkit/tasks/fields.py +0 -0
  62. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/src/invoke_toolkit/tasks/fields.pyi +0 -0
  63. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/src/invoke_toolkit/tasks/tasks.py +0 -0
  64. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/src/invoke_toolkit/tasks/types.py +0 -0
  65. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/src/invoke_toolkit/testing.py +0 -0
  66. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/src/invoke_toolkit/utils/__init__.py +0 -0
  67. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/src/invoke_toolkit/utils/inspection.py +0 -0
  68. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/src/invoke_toolkit/utils/singleton.py +0 -0
  69. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/src/invoke_toolkit/utils/text.py +0 -0
  70. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/templates/package-template/.gitignore.jinja +0 -0
  71. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/templates/package-template/README.md.jinja +0 -0
  72. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/templates/package-template/copier.yml +0 -0
  73. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/templates/package-template/pyproject.toml.jinja +0 -0
  74. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/templates/package-template/src/{{package_slug}}/__init__.py.jinja +0 -0
  75. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/templates/package-template/src/{{package_slug}}/tasks.py.jinja +0 -0
  76. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/templates/provider-template/.gitignore.jinja +0 -0
  77. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/templates/provider-template/README.md.jinja +0 -0
  78. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/templates/provider-template/copier.yml +0 -0
  79. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/templates/provider-template/pyproject.toml.jinja +0 -0
  80. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/templates/provider-template/src/{{package_slug}}/__init__.py.jinja +0 -0
  81. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/templates/provider-template/tests/test_resolver.py.jinja +0 -0
  82. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/tests/__init__.py +0 -0
  83. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/tests/conftest.py +0 -0
  84. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/tests/examples/cached_completion/tasks.py +0 -0
  85. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/tests/examples/completion_with_config/.gitignore +0 -0
  86. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/tests/examples/completion_with_config/tasks.py +0 -0
  87. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/tests/examples/config_schema/tasks.py +0 -0
  88. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/tests/examples/enum_select_size/tasks.py +0 -0
  89. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/tests/examples/fzf_selector/tasks.py +0 -0
  90. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/tests/examples/literal_set_level/tasks.py +0 -0
  91. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/tests/examples/local_field_resolver/tasks.py +0 -0
  92. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/tests/examples/local_tasks/local_tasks.py +0 -0
  93. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/tests/examples/local_tasks/tasks.py +0 -0
  94. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/tests/extensions/conftest.py +0 -0
  95. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/tests/extensions/test_config_tasks.py +0 -0
  96. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/tests/extensions/test_package_template_entrypoint.py +0 -0
  97. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/tests/extensions/test_shell_tasks.py +0 -0
  98. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/tests/fixtures/future_fields.py +0 -0
  99. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/tests/integration/pty_plugin_completion.py +0 -0
  100. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/tests/integration/uv_tool_plugins.sh +0 -0
  101. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/tests/original_invoke/__init__.py +0 -0
  102. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/tests/original_invoke/_support/configs/all-four/invoke.json +0 -0
  103. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/tests/original_invoke/_support/configs/all-four/invoke.py +0 -0
  104. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/tests/original_invoke/_support/configs/all-four/invoke.yml +0 -0
  105. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/tests/original_invoke/_support/configs/collection.py +0 -0
  106. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/tests/original_invoke/_support/configs/echo.yaml +0 -0
  107. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/tests/original_invoke/_support/configs/json/invoke.json +0 -0
  108. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/tests/original_invoke/_support/configs/json-and-python/invoke.json +0 -0
  109. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/tests/original_invoke/_support/configs/json-and-python/invoke.py +0 -0
  110. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/tests/original_invoke/_support/configs/no-dedupe.yaml +0 -0
  111. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/tests/original_invoke/_support/configs/no-echo.yaml +0 -0
  112. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/tests/original_invoke/_support/configs/package/invoke.yml +0 -0
  113. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/tests/original_invoke/_support/configs/package/tasks/__init__.py +0 -0
  114. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/tests/original_invoke/_support/configs/python/invoke.py +0 -0
  115. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/tests/original_invoke/_support/configs/runtime.py +0 -0
  116. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/tests/original_invoke/_support/configs/three-of-em/invoke.json +0 -0
  117. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/tests/original_invoke/_support/configs/three-of-em/invoke.py +0 -0
  118. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/tests/original_invoke/_support/configs/three-of-em/invoke.yml +0 -0
  119. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/tests/original_invoke/_support/configs/underscores/tasks.py +0 -0
  120. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/tests/original_invoke/_support/configs/yaml/explicit.py +0 -0
  121. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/tests/original_invoke/_support/configs/yaml/tasks.py +0 -0
  122. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/tests/original_invoke/_support/configs/yml/explicit.py +0 -0
  123. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/tests/original_invoke/_support/configs/yml/invoke.yml +0 -0
  124. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/tests/original_invoke/_support/configs/yml/tasks.py +0 -0
  125. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/tests/original_invoke/_support/has_modules.py +0 -0
  126. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/tests/original_invoke/conftest.py +0 -0
  127. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/tests/original_invoke/test_config.py +0 -0
  128. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/tests/program/main.py +0 -0
  129. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/tests/program/tasks/__init__.py +0 -0
  130. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/tests/program/tasks/coll1.py +0 -0
  131. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/tests/script/test_script.py +0 -0
  132. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/tests/tasks/test_cache.py +0 -0
  133. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/tests/tasks/test_extensions_config.py +0 -0
  134. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/tests/test_alias_self_reference.py +0 -0
  135. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/tests/test_annotated_help.py +0 -0
  136. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/tests/test_async_edge_cases.py +0 -0
  137. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/tests/test_async_support.py +0 -0
  138. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/tests/test_cofig_class.py +0 -0
  139. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/tests/test_collection.py +0 -0
  140. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/tests/test_collection_configure.py +0 -0
  141. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/tests/test_completion_with_choices.py +0 -0
  142. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/tests/test_config_helper.py +0 -0
  143. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/tests/test_config_registry.py +0 -0
  144. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/tests/test_config_schema.py +0 -0
  145. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/tests/test_context_class.py +0 -0
  146. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/tests/test_disable_status_cli.py +0 -0
  147. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/tests/test_enum_arguments.py +0 -0
  148. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/tests/test_executor.py +0 -0
  149. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/tests/test_field_typing.py +0 -0
  150. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/tests/test_fields.py +0 -0
  151. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/tests/test_file_completion.py +0 -0
  152. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/tests/test_global_context.py +0 -0
  153. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/tests/test_help_flags.py +0 -0
  154. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/tests/test_invoke_3_compat.py +0 -0
  155. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/tests/test_invoke_compatibility.py +0 -0
  156. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/tests/test_list_filter_flags.py +0 -0
  157. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/tests/test_loader.py +0 -0
  158. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/tests/test_parsing.py +0 -0
  159. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/tests/test_proctitle.py +0 -0
  160. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/tests/test_program_with_collection.py +0 -0
  161. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/tests/test_pty_stdin.py +0 -0
  162. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/tests/test_release_guard.py +0 -0
  163. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/tests/test_task_suggestions.py +0 -0
  164. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/tests/test_toplevel.py +0 -0
  165. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/tests/typecheck/fields.py +0 -0
  166. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/tests/typecheck/fields_negative.py.fixture +0 -0
  167. {invoke_toolkit-0.0.74 → invoke_toolkit-0.0.76}/tests/utils/test_fzf.py +0 -0
@@ -3,16 +3,15 @@
3
3
  .ripgrep
4
4
 
5
5
  **/__pycache__/*
6
- **/_site/*
7
- docs/reference/
8
- **/.quarto/*
9
- docs/objects.json
6
+ /site/
7
+ /.cache/
10
8
  _tasks.py
11
9
  report.html
12
10
  _scratchpad.py
13
11
 
14
12
  # Test files
15
13
  _[a-z]*.py
14
+ !src/invoke_toolkit/tasks/_cache_security.py
16
15
  _test/*
17
16
  invoke.yaml
18
17
  # Makrdowns
@@ -0,0 +1,200 @@
1
+ Metadata-Version: 2.5
2
+ Name: invoke-toolkit
3
+ Version: 0.0.76
4
+ Summary: Extended APIs for PyInvoke: composable task plugins, typed CLI args, Rich output, shell completion, and PEP 723 script support
5
+ Project-URL: Documentation, https://d3f0.github.io/invoke-toolkit/
6
+ Project-URL: Issues, https://github.com/D3f0/invoke-toolkit/issues
7
+ Project-URL: Source, https://github.com/D3f0/invoke-toolkit
8
+ Author-email: Nahuel Defossé <D3f0@users.noreply.github.com>
9
+ License-Expression: MIT
10
+ License-File: LICENSE.txt
11
+ Keywords: automation,cli,completion,devtools,fzf,invoke,plugin,pyinvoke,rich,task
12
+ Classifier: Development Status :: 4 - Beta
13
+ Classifier: Environment :: Console
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: Operating System :: MacOS :: MacOS X
16
+ Classifier: Operating System :: POSIX
17
+ Classifier: Operating System :: Unix
18
+ Classifier: Programming Language :: Python
19
+ Classifier: Programming Language :: Python :: 3
20
+ Classifier: Programming Language :: Python :: 3.10
21
+ Classifier: Programming Language :: Python :: 3.11
22
+ Classifier: Programming Language :: Python :: 3.12
23
+ Classifier: Programming Language :: Python :: 3.13
24
+ Classifier: Programming Language :: Python :: Implementation :: CPython
25
+ Classifier: Topic :: Software Development
26
+ Classifier: Topic :: Software Development :: Build Tools
27
+ Classifier: Topic :: Software Development :: Libraries
28
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
29
+ Classifier: Topic :: System :: Software Distribution
30
+ Classifier: Topic :: System :: Systems Administration
31
+ Classifier: Topic :: Terminals
32
+ Classifier: Topic :: Utilities
33
+ Classifier: Typing :: Typed
34
+ Requires-Python: >=3.10
35
+ Requires-Dist: anyio>=4.14.2
36
+ Requires-Dist: appdirs
37
+ Requires-Dist: attrs>=24.1.0
38
+ Requires-Dist: cattrs>=24.1.0
39
+ Requires-Dist: httpx>=0.28.1
40
+ Requires-Dist: invoke>=3.0.3
41
+ Requires-Dist: platformdirs>=4.5.0
42
+ Requires-Dist: pyyaml>=6.0.3
43
+ Requires-Dist: rich>=13
44
+ Requires-Dist: setproctitle>=1.3.7
45
+ Requires-Dist: tomlkit>=0.13.3
46
+ Requires-Dist: typing-extensions>=4.13.2
47
+ Provides-Extra: cache
48
+ Requires-Dist: diskcache>=5.6.0; extra == 'cache'
49
+ Provides-Extra: copier
50
+ Requires-Dist: copier>=9.16.0; extra == 'copier'
51
+ Provides-Extra: debug
52
+ Requires-Dist: hunter>=3.7.0; extra == 'debug'
53
+ Requires-Dist: pdbpp>=0.11.7; extra == 'debug'
54
+ Provides-Extra: full
55
+ Requires-Dist: copier>=9.16.0; extra == 'full'
56
+ Requires-Dist: diskcache>=5.6.0; extra == 'full'
57
+ Requires-Dist: hunter>=3.7.0; extra == 'full'
58
+ Requires-Dist: pdbpp>=0.11.7; extra == 'full'
59
+ Provides-Extra: templating
60
+ Requires-Dist: copier>=9.16.0; extra == 'templating'
61
+ Description-Content-Type: text/markdown
62
+
63
+ # Invoke Toolkit
64
+
65
+ [![PyPI - Version](https://img.shields.io/pypi/v/invoke-toolkit.svg)](https://pypi.org/project/invoke-toolkit)
66
+ [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/invoke-toolkit.svg)](https://pypi.org/project/invoke-toolkit)
67
+
68
+ **Python tasks for humans and AI agents, built on [Invoke](https://www.pyinvoke.org/).**
69
+
70
+ Invoke Toolkit keeps Invoke's task functions, contexts, namespaces and task chaining, and adds typed arguments, Rich terminal output, shell completion, reusable plugins and portable PEP 723 scripts. Use it as a library to build project automation, then expose the same tasks to a person at a terminal or an agent invoking explicit commands.
71
+
72
+ [Documentation](https://d3f0.github.io/invoke-toolkit/) · [Quickstart](https://d3f0.github.io/invoke-toolkit/getting-started/quickstart/) · [Migrating from Invoke](https://d3f0.github.io/invoke-toolkit/getting-started/from-invoke/) · [Improvement history](https://d3f0.github.io/invoke-toolkit/reference/improvements/)
73
+
74
+ ## Install and run your first task
75
+
76
+ Requires **Python 3.10+**; the library depends on **Invoke 3.0.3+** and **Rich 13+** ([compatibility change #114](https://github.com/D3f0/invoke-toolkit/pull/114)). With [uv](https://docs.astral.sh/uv/), install into a project:
77
+
78
+ ```sh
79
+ uv add invoke-toolkit
80
+ ```
81
+
82
+ Save this as `tasks.py`:
83
+
84
+ ```python
85
+ from invoke_toolkit import Context, task
86
+
87
+
88
+ @task
89
+ def hello(ctx: Context, name: str = "toolkit") -> None:
90
+ """Greet a person or an automation client."""
91
+ print(f"Hello, {name}!")
92
+ ```
93
+
94
+ Discover, inspect and execute it:
95
+
96
+ ```sh
97
+ uv run intk --list
98
+ uv run intk --help hello
99
+ uv run intk hello --name toolkit
100
+ ```
101
+
102
+ ## For humans: a helpful terminal interface
103
+
104
+ - [Rich output and status](https://d3f0.github.io/invoke-toolkit/humans/rich-output/): styled messages, spinners, and a transient live panel showing the last three lines of subprocess output with `--show-command-output` ([#105](https://github.com/D3f0/invoke-toolkit/pull/105)). Disable animation when debugging ([#19](https://github.com/D3f0/invoke-toolkit/pull/19), [#25](https://github.com/D3f0/invoke-toolkit/pull/25)).
105
+ - [Completion](https://d3f0.github.io/invoke-toolkit/humans/completion/): install bash, zsh or fish support; complete typed choices, paths and configuration-aware callbacks ([#38](https://github.com/D3f0/invoke-toolkit/pull/38), [#41](https://github.com/D3f0/invoke-toolkit/pull/41), [#64](https://github.com/D3f0/invoke-toolkit/pull/64), [#101](https://github.com/D3f0/invoke-toolkit/pull/101), [#139](https://github.com/D3f0/invoke-toolkit/pull/139)).
106
+ - [Interactive selection](https://d3f0.github.io/invoke-toolkit/humans/interactive-selection/): fzf integration, with a simpler Rich numbered selector when fzf is unavailable ([#80](https://github.com/D3f0/invoke-toolkit/pull/80)).
107
+ - Close task names, aliases and namespaces are suggested after a typo; suggestions never execute a replacement command ([#140](https://github.com/D3f0/invoke-toolkit/pull/140)).
108
+
109
+ [Start with the human workflow](https://d3f0.github.io/invoke-toolkit/humans/).
110
+
111
+ ## PEP 723: one portable task file
112
+
113
+ Put dependency metadata and tasks in the same Python file. uv provides the environment; Toolkit's `script()` turns the file into an Invoke-style command interface. This is the bridge between an operator's local workflow and an agent's repeatable invocation.
114
+
115
+ Save as `portable_tasks.py`:
116
+
117
+ ```python
118
+ #!/usr/bin/env -S uv run --script
119
+ # /// script
120
+ # requires-python = ">=3.10"
121
+ # dependencies = ["invoke-toolkit"]
122
+ # ///
123
+ from invoke_toolkit import Context, script, task
124
+
125
+
126
+ @task
127
+ def hello(ctx: Context, name: str = "toolkit") -> None:
128
+ """Greet from a standalone task file."""
129
+ print(f"Hello, {name}!")
130
+
131
+
132
+ if __name__ == "__main__":
133
+ script()
134
+ ```
135
+
136
+ ```sh
137
+ uv run --script portable_tasks.py hello --name PEP723
138
+ uv run --script portable_tasks.py --list --list-format json
139
+ ```
140
+
141
+ With inline metadata, **uv ignores the surrounding project's dependencies**: declare everything the script imports. Toolkit still loads project configuration from the **current working directory**, not necessarily the script's directory ([#104](https://github.com/D3f0/invoke-toolkit/pull/104)); use `script(config_prefix="myapp")` for a custom configuration prefix ([#11](https://github.com/D3f0/invoke-toolkit/pull/11)).
142
+
143
+ For a Git-managed task file, `--list-changed` compares the current task definitions with `HEAD`, including staged and unstaged edits. New repositories without commits count all tasks as new. Imported tasks and indirect helper/global changes are excluded; this is not a dependency-impact analysis ([#146](https://github.com/D3f0/invoke-toolkit/pull/146)).
144
+
145
+ [Read the complete PEP 723 guide](https://d3f0.github.io/invoke-toolkit/pep723/) for configuration, dependency locking, import behavior and changed-task discovery.
146
+
147
+ ## For AI agents: discover, inspect, execute
148
+
149
+ ```sh
150
+ uv run intk --list --list-format json
151
+ uv run intk --help hello
152
+ uv run intk --disable-status hello --name agent
153
+ ```
154
+
155
+ JSON is a **listing format**, not a universal output mode. Task authors own task results: emit explicit JSON to stdout and diagnostics to stderr when you need a machine-readable contract. Listing and help import Python modules and execute top-level code; Toolkit is **not a sandbox**.
156
+
157
+ [Agent workflow and output contracts](https://d3f0.github.io/invoke-toolkit/agents/) · [Task-authoring skill](https://github.com/D3f0/invoke-toolkit/blob/main/skills/invoke-toolkit-tasks/SKILL.md) ([#110](https://github.com/D3f0/invoke-toolkit/pull/110))
158
+
159
+ ## Build reusable automation
160
+
161
+ Use the canonical library guides for the full APIs and boundaries:
162
+
163
+ | Need | Guide |
164
+ | --- | --- |
165
+ | Enum, Literal, Annotated and path arguments | [Typed arguments](https://d3f0.github.io/invoke-toolkit/guides/typed-arguments/) |
166
+ | Project, `local_tasks.py` and reusable namespaces | [Collections](https://d3f0.github.io/invoke-toolkit/guides/collections/) |
167
+ | Entry-point discovery and persistent `uv tool` plugin management | [Plugins](https://d3f0.github.io/invoke-toolkit/guides/plugins/) |
168
+ | Config files, CLI editing and typed schemas | [Configuration](https://d3f0.github.io/invoke-toolkit/guides/configuration/) |
169
+ | Dynamic defaults, URI resolvers and managed temporary files | [Fields](https://d3f0.github.io/invoke-toolkit/guides/fields/) |
170
+ | Optional task-result and completion caches | [Caching](https://d3f0.github.io/invoke-toolkit/guides/caching/) |
171
+ | Awaited commands and explicit concurrency | [Async tasks](https://d3f0.github.io/invoke-toolkit/guides/async/) |
172
+ | Subprocesses, redaction and process titles | [Execution](https://d3f0.github.io/invoke-toolkit/guides/execution/) |
173
+ | Reusable package templates | [Packages](https://d3f0.github.io/invoke-toolkit/guides/packages/) |
174
+
175
+ Optional packages are available as extras: `invoke-toolkit[cache]` for diskcache, `invoke-toolkit[copier]` or `invoke-toolkit[templating]` for package creation. Async task graphs remain sequential unless task code explicitly requests concurrency; the native async subprocess path is buffered and noninteractive, without PTY, watchers or sudo support.
176
+
177
+ Task and completion caches authenticate serialized values with HMAC-SHA256
178
+ before deserialization. The owner-only signing key lives under
179
+ `platformdirs.user_data_dir("invoke-toolkit")/cache-signing/cache.key`, outside
180
+ the cache directory. Unsigned legacy entries and tampered entries are cache
181
+ misses and are recomputed. Losing the key invalidates existing entries; if its
182
+ permissions or ownership are unsafe, caching is disabled rather than reading
183
+ unsigned data. New entries are stored inline in SQLite. Legacy DiskCache spill
184
+ files are not read or deleted automatically, because their filenames are
185
+ unauthenticated. See the [caching guide](https://d3f0.github.io/invoke-toolkit/guides/caching/).
186
+
187
+ These docs describe current `main`. A previously installed PyPI release may not include every recently merged improvement; see [installation options](https://d3f0.github.io/invoke-toolkit/getting-started/installation/) and the [complete PR map](https://d3f0.github.io/invoke-toolkit/reference/improvements/).
188
+
189
+ ## Development
190
+
191
+ See [CONTRIBUTING.md](https://github.com/D3f0/invoke-toolkit/blob/main/CONTRIBUTING.md) for the uv environment, checks and Zensical documentation workflow. Runtime Python support remains 3.10+; the documentation toolchain requires Python 3.11+.
192
+
193
+ ```sh
194
+ uv sync --group dev
195
+ uvx --with pre-commit-uv pre-commit install
196
+ ```
197
+
198
+ ## License
199
+
200
+ `invoke-toolkit` is distributed under the terms of the [MIT](https://spdx.org/licenses/MIT.html) license. See [LICENSE.txt](https://github.com/D3f0/invoke-toolkit/blob/main/LICENSE.txt).
@@ -0,0 +1,138 @@
1
+ # Invoke Toolkit
2
+
3
+ [![PyPI - Version](https://img.shields.io/pypi/v/invoke-toolkit.svg)](https://pypi.org/project/invoke-toolkit)
4
+ [![PyPI - Python Version](https://img.shields.io/pypi/pyversions/invoke-toolkit.svg)](https://pypi.org/project/invoke-toolkit)
5
+
6
+ **Python tasks for humans and AI agents, built on [Invoke](https://www.pyinvoke.org/).**
7
+
8
+ Invoke Toolkit keeps Invoke's task functions, contexts, namespaces and task chaining, and adds typed arguments, Rich terminal output, shell completion, reusable plugins and portable PEP 723 scripts. Use it as a library to build project automation, then expose the same tasks to a person at a terminal or an agent invoking explicit commands.
9
+
10
+ [Documentation](https://d3f0.github.io/invoke-toolkit/) · [Quickstart](https://d3f0.github.io/invoke-toolkit/getting-started/quickstart/) · [Migrating from Invoke](https://d3f0.github.io/invoke-toolkit/getting-started/from-invoke/) · [Improvement history](https://d3f0.github.io/invoke-toolkit/reference/improvements/)
11
+
12
+ ## Install and run your first task
13
+
14
+ Requires **Python 3.10+**; the library depends on **Invoke 3.0.3+** and **Rich 13+** ([compatibility change #114](https://github.com/D3f0/invoke-toolkit/pull/114)). With [uv](https://docs.astral.sh/uv/), install into a project:
15
+
16
+ ```sh
17
+ uv add invoke-toolkit
18
+ ```
19
+
20
+ Save this as `tasks.py`:
21
+
22
+ ```python
23
+ from invoke_toolkit import Context, task
24
+
25
+
26
+ @task
27
+ def hello(ctx: Context, name: str = "toolkit") -> None:
28
+ """Greet a person or an automation client."""
29
+ print(f"Hello, {name}!")
30
+ ```
31
+
32
+ Discover, inspect and execute it:
33
+
34
+ ```sh
35
+ uv run intk --list
36
+ uv run intk --help hello
37
+ uv run intk hello --name toolkit
38
+ ```
39
+
40
+ ## For humans: a helpful terminal interface
41
+
42
+ - [Rich output and status](https://d3f0.github.io/invoke-toolkit/humans/rich-output/): styled messages, spinners, and a transient live panel showing the last three lines of subprocess output with `--show-command-output` ([#105](https://github.com/D3f0/invoke-toolkit/pull/105)). Disable animation when debugging ([#19](https://github.com/D3f0/invoke-toolkit/pull/19), [#25](https://github.com/D3f0/invoke-toolkit/pull/25)).
43
+ - [Completion](https://d3f0.github.io/invoke-toolkit/humans/completion/): install bash, zsh or fish support; complete typed choices, paths and configuration-aware callbacks ([#38](https://github.com/D3f0/invoke-toolkit/pull/38), [#41](https://github.com/D3f0/invoke-toolkit/pull/41), [#64](https://github.com/D3f0/invoke-toolkit/pull/64), [#101](https://github.com/D3f0/invoke-toolkit/pull/101), [#139](https://github.com/D3f0/invoke-toolkit/pull/139)).
44
+ - [Interactive selection](https://d3f0.github.io/invoke-toolkit/humans/interactive-selection/): fzf integration, with a simpler Rich numbered selector when fzf is unavailable ([#80](https://github.com/D3f0/invoke-toolkit/pull/80)).
45
+ - Close task names, aliases and namespaces are suggested after a typo; suggestions never execute a replacement command ([#140](https://github.com/D3f0/invoke-toolkit/pull/140)).
46
+
47
+ [Start with the human workflow](https://d3f0.github.io/invoke-toolkit/humans/).
48
+
49
+ ## PEP 723: one portable task file
50
+
51
+ Put dependency metadata and tasks in the same Python file. uv provides the environment; Toolkit's `script()` turns the file into an Invoke-style command interface. This is the bridge between an operator's local workflow and an agent's repeatable invocation.
52
+
53
+ Save as `portable_tasks.py`:
54
+
55
+ ```python
56
+ #!/usr/bin/env -S uv run --script
57
+ # /// script
58
+ # requires-python = ">=3.10"
59
+ # dependencies = ["invoke-toolkit"]
60
+ # ///
61
+ from invoke_toolkit import Context, script, task
62
+
63
+
64
+ @task
65
+ def hello(ctx: Context, name: str = "toolkit") -> None:
66
+ """Greet from a standalone task file."""
67
+ print(f"Hello, {name}!")
68
+
69
+
70
+ if __name__ == "__main__":
71
+ script()
72
+ ```
73
+
74
+ ```sh
75
+ uv run --script portable_tasks.py hello --name PEP723
76
+ uv run --script portable_tasks.py --list --list-format json
77
+ ```
78
+
79
+ With inline metadata, **uv ignores the surrounding project's dependencies**: declare everything the script imports. Toolkit still loads project configuration from the **current working directory**, not necessarily the script's directory ([#104](https://github.com/D3f0/invoke-toolkit/pull/104)); use `script(config_prefix="myapp")` for a custom configuration prefix ([#11](https://github.com/D3f0/invoke-toolkit/pull/11)).
80
+
81
+ For a Git-managed task file, `--list-changed` compares the current task definitions with `HEAD`, including staged and unstaged edits. New repositories without commits count all tasks as new. Imported tasks and indirect helper/global changes are excluded; this is not a dependency-impact analysis ([#146](https://github.com/D3f0/invoke-toolkit/pull/146)).
82
+
83
+ [Read the complete PEP 723 guide](https://d3f0.github.io/invoke-toolkit/pep723/) for configuration, dependency locking, import behavior and changed-task discovery.
84
+
85
+ ## For AI agents: discover, inspect, execute
86
+
87
+ ```sh
88
+ uv run intk --list --list-format json
89
+ uv run intk --help hello
90
+ uv run intk --disable-status hello --name agent
91
+ ```
92
+
93
+ JSON is a **listing format**, not a universal output mode. Task authors own task results: emit explicit JSON to stdout and diagnostics to stderr when you need a machine-readable contract. Listing and help import Python modules and execute top-level code; Toolkit is **not a sandbox**.
94
+
95
+ [Agent workflow and output contracts](https://d3f0.github.io/invoke-toolkit/agents/) · [Task-authoring skill](https://github.com/D3f0/invoke-toolkit/blob/main/skills/invoke-toolkit-tasks/SKILL.md) ([#110](https://github.com/D3f0/invoke-toolkit/pull/110))
96
+
97
+ ## Build reusable automation
98
+
99
+ Use the canonical library guides for the full APIs and boundaries:
100
+
101
+ | Need | Guide |
102
+ | --- | --- |
103
+ | Enum, Literal, Annotated and path arguments | [Typed arguments](https://d3f0.github.io/invoke-toolkit/guides/typed-arguments/) |
104
+ | Project, `local_tasks.py` and reusable namespaces | [Collections](https://d3f0.github.io/invoke-toolkit/guides/collections/) |
105
+ | Entry-point discovery and persistent `uv tool` plugin management | [Plugins](https://d3f0.github.io/invoke-toolkit/guides/plugins/) |
106
+ | Config files, CLI editing and typed schemas | [Configuration](https://d3f0.github.io/invoke-toolkit/guides/configuration/) |
107
+ | Dynamic defaults, URI resolvers and managed temporary files | [Fields](https://d3f0.github.io/invoke-toolkit/guides/fields/) |
108
+ | Optional task-result and completion caches | [Caching](https://d3f0.github.io/invoke-toolkit/guides/caching/) |
109
+ | Awaited commands and explicit concurrency | [Async tasks](https://d3f0.github.io/invoke-toolkit/guides/async/) |
110
+ | Subprocesses, redaction and process titles | [Execution](https://d3f0.github.io/invoke-toolkit/guides/execution/) |
111
+ | Reusable package templates | [Packages](https://d3f0.github.io/invoke-toolkit/guides/packages/) |
112
+
113
+ Optional packages are available as extras: `invoke-toolkit[cache]` for diskcache, `invoke-toolkit[copier]` or `invoke-toolkit[templating]` for package creation. Async task graphs remain sequential unless task code explicitly requests concurrency; the native async subprocess path is buffered and noninteractive, without PTY, watchers or sudo support.
114
+
115
+ Task and completion caches authenticate serialized values with HMAC-SHA256
116
+ before deserialization. The owner-only signing key lives under
117
+ `platformdirs.user_data_dir("invoke-toolkit")/cache-signing/cache.key`, outside
118
+ the cache directory. Unsigned legacy entries and tampered entries are cache
119
+ misses and are recomputed. Losing the key invalidates existing entries; if its
120
+ permissions or ownership are unsafe, caching is disabled rather than reading
121
+ unsigned data. New entries are stored inline in SQLite. Legacy DiskCache spill
122
+ files are not read or deleted automatically, because their filenames are
123
+ unauthenticated. See the [caching guide](https://d3f0.github.io/invoke-toolkit/guides/caching/).
124
+
125
+ These docs describe current `main`. A previously installed PyPI release may not include every recently merged improvement; see [installation options](https://d3f0.github.io/invoke-toolkit/getting-started/installation/) and the [complete PR map](https://d3f0.github.io/invoke-toolkit/reference/improvements/).
126
+
127
+ ## Development
128
+
129
+ See [CONTRIBUTING.md](https://github.com/D3f0/invoke-toolkit/blob/main/CONTRIBUTING.md) for the uv environment, checks and Zensical documentation workflow. Runtime Python support remains 3.10+; the documentation toolchain requires Python 3.11+.
130
+
131
+ ```sh
132
+ uv sync --group dev
133
+ uvx --with pre-commit-uv pre-commit install
134
+ ```
135
+
136
+ ## License
137
+
138
+ `invoke-toolkit` is distributed under the terms of the [MIT](https://spdx.org/licenses/MIT.html) license. See [LICENSE.txt](https://github.com/D3f0/invoke-toolkit/blob/main/LICENSE.txt).
@@ -53,6 +53,7 @@ dependencies = [
53
53
  "pyyaml>=6.0.3",
54
54
  "platformdirs>=4.5.0",
55
55
  "httpx>=0.28.1",
56
+ "anyio>=4.14.2",
56
57
  "setproctitle>=1.3.7",
57
58
  "attrs>=24.1.0",
58
59
  "cattrs>=24.1.0",
@@ -96,7 +97,7 @@ invoke-toolkit = "invoke_toolkit.program.main:program.run"
96
97
 
97
98
 
98
99
  [project.urls]
99
- Documentation = "https://github.com/D3f0/invoke-toolkit#readme"
100
+ Documentation = "https://d3f0.github.io/invoke-toolkit/"
100
101
  Issues = "https://github.com/D3f0/invoke-toolkit/issues"
101
102
  Source = "https://github.com/D3f0/invoke-toolkit"
102
103
 
@@ -165,27 +166,49 @@ full = [
165
166
  ci = [
166
167
  "nox>=2025.10.16",
167
168
  ]
168
- dev = [
169
+ typing = [
170
+ "pyright>=1.1.404",
171
+ ]
172
+ test = [
169
173
  "copier>=9.16.0",
170
174
  "diskcache>=5.6.0",
175
+ "pexpect>=4.9.0",
176
+ "pytest>=9.1.1",
177
+ "pytest-cov>=5.0.0",
178
+ "pytest-html>=4.1.1",
179
+ "pytest-xdist>=3.8.0",
180
+ ]
181
+ dev = [
182
+ { include-group = "test" },
183
+ { include-group = "typing" },
171
184
  "hunter>=3.7.0",
172
185
  "pdbpp>=0.11.7",
173
- "pexpect>=4.9.0",
174
186
  "pre-commit>=4.3.0",
175
187
  "pre-commit-uv>=4.2.0",
176
188
  "pylint>=3.2.7",
177
189
  "pylint-per-file-ignores>=1.0.0",
178
- "pyright>=1.1.404",
179
- "pytest>=9.1.1",
180
- "pytest-cov>=5.0.0",
181
- "pytest-html>=4.1.1",
182
190
  "pytest-picked>=0.5.1",
183
191
  "pytest-sugar>=1.1.1",
184
- "pytest-xdist>=3.8.0",
185
192
  "ty>=0.0.1a25",
186
193
  ]
187
194
  doc = [
188
- "quartodoc>=0.11.1",
195
+ "zensical==0.0.73",
196
+ ]
197
+
198
+ [tool.uv.dependency-groups]
199
+ doc = { requires-python = ">=3.11" }
200
+ dev = { requires-python = ">=3.11" }
201
+ ci = { requires-python = ">=3.11" }
202
+ test = { requires-python = ">=3.11" }
203
+ typing = { requires-python = ">=3.11" }
204
+
205
+ [tool.uv]
206
+ constraint-dependencies = [
207
+ "black>=26.10.1",
208
+ "filelock>=4.2.1",
209
+ "urllib3>=2.8.0",
210
+ "uv>=0.13.4",
211
+ "virtualenv>=21.14.9",
189
212
  ]
190
213
 
191
214
  [tool.pylint.main]
@@ -76,7 +76,69 @@ from invoke.watchers import FailingResponder, Responder, StreamWatcher # noqa
76
76
  __version__ = metadata.version("invoke_toolkit")
77
77
 
78
78
 
79
- # __all__ = ["task", "Context", "run", "script"]
79
+ __all__ = [
80
+ "__version__",
81
+ # Toolkit API
82
+ "task",
83
+ "Context",
84
+ "Collection",
85
+ "Config",
86
+ "script",
87
+ "ToolkitArgument",
88
+ "Field",
89
+ "FieldResolver",
90
+ "FieldResolutionRequest",
91
+ "cached",
92
+ "call",
93
+ "CacheConfig",
94
+ "cache_stats",
95
+ "clear_task_cache",
96
+ "global_context",
97
+ "run",
98
+ "sudo",
99
+ # Typed path and pattern helpers
100
+ "DirPath",
101
+ "DirPathStr",
102
+ "FilePath",
103
+ "FilePathStr",
104
+ "FilePattern",
105
+ "FilePatternStr",
106
+ # Upstream Invoke API
107
+ "MockContext",
108
+ "AmbiguousEnvVar",
109
+ "AuthFailure",
110
+ "CollectionNotFound",
111
+ "CommandTimedOut",
112
+ "Exit",
113
+ "ParseError",
114
+ "PlatformError",
115
+ "ResponseNotAccepted",
116
+ "SubprocessPipeError",
117
+ "ThreadException",
118
+ "UncastableEnvVar",
119
+ "UnexpectedExit",
120
+ "UnknownFileType",
121
+ "UnpicklableConfigMember",
122
+ "WatcherError",
123
+ "Executor",
124
+ "FilesystemLoader",
125
+ "Argument",
126
+ "Parser",
127
+ "ParserContext",
128
+ "ParseResult",
129
+ "Program",
130
+ "Failure",
131
+ "Local",
132
+ "Promise",
133
+ "Result",
134
+ "Runner",
135
+ "Call",
136
+ "Task",
137
+ "pty_size",
138
+ "FailingResponder",
139
+ "Responder",
140
+ "StreamWatcher",
141
+ ]
80
142
 
81
143
  # Global storage for the context instance
82
144
  _global_context_instance: Any = None
@@ -10,11 +10,10 @@ from typing import (
10
10
  Any,
11
11
  Literal,
12
12
  NoReturn,
13
- Protocol,
14
13
  TypeVar,
15
14
  overload,
16
15
  )
17
- from collections.abc import Awaitable, Callable, Generator, Iterator
16
+ from collections.abc import Awaitable, Callable, Iterator
18
17
 
19
18
  import setproctitle
20
19
  from invoke.context import Context
@@ -31,34 +30,18 @@ from .async_tools import AsyncGatherScope, in_async_task_context, run_async_comm
31
30
 
32
31
  if TYPE_CHECKING:
33
32
  from rich.console import Console
34
- from rich.status import Status
35
33
  # from rich.console import RenderableType, StyleType
36
34
 
37
35
  T = TypeVar("T")
38
36
 
39
37
 
40
- class ConfigProtocol(Protocol):
41
- """Type annotated override"""
42
-
43
- status: Generator["Status", None, None]
44
- console: "Console"
45
- status_stop: Callable
46
- status_update: Callable
47
- print: BoundPrintProtocol
48
-
49
- def rich_exit(self, message: str = "Exited", exit_code: int | None = 1) -> NoReturn:
50
- """Rich exit"""
51
-
52
- def proctitle(self, title: str) -> Iterator[None]:
53
- """Context manager to set the process title"""
54
-
55
-
56
- class ToolkitContext(Context, ConfigProtocol):
38
+ class ToolkitContext(Context):
57
39
  """Type annotated override with async task support."""
58
40
 
59
41
  _config: ToolkitConfig
60
42
  _status_helper: StatusHelper
61
43
  _field_cleanup: Any
44
+ _console: "Console"
62
45
 
63
46
  # Override cd with proper type annotation to fix PathLike[Unknown] issue
64
47
  cd: Callable[[PathLike[str] | str], _GeneratorContextManager[None, None, None]]
@@ -129,12 +112,12 @@ class ToolkitContext(Context, ConfigProtocol):
129
112
  sys.exit(exit_code)
130
113
 
131
114
  @property
132
- def print(self):
115
+ def print(self) -> BoundPrintProtocol:
133
116
  """Rich print, use square bracketed markup for color/highlights"""
134
117
  return get_console("out").print
135
118
 
136
119
  @property
137
- def print_err(self):
120
+ def print_err(self) -> BoundPrintProtocol:
138
121
  """Rich print, use square bracketed markup for color/highlights"""
139
122
  return self._console.print
140
123
 
@@ -40,6 +40,12 @@ class BoundPrintProtocol(Protocol):
40
40
  ) -> None: ...
41
41
 
42
42
 
43
+ class PrintErrContextProtocol(Protocol):
44
+ """Context capabilities required by output helpers."""
45
+
46
+ print_err: BoundPrintProtocol
47
+
48
+
43
49
  class ContextRunProtocol(Protocol):
44
50
  """This is a protocol describing the invoke.runners.Local.run arguments.
45
51
  The description have been shortened.
@@ -3,6 +3,7 @@
3
3
  import hashlib
4
4
  import json
5
5
  import re
6
+ import shlex
6
7
  import subprocess
7
8
  from pathlib import Path
8
9
  from shutil import which
@@ -102,7 +103,7 @@ def script(
102
103
  runnable=False,
103
104
  ) -> None:
104
105
  """
105
- Creates a new script
106
+ Creates a new tasks.py inline Python script.
106
107
 
107
108
  ```bash
108
109
  ```
@@ -541,17 +542,29 @@ def script_env(
541
542
  if not which("uv"):
542
543
  ctx.rich_exit("uv is not installed. Please install uv first.")
543
544
 
544
- # Create or update the virtual environment
545
+ # Create or update the virtual environment.
545
546
  with ctx.status(f"Creating/updating virtual environment at {env_path}"):
546
547
  if not env_path.exists():
547
- ctx.run(f"uv venv {env_path}", hide=not ctx.config.run.echo)
548
+ ctx.run(
549
+ shlex.join(["uv", "venv", str(env_path)]),
550
+ hide=not ctx.config.run.echo,
551
+ )
548
552
 
549
- # Install/update dependencies if any
553
+ # Install/update dependencies if any.
550
554
  if dependencies:
551
555
  deps_str = " ".join(dependencies)
552
556
  with ctx.status(f"Installing dependencies: {deps_str}"):
553
557
  ctx.run(
554
- f"uv pip install --python {env_path}/bin/python {deps_str}",
558
+ shlex.join(
559
+ [
560
+ "uv",
561
+ "pip",
562
+ "install",
563
+ "--python",
564
+ str(env_path / "bin" / "python"),
565
+ *dependencies,
566
+ ]
567
+ ),
555
568
  hide=not ctx.config.run.echo,
556
569
  )
557
570