invoke-toolkit 0.0.70__tar.gz → 0.0.71__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.
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/PKG-INFO +42 -1
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/README.md +41 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/pyproject.toml +1 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/src/invoke_toolkit/completion.py +2 -64
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/src/invoke_toolkit/extensions/tasks/create.py +4 -0
- invoke_toolkit-0.0.71/src/invoke_toolkit/extensions/tasks/plugin.py +177 -0
- invoke_toolkit-0.0.71/src/invoke_toolkit/extensions/uv_tools.py +427 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/src/invoke_toolkit/program/program.py +4 -30
- invoke_toolkit-0.0.71/tests/extensions/test_uv_plugins.py +402 -0
- invoke_toolkit-0.0.71/tests/integration/pty_plugin_completion.py +54 -0
- invoke_toolkit-0.0.71/tests/integration/uv_tool_plugins.sh +72 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/tests/test_completion_with_choices.py +1 -99
- invoke_toolkit-0.0.70/tests/Dockerfile.fish +0 -15
- invoke_toolkit-0.0.70/tests/fish.config.fish +0 -3
- invoke_toolkit-0.0.70/tests/test_fish_task.py +0 -44
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/.gitignore +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/LICENSE.txt +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/src/invoke_toolkit/__init__.py +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/src/invoke_toolkit/__main__.py +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/src/invoke_toolkit/collections.py +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/src/invoke_toolkit/config/__init__.py +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/src/invoke_toolkit/config/config.py +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/src/invoke_toolkit/config/registry.py +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/src/invoke_toolkit/config/schema.py +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/src/invoke_toolkit/config/status_helper.py +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/src/invoke_toolkit/context/__init__.py +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/src/invoke_toolkit/context/async_tools.py +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/src/invoke_toolkit/context/context.py +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/src/invoke_toolkit/context/types.py +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/src/invoke_toolkit/executor.py +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/src/invoke_toolkit/extensions/__init__.py +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/src/invoke_toolkit/extensions/tasks/__init__.py +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/src/invoke_toolkit/extensions/tasks/config.py +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/src/invoke_toolkit/extensions/tasks/dist.py +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/src/invoke_toolkit/extensions/tasks/shell.py +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/src/invoke_toolkit/field_resolvers.py +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/src/invoke_toolkit/loader/entrypoint.py +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/src/invoke_toolkit/log/__init__.py +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/src/invoke_toolkit/log/logger.py +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/src/invoke_toolkit/output/__init__.py +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/src/invoke_toolkit/output/console.py +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/src/invoke_toolkit/output/utils.py +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/src/invoke_toolkit/parser.py +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/src/invoke_toolkit/program/__init__.py +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/src/invoke_toolkit/program/main.py +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/src/invoke_toolkit/py.typed +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/src/invoke_toolkit/runners/__init__.py +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/src/invoke_toolkit/runners/rich.py +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/src/invoke_toolkit/scripts/__init__.py +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/src/invoke_toolkit/scripts/loader.py +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/src/invoke_toolkit/tasks/__init__.py +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/src/invoke_toolkit/tasks/autocomplete.py +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/src/invoke_toolkit/tasks/cache.py +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/src/invoke_toolkit/tasks/fields.py +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/src/invoke_toolkit/tasks/fields.pyi +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/src/invoke_toolkit/tasks/tasks.py +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/src/invoke_toolkit/tasks/types.py +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/src/invoke_toolkit/testing.py +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/src/invoke_toolkit/utils/__init__.py +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/src/invoke_toolkit/utils/fzf.py +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/src/invoke_toolkit/utils/inspection.py +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/src/invoke_toolkit/utils/singleton.py +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/src/invoke_toolkit/utils/text.py +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/templates/package-template/.gitignore.jinja +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/templates/package-template/README.md.jinja +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/templates/package-template/copier.yml +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/templates/package-template/pyproject.toml.jinja +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/templates/package-template/src/{{package_slug}}/__init__.py.jinja +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/templates/package-template/src/{{package_slug}}/tasks.py.jinja +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/templates/provider-template/.gitignore.jinja +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/templates/provider-template/README.md.jinja +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/templates/provider-template/copier.yml +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/templates/provider-template/pyproject.toml.jinja +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/templates/provider-template/src/{{package_slug}}/__init__.py.jinja +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/templates/provider-template/tests/test_resolver.py.jinja +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/tests/__init__.py +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/tests/conftest.py +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/tests/examples/cached_completion/tasks.py +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/tests/examples/completion_with_config/.gitignore +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/tests/examples/completion_with_config/tasks.py +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/tests/examples/config_schema/tasks.py +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/tests/examples/enum_select_size/tasks.py +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/tests/examples/fzf_selector/tasks.py +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/tests/examples/literal_set_level/tasks.py +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/tests/examples/local_field_resolver/tasks.py +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/tests/examples/local_tasks/local_tasks.py +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/tests/examples/local_tasks/tasks.py +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/tests/extensions/conftest.py +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/tests/extensions/test_config_tasks.py +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/tests/extensions/test_create.py +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/tests/extensions/test_package_template_entrypoint.py +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/tests/extensions/test_shell_tasks.py +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/tests/fixtures/future_fields.py +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/tests/original_invoke/__init__.py +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/tests/original_invoke/_support/configs/all-four/invoke.json +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/tests/original_invoke/_support/configs/all-four/invoke.py +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/tests/original_invoke/_support/configs/all-four/invoke.yml +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/tests/original_invoke/_support/configs/collection.py +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/tests/original_invoke/_support/configs/echo.yaml +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/tests/original_invoke/_support/configs/json/invoke.json +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/tests/original_invoke/_support/configs/json-and-python/invoke.json +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/tests/original_invoke/_support/configs/json-and-python/invoke.py +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/tests/original_invoke/_support/configs/no-dedupe.yaml +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/tests/original_invoke/_support/configs/no-echo.yaml +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/tests/original_invoke/_support/configs/package/invoke.yml +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/tests/original_invoke/_support/configs/package/tasks/__init__.py +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/tests/original_invoke/_support/configs/python/invoke.py +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/tests/original_invoke/_support/configs/runtime.py +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/tests/original_invoke/_support/configs/three-of-em/invoke.json +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/tests/original_invoke/_support/configs/three-of-em/invoke.py +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/tests/original_invoke/_support/configs/three-of-em/invoke.yml +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/tests/original_invoke/_support/configs/underscores/tasks.py +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/tests/original_invoke/_support/configs/yaml/explicit.py +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/tests/original_invoke/_support/configs/yaml/tasks.py +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/tests/original_invoke/_support/configs/yml/explicit.py +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/tests/original_invoke/_support/configs/yml/invoke.yml +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/tests/original_invoke/_support/configs/yml/tasks.py +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/tests/original_invoke/_support/has_modules.py +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/tests/original_invoke/conftest.py +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/tests/original_invoke/test_config.py +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/tests/program/main.py +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/tests/program/tasks/__init__.py +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/tests/program/tasks/coll1.py +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/tests/script/test_script.py +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/tests/tasks/test_cache.py +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/tests/tasks/test_extensions_config.py +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/tests/test_alias_self_reference.py +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/tests/test_annotated_help.py +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/tests/test_async_edge_cases.py +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/tests/test_async_support.py +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/tests/test_cofig_class.py +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/tests/test_collection.py +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/tests/test_collection_configure.py +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/tests/test_config_helper.py +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/tests/test_config_registry.py +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/tests/test_config_schema.py +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/tests/test_console.py +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/tests/test_context_class.py +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/tests/test_disable_status_cli.py +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/tests/test_enum_arguments.py +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/tests/test_executor.py +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/tests/test_field_typing.py +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/tests/test_fields.py +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/tests/test_file_completion.py +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/tests/test_global_context.py +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/tests/test_help_flags.py +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/tests/test_invoke_3_compat.py +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/tests/test_invoke_compatibility.py +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/tests/test_list_filter_flags.py +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/tests/test_loader.py +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/tests/test_parsing.py +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/tests/test_proctitle.py +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/tests/test_program_with_collection.py +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/tests/test_pty_stdin.py +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/tests/test_release_guard.py +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/tests/test_toplevel.py +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/tests/typecheck/fields.py +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/tests/typecheck/fields_negative.py.fixture +0 -0
- {invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/tests/utils/test_fzf.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: invoke-toolkit
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.71
|
|
4
4
|
Summary: Extended APIs for PyInvoke: composable task plugins, typed CLI args, Rich output, shell completion, and PEP 723 script support
|
|
5
5
|
Project-URL: Documentation, https://github.com/D3f0/invoke-toolkit#readme
|
|
6
6
|
Project-URL: Issues, https://github.com/D3f0/invoke-toolkit/issues
|
|
@@ -235,6 +235,47 @@ Provider packages expose no task collection. Providers return text only; for
|
|
|
235
235
|
`Path` fields invoke-toolkit materializes and cleans the resulting temporary
|
|
236
236
|
file according to that Field's cleanup lifetime.
|
|
237
237
|
|
|
238
|
+
## uv tool plugins
|
|
239
|
+
|
|
240
|
+
Plugin management requires a persistent `uv tool install invoke-toolkit`
|
|
241
|
+
environment. Plugins are distributions that expose an
|
|
242
|
+
`invoke_toolkit.collection` entry point; their package names do not need an
|
|
243
|
+
`invoke-toolkit-` prefix.
|
|
244
|
+
|
|
245
|
+
```console
|
|
246
|
+
intk -x plugin.list
|
|
247
|
+
intk -x plugin.add 'invoke-toolkit-example>=1'
|
|
248
|
+
intk -x plugin.add git+https://github.com/example/invoke-toolkit-example.git
|
|
249
|
+
intk -x plugin.add ./invoke-toolkit-example
|
|
250
|
+
intk -x plugin.link ./invoke-toolkit-example
|
|
251
|
+
intk -x plugin.update --name invoke-toolkit-example
|
|
252
|
+
intk -x plugin.update
|
|
253
|
+
intk -x plugin.remove invoke-toolkit-example
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
`plugin.add` uses uv's `--with` mode. A local directory is built as a static
|
|
257
|
+
installation. `plugin.link` uses `--with-editable`, so source changes are live.
|
|
258
|
+
A named update refreshes one non-editable plugin; an update without a name
|
|
259
|
+
refreshes all non-editable plugins and reports linked plugins as skipped.
|
|
260
|
+
Registry constraints and pinned Git references remain in effect. Plugin updates
|
|
261
|
+
do not update invoke-toolkit itself.
|
|
262
|
+
Shell completion suggests directly installed plugin names for `plugin.remove`
|
|
263
|
+
and named `plugin.update` operations.
|
|
264
|
+
|
|
265
|
+
|
|
266
|
+
These commands reject `uvx`, `uv run`, project environments, and installations
|
|
267
|
+
managed by another tool. pipx offers a similar manual workflow:
|
|
268
|
+
|
|
269
|
+
```console
|
|
270
|
+
pipx inject invoke-toolkit PLUGIN
|
|
271
|
+
pipx inject invoke-toolkit --editable ./PLUGIN
|
|
272
|
+
pipx uninject invoke-toolkit PLUGIN
|
|
273
|
+
pipx list --include-injected
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
pipx accepts registry, local, and Git sources supported by pip. invoke-toolkit
|
|
277
|
+
does not detect or execute pipx lifecycle operations.
|
|
278
|
+
|
|
238
279
|
## Development
|
|
239
280
|
|
|
240
281
|
This project utilizes the `pre-commit` framework, make sure you run:
|
|
@@ -174,6 +174,47 @@ Provider packages expose no task collection. Providers return text only; for
|
|
|
174
174
|
`Path` fields invoke-toolkit materializes and cleans the resulting temporary
|
|
175
175
|
file according to that Field's cleanup lifetime.
|
|
176
176
|
|
|
177
|
+
## uv tool plugins
|
|
178
|
+
|
|
179
|
+
Plugin management requires a persistent `uv tool install invoke-toolkit`
|
|
180
|
+
environment. Plugins are distributions that expose an
|
|
181
|
+
`invoke_toolkit.collection` entry point; their package names do not need an
|
|
182
|
+
`invoke-toolkit-` prefix.
|
|
183
|
+
|
|
184
|
+
```console
|
|
185
|
+
intk -x plugin.list
|
|
186
|
+
intk -x plugin.add 'invoke-toolkit-example>=1'
|
|
187
|
+
intk -x plugin.add git+https://github.com/example/invoke-toolkit-example.git
|
|
188
|
+
intk -x plugin.add ./invoke-toolkit-example
|
|
189
|
+
intk -x plugin.link ./invoke-toolkit-example
|
|
190
|
+
intk -x plugin.update --name invoke-toolkit-example
|
|
191
|
+
intk -x plugin.update
|
|
192
|
+
intk -x plugin.remove invoke-toolkit-example
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
`plugin.add` uses uv's `--with` mode. A local directory is built as a static
|
|
196
|
+
installation. `plugin.link` uses `--with-editable`, so source changes are live.
|
|
197
|
+
A named update refreshes one non-editable plugin; an update without a name
|
|
198
|
+
refreshes all non-editable plugins and reports linked plugins as skipped.
|
|
199
|
+
Registry constraints and pinned Git references remain in effect. Plugin updates
|
|
200
|
+
do not update invoke-toolkit itself.
|
|
201
|
+
Shell completion suggests directly installed plugin names for `plugin.remove`
|
|
202
|
+
and named `plugin.update` operations.
|
|
203
|
+
|
|
204
|
+
|
|
205
|
+
These commands reject `uvx`, `uv run`, project environments, and installations
|
|
206
|
+
managed by another tool. pipx offers a similar manual workflow:
|
|
207
|
+
|
|
208
|
+
```console
|
|
209
|
+
pipx inject invoke-toolkit PLUGIN
|
|
210
|
+
pipx inject invoke-toolkit --editable ./PLUGIN
|
|
211
|
+
pipx uninject invoke-toolkit PLUGIN
|
|
212
|
+
pipx list --include-injected
|
|
213
|
+
```
|
|
214
|
+
|
|
215
|
+
pipx accepts registry, local, and Git sources supported by pip. invoke-toolkit
|
|
216
|
+
does not detect or execute pipx lifecycle operations.
|
|
217
|
+
|
|
177
218
|
## Development
|
|
178
219
|
|
|
179
220
|
This project utilizes the `pre-commit` framework, make sure you run:
|
|
@@ -6,16 +6,12 @@ argument values for Enum and Literal parameters.
|
|
|
6
6
|
"""
|
|
7
7
|
|
|
8
8
|
import glob
|
|
9
|
-
import inspect
|
|
10
9
|
import os
|
|
11
10
|
import re
|
|
12
11
|
import shlex
|
|
13
12
|
from concurrent.futures import ThreadPoolExecutor
|
|
14
13
|
from concurrent.futures import TimeoutError as FuturesTimeoutError
|
|
15
14
|
|
|
16
|
-
from rich.errors import StyleSyntaxError
|
|
17
|
-
from rich.style import Style
|
|
18
|
-
|
|
19
15
|
from invoke.completion.complete import (
|
|
20
16
|
debug,
|
|
21
17
|
print_task_names,
|
|
@@ -32,64 +28,6 @@ from invoke_toolkit.tasks.tasks import (
|
|
|
32
28
|
from invoke_toolkit.tasks.types import _FileCompletionMarker
|
|
33
29
|
|
|
34
30
|
|
|
35
|
-
def _strip_rich_markup(description: str) -> str:
|
|
36
|
-
"""Remove recognized Rich style tags while preserving literal brackets."""
|
|
37
|
-
tag_pattern = re.compile(r"(?P<slashes>\\*)\[(?P<tag>[^\[\]]+)\]")
|
|
38
|
-
open_tags: list[str] = []
|
|
39
|
-
output: list[str] = []
|
|
40
|
-
position = 0
|
|
41
|
-
|
|
42
|
-
for match in tag_pattern.finditer(description):
|
|
43
|
-
output.append(description[position : match.start()])
|
|
44
|
-
slashes = match.group("slashes")
|
|
45
|
-
tag = match.group("tag")
|
|
46
|
-
recognized = False
|
|
47
|
-
if len(slashes) % 2:
|
|
48
|
-
output.append(match.group(0))
|
|
49
|
-
elif tag.startswith("/"):
|
|
50
|
-
name = tag[1:].strip()
|
|
51
|
-
if name == "":
|
|
52
|
-
if open_tags:
|
|
53
|
-
open_tags.pop()
|
|
54
|
-
recognized = True
|
|
55
|
-
else:
|
|
56
|
-
normalized = Style.normalize(name)
|
|
57
|
-
if normalized in open_tags:
|
|
58
|
-
open_tags.remove(normalized)
|
|
59
|
-
recognized = True
|
|
60
|
-
if not recognized:
|
|
61
|
-
output.append(match.group(0))
|
|
62
|
-
else:
|
|
63
|
-
style_name, _, parameters = tag.partition("=")
|
|
64
|
-
try:
|
|
65
|
-
Style.parse(
|
|
66
|
-
style_name if not parameters else f"{style_name}={parameters}"
|
|
67
|
-
)
|
|
68
|
-
except StyleSyntaxError: # A non-style bracket expression is literal text.
|
|
69
|
-
output.append(match.group(0))
|
|
70
|
-
else:
|
|
71
|
-
open_tags.append(Style.normalize(style_name))
|
|
72
|
-
position = match.end()
|
|
73
|
-
|
|
74
|
-
output.append(description[position:])
|
|
75
|
-
return "".join(output).replace(r"\[", "[")
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
def _print_task_names_for_shell(collection) -> None:
|
|
79
|
-
"""Print task names with descriptions when Fish requests completion."""
|
|
80
|
-
if os.environ.get("INVOKE_COMPLETE_SHELL") != "fish":
|
|
81
|
-
print_task_names(collection)
|
|
82
|
-
return
|
|
83
|
-
|
|
84
|
-
for name in sorted(collection.task_names):
|
|
85
|
-
task = collection[name]
|
|
86
|
-
description = " ".join((inspect.getdoc(task) or "").splitlines()).strip()
|
|
87
|
-
description = _strip_rich_markup(description)
|
|
88
|
-
print(f"{name}\t{description}" if description else name)
|
|
89
|
-
for alias in collection.task_names[name]:
|
|
90
|
-
print(alias)
|
|
91
|
-
|
|
92
|
-
|
|
93
31
|
def _get_file_completions(
|
|
94
32
|
marker: "_FileCompletionMarker",
|
|
95
33
|
incomplete: str,
|
|
@@ -423,7 +361,7 @@ def _handle_flag_completion(
|
|
|
423
361
|
if not flag.takes_value:
|
|
424
362
|
# Boolean flags, print task names
|
|
425
363
|
debug("Found, takes no value, printing task names")
|
|
426
|
-
|
|
364
|
+
print_task_names(collection)
|
|
427
365
|
return False
|
|
428
366
|
|
|
429
367
|
# Extract the argument name from the flag object's canonical name
|
|
@@ -734,6 +672,6 @@ def complete_with_choices(
|
|
|
734
672
|
|
|
735
673
|
# Fall back to task name completion
|
|
736
674
|
debug("Last token isn't flag-like, just printing task names")
|
|
737
|
-
|
|
675
|
+
print_task_names(collection)
|
|
738
676
|
|
|
739
677
|
raise Exit
|
{invoke_toolkit-0.0.70 → invoke_toolkit-0.0.71}/src/invoke_toolkit/extensions/tasks/create.py
RENAMED
|
@@ -122,6 +122,10 @@ def script(
|
|
|
122
122
|
ctx.print_err(
|
|
123
123
|
f"You can run it with `uv run {path}`. This file contains the following code"
|
|
124
124
|
)
|
|
125
|
+
ctx.print_err(
|
|
126
|
+
"For a persistent uv tool with an editable plugin, use `uv tool install "
|
|
127
|
+
"invoke-toolkit --with-editable <plugin-path>`."
|
|
128
|
+
)
|
|
125
129
|
ctx.print_err(code)
|
|
126
130
|
|
|
127
131
|
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
"""Internal tasks for managing uv-installed invoke-toolkit plugins."""
|
|
2
|
+
|
|
3
|
+
import shlex
|
|
4
|
+
from pathlib import Path
|
|
5
|
+
from typing import Annotated
|
|
6
|
+
|
|
7
|
+
from invoke_toolkit import Context, task
|
|
8
|
+
from invoke_toolkit.extensions.uv_tools import (
|
|
9
|
+
AmbiguousPluginError,
|
|
10
|
+
Plugin,
|
|
11
|
+
PluginNotFoundError,
|
|
12
|
+
ReceiptError,
|
|
13
|
+
ToolReceipt,
|
|
14
|
+
UvTool,
|
|
15
|
+
active_tool,
|
|
16
|
+
add_args,
|
|
17
|
+
installed_plugins,
|
|
18
|
+
link_args,
|
|
19
|
+
load_receipt,
|
|
20
|
+
remove_args,
|
|
21
|
+
resolve_plugin,
|
|
22
|
+
run_uv,
|
|
23
|
+
update_plan,
|
|
24
|
+
)
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
def _active_state(ctx: Context) -> tuple[UvTool, ToolReceipt]:
|
|
28
|
+
tool = active_tool()
|
|
29
|
+
if tool is None:
|
|
30
|
+
ctx.rich_exit(
|
|
31
|
+
"Could not detect an active uv tool installation for invoke-toolkit. "
|
|
32
|
+
"Run this command from a persistent uv tool, not uvx, uv run, or a "
|
|
33
|
+
"project environment."
|
|
34
|
+
)
|
|
35
|
+
assert tool is not None
|
|
36
|
+
try:
|
|
37
|
+
receipt = load_receipt(tool)
|
|
38
|
+
except ReceiptError as error:
|
|
39
|
+
ctx.rich_exit(str(error))
|
|
40
|
+
return tool, receipt
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
def _plugin_state(
|
|
44
|
+
ctx: Context,
|
|
45
|
+
) -> tuple[UvTool, ToolReceipt, tuple[Plugin, ...]]:
|
|
46
|
+
tool, receipt = _active_state(ctx)
|
|
47
|
+
return tool, receipt, installed_plugins(receipt)
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
def _run_or_exit(ctx: Context, args: list[str]) -> None:
|
|
51
|
+
ctx.print(f"Running: {shlex.join(args)}")
|
|
52
|
+
exit_code = run_uv(args)
|
|
53
|
+
if exit_code:
|
|
54
|
+
ctx.rich_exit("uv tool install failed", exit_code=exit_code)
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
def _print_plugin(ctx: Context, plugin: Plugin) -> None:
|
|
58
|
+
version = f" v{plugin.version}" if plugin.version else " (version unavailable)"
|
|
59
|
+
entry_points = ", ".join(plugin.entry_points)
|
|
60
|
+
if plugin.requirement is None:
|
|
61
|
+
source = "source unavailable"
|
|
62
|
+
else:
|
|
63
|
+
source = f"{plugin.requirement.source.value}: {plugin.requirement.value}"
|
|
64
|
+
if plugin.requirement.editable:
|
|
65
|
+
source += "; editable"
|
|
66
|
+
ctx.print(f"- {plugin.name}{version} [{entry_points}] ({source})")
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
def _resolve_or_exit(ctx: Context, plugins: tuple[Plugin, ...], name: str) -> Plugin:
|
|
70
|
+
try:
|
|
71
|
+
return resolve_plugin(plugins, name)
|
|
72
|
+
except (PluginNotFoundError, AmbiguousPluginError) as error:
|
|
73
|
+
ctx.rich_exit(str(error))
|
|
74
|
+
raise AssertionError("rich_exit must terminate execution")
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
def _complete_plugin_names(ctx: Context, incomplete: str = "") -> list[str]:
|
|
78
|
+
"""Complete directly installed plugin distribution names."""
|
|
79
|
+
try:
|
|
80
|
+
_, _, plugins = _plugin_state(ctx)
|
|
81
|
+
except (ReceiptError, AssertionError, SystemExit):
|
|
82
|
+
return []
|
|
83
|
+
return sorted(
|
|
84
|
+
plugin.name
|
|
85
|
+
for plugin in plugins
|
|
86
|
+
if plugin.requirement is not None and plugin.name.startswith(incomplete)
|
|
87
|
+
)
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
@task(name="list", autoprint=False)
|
|
91
|
+
def list_(ctx: Context) -> None:
|
|
92
|
+
"""List plugins installed with the active uv-managed invoke-toolkit."""
|
|
93
|
+
tool = active_tool()
|
|
94
|
+
if tool is None:
|
|
95
|
+
ctx.rich_exit(
|
|
96
|
+
"Could not detect an active uv tool installation for invoke-toolkit. "
|
|
97
|
+
"Run this command from a persistent uv tool, not uvx, uv run, or a "
|
|
98
|
+
"project environment."
|
|
99
|
+
)
|
|
100
|
+
assert tool is not None
|
|
101
|
+
try:
|
|
102
|
+
receipt = load_receipt(tool)
|
|
103
|
+
except ReceiptError:
|
|
104
|
+
receipt = None
|
|
105
|
+
plugins = installed_plugins(receipt)
|
|
106
|
+
ctx.print(f"invoke-toolkit v{tool.version or 'unknown'} (uv tool)")
|
|
107
|
+
if not plugins:
|
|
108
|
+
ctx.print("No invoke-toolkit plugins detected.")
|
|
109
|
+
return
|
|
110
|
+
ctx.print("Installed plugins:")
|
|
111
|
+
for installed in plugins:
|
|
112
|
+
_print_plugin(ctx, installed)
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
@task(name="add", positional=["source"])
|
|
116
|
+
def add(
|
|
117
|
+
ctx: Context,
|
|
118
|
+
source: Annotated[str, "Package requirement, URL, or static local path"],
|
|
119
|
+
) -> None:
|
|
120
|
+
"""Add a non-editable plugin requirement to the active uv tool."""
|
|
121
|
+
_, receipt = _active_state(ctx)
|
|
122
|
+
try:
|
|
123
|
+
args = add_args(receipt, source)
|
|
124
|
+
except ValueError as error:
|
|
125
|
+
ctx.rich_exit(str(error))
|
|
126
|
+
_run_or_exit(ctx, args)
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
@task(positional=["path"])
|
|
130
|
+
def link(
|
|
131
|
+
ctx: Context,
|
|
132
|
+
path: Annotated[Path, "Local plugin directory to install as editable"],
|
|
133
|
+
) -> None:
|
|
134
|
+
"""Link an editable local plugin into the active uv tool."""
|
|
135
|
+
_, receipt = _active_state(ctx)
|
|
136
|
+
try:
|
|
137
|
+
args = link_args(receipt, path)
|
|
138
|
+
except ValueError as error:
|
|
139
|
+
ctx.rich_exit(str(error))
|
|
140
|
+
_run_or_exit(ctx, args)
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
@task(positional=["name"])
|
|
144
|
+
def remove(
|
|
145
|
+
ctx: Context,
|
|
146
|
+
name: Annotated[
|
|
147
|
+
str, "Plugin distribution or entry-point name", _complete_plugin_names
|
|
148
|
+
],
|
|
149
|
+
) -> None:
|
|
150
|
+
"""Remove one directly installed plugin from the active uv tool."""
|
|
151
|
+
_, receipt, plugins = _plugin_state(ctx)
|
|
152
|
+
selected = _resolve_or_exit(ctx, plugins, name)
|
|
153
|
+
try:
|
|
154
|
+
args = remove_args(receipt, selected)
|
|
155
|
+
except ReceiptError as error:
|
|
156
|
+
ctx.rich_exit(str(error))
|
|
157
|
+
_run_or_exit(ctx, args)
|
|
158
|
+
|
|
159
|
+
|
|
160
|
+
@task(positional=["name"])
|
|
161
|
+
def update(
|
|
162
|
+
ctx: Context,
|
|
163
|
+
name: Annotated[
|
|
164
|
+
str, "Plugin distribution or entry-point name", _complete_plugin_names
|
|
165
|
+
] = "",
|
|
166
|
+
) -> None:
|
|
167
|
+
"""Update one plugin, or every non-editable plugin when NAME is omitted."""
|
|
168
|
+
_, receipt, plugins = _plugin_state(ctx)
|
|
169
|
+
try:
|
|
170
|
+
plan = update_plan(receipt, plugins, name or None)
|
|
171
|
+
except (PluginNotFoundError, AmbiguousPluginError, ReceiptError) as error:
|
|
172
|
+
ctx.rich_exit(str(error))
|
|
173
|
+
for skipped in plan.skipped:
|
|
174
|
+
ctx.print(f"Skipped editable plugin: {skipped.name}")
|
|
175
|
+
if plan.args is None:
|
|
176
|
+
return
|
|
177
|
+
_run_or_exit(ctx, plan.args)
|