Allow easy embedding of sops inside other Go CLI
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 23.1k
- Forks
- 1.1k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 9
Description
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:
- https://github.com/tozd/sops/commit/00eeae52d11d0a81d8a39bc54c043a42f62c8be6
- https://github.com/tozd/sops/commit/4ff776e608171c0c71439c5ee8643aefeafbe57d
Would this be something I could made a PR for? It would remove my last reason why I have a SOPS fork.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the cmd/sops package and compare it with the two commits linked from the issue in the reporter's fork. Review how the current main-package structure prevents reuse by another Go CLI, then verify that the existing sops command still works when invoked directly and can also be embedded as a subcommand.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cli
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100