How to add a command to verdi in plugin?

Hi all, in the AiiDA docs, it says one can add a subcommand to a existing verdi commands, e.g., verdi data mycmd.
What if I want to add a new command to verdi directly, e.g.,

verdi worktree 

Which entry point should I use?

There is no such entry point mechanism for top level commands. It just exists for verdi data. You would have to provide your own CLI endpoint.

Should we provide the entry point for adding other commands?

Certainly we can discuss it with the rest of the team. Maybe we should make an analysis first of the potential downsides. One I can see is that the response speed of verdi as a whole can suffer if plugin commands are slow. This could affect tab-completion as a whole, which would be not desirable.