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

Shuttle cli extensions #184

Open
kjuulh opened this issue Oct 15, 2023 · 0 comments · May be fixed by #219
Open

Shuttle cli extensions #184

kjuulh opened this issue Oct 15, 2023 · 0 comments · May be fixed by #219

Comments

@kjuulh
Copy link
Contributor

kjuulh commented Oct 15, 2023

What are shuttle cli extensions.

You may have used git extensions before without knowing. Those are the commands you run after git, such as git ignore, or other third party git plugins. This is a useful way of using the git name, to namespace the cli tool.

The way those work is that git, will look for binaries in PATH on your machine, if it finds a binary with the prefix, git-, it will allow those to be called. Such as git-ignore can now be called with git ignore (notice the lack of -).

git ignore -> git -> git-ignore. Or for shuttle
shuttle <some-binary> -> shuttle -> shuttle-<some-binary> replace with whatever tool you'd like to expose.

shuttle would also just forward all commandline arguments, such as.

shuttle release --env dev -> shuttle-release --env dev

Why is this relevant to shuttle

Right now shuttle is built to handle code sharing between projects often in a multi-repository setting. This feature would allow us to ship additional features, which may make shuttle useful outside of project work. This could be everything from working with other third party software, such as github actions, renovate, reviewing code. Specifically tools which aren't used by one specific project, but goes across a developers workflow on said projects.

If we wanted to, we could even do the same for hamctl, such that we would have a shuttle-release, which would just point at hamctl for actions. This would group all of our tools under one umbrella, without having to add specific code to shuttle itself.

Let me know what you think!

Implementation proposal

We could simply do the same as git, and look for binaries in PATH, if found we add an entry to help menu, such that they show up when using shuttle -h.

This would require looking in all folders mentioned in $PATH, or just a specific location we decide for shuttle, and if the binary is in there we pick it up and make it available.

@kjuulh kjuulh linked a pull request Jan 24, 2024 that will close this issue
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

Successfully merging a pull request may close this issue.

1 participant