Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a new command with a plugin #798

Open
ThmX opened this issue Mar 29, 2023 · 3 comments
Open

Add a new command with a plugin #798

ThmX opened this issue Mar 29, 2023 · 3 comments

Comments

@ThmX
Copy link

ThmX commented Mar 29, 2023

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.

@ofek
Copy link
Sponsor Collaborator

ofek commented Mar 29, 2023

This is not yet possible but is a good idea. Thanks!

@ThmX
Copy link
Author

ThmX commented Mar 30, 2023

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?

@juftin
Copy link
Contributor

juftin commented Jan 30, 2024

How about click-plugins for something like this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants