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

Allow easy embedding of sops inside other Go CLI #1404

Open
mitar opened this issue Jan 4, 2024 · 2 comments
Open

Allow easy embedding of sops inside other Go CLI #1404

mitar opened this issue Jan 4, 2024 · 2 comments

Comments

@mitar
Copy link
Contributor

mitar commented Jan 4, 2024

Currently there is a lot of logic in cmd/sops package. But because it is a main package it is not really possible to reuse that from another CLI. I made gitlab-config tool which allows one to configure GitLab projects from a file. And I encrypt secrets using sops. So to make life easier for users I wanted to embed sops as a sub-command in gitlab-config tool, so that you can call gitlab-config sops .... Current code structure does not allow that. But it is relatively easy to do so, I made it in two commits in my fork:

Would this be something I could made a PR for? It would remove my last reason why I have a SOPS fork.

@felixfontein felixfontein changed the title Allow easy embedding of sops inside other CLI Allow easy embedding of sops inside other Go CLI Jan 5, 2024
@felixfontein
Copy link
Contributor

I know too little about go to be able to judge the changes. What do @getsops/maintainers think?

@mitar
Copy link
Contributor Author

mitar commented Jan 5, 2024

It is really just a way to get main function to be importable. This introduces a new API landscape, but CLI is in my view already kinda API.

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

2 participants