Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/secrethub/secrethub-cli
A secrets management platform that every engineer can use with minimal code changes.
https://github.com/secrethub/secrethub-cli
cli devops go golang secret-management secrets secrets-management security
Last synced: 7 days ago
JSON representation
A secrets management platform that every engineer can use with minimal code changes.
- Host: GitHub
- URL: https://github.com/secrethub/secrethub-cli
- Owner: secrethub
- License: apache-2.0
- Archived: true
- Created: 2018-12-24T10:26:14.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2022-11-14T09:57:52.000Z (about 2 years ago)
- Last Synced: 2024-10-28T01:55:14.526Z (24 days ago)
- Topics: cli, devops, go, golang, secret-management, secrets, secrets-management, security
- Language: Go
- Homepage: https://secrethub.io
- Size: 10.2 MB
- Stars: 135
- Watchers: 11
- Forks: 23
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
- jimsghstars - secrethub/secrethub-cli - A secrets management platform that every engineer can use with minimal code changes. (Go)
README
SecretHub has joined 1Password! Find out more on the SecretHub blog. 🎉
# SecretHub CLI
[![GoDoc](https://godoc.org/github.com/secrethub/secrethub-cli?status.svg)][godoc]
[![CircleCI](https://circleci.com/gh/secrethub/secrethub-cli.svg?style=shield)][circle-ci]
[![Go Report Card](https://goreportcard.com/badge/github.com/secrethub/secrethub-cli)][goreportcard]
[![Version](https://img.shields.io/github/release/secrethub/secrethub-cli.svg)][latest-version]
[![Discord](https://img.shields.io/badge/chat-on%20discord-7289da.svg?logo=discord)][discord]The SecretHub CLI provides the command-line interface to interact with the SecretHub API.
> [SecretHub][secrethub] is a secrets management tool that works for every engineer. Securely provision passwords and keys throughout your entire stack with just a few lines of code.
## Usage
Below you can find a selection of some of the most-used SecretHub commands. Run `secrethub --help` or the [CLI reference docs][cli-reference-docs] for a complete list of all commands.
### Reading and writing secrets
```sh
$ secrethub read
Print a secret to stdout.$ secrethub generate
Generate a random value and store it as a new version of a secret$ secrethub write
Ask for a value to store as a secret.$ echo "mysecret" | secrethub write
Store a piped value as a secret.$ secrethub write -i
Store the contents of a file as a secret.
```### Provisioning your applications with secrets
```sh
$ export MYSECRET=secrethub://path/to/secret
$ secrethub run --
Automatically load secrets into environment variables and provide them to the wrapped executable or script.$ echo "mysecret: {{path/to/secret}}" | secrethub inject
Read a configuration template from stdin and automatically inject secrets into it.
```### Access control
```sh
$ secrethub service init / --permission :
Create a service account for the given repository and automatically grant read, write or admin permission on the given directory.$ secrethub acl set
Grant an account read, write or admin permission on a directory.$ secrethub repo revoke /
Revoke an account's access to a repository.
```## Integrations
SecretHub integrates with all the tools you already know and love.
Check out the [Integrations](integrations) page to find out how SecretHub works with your tools.
## Getting help
Come chat with us on [Discord][discord] or email us at [[email protected]](mailto:[email protected])
## Development
Pull requests from the community are welcome.
If you'd like to contribute, please checkout [the contributing guidelines](./CONTRIBUTING.md).### Build
To build from source, having [Golang](https://golang.org) installed is required.
To build the binary in the current directory, run:```sh
make build
```### Install
To install the binary in the [GOBIN](https://golang.org/cmd/go/#hdr-GOPATH_environment_variable) directory, run:
```sh
make install
```### Test
Run all tests:
make test
Run tests for one package:
go test ./internals/secrethub
Run a single test:
go test ./internals/secrethub -run TestWriteCommand_Run
[secrethub]: https://secrethub.io/
[getting-started]: https://secrethub.io/docs/getting-started/
[cli-reference-docs]: https://secrethub.io/docs/reference/cli/
[integrations]: https://secrethub.io/integrations/
[releases]: https://github.com/secrethub/secrethub-cli/releases
[latest-version]: https://github.com/secrethub/secrethub-cli/releases/latest
[godoc]: http://godoc.org/github.com/secrethub/secrethub-cli
[goreportcard]: https://goreportcard.com/report/github.com/secrethub/secrethub-cli
[circle-ci]: https://circleci.com/gh/secrethub/secrethub-cli
[discord]: https://discord.gg/gyQXAFU