hatch
hatch copied to clipboard
Add a new command with a plugin
Hi, Is it possible to add a new command from within a plugin?
Such as:
hatch custom-cmd abc
We recently migrated from poetry to hatch, and had our own plugin for poetry to manage custom things. And I would like hatch to be the base command where all the other commands are documented instead of having to create another program that would therefore wraps hatch commands.
This is not yet possible but is a good idea. Thanks!
This is not yet possible but is a good idea. Thanks!
I'll have a look and see if I can prepare a PR for it.
Any tips you can provide before I start deep diving? 😅 Most likely something with pluggy? And obviously I should stick to click?
Also: Any reason you used click instead of Typer to make use of type hinting?
How about click-plugins for something like this?