|
13 | 13 |
|
14 | 14 | The SecretHub CLI provides the command-line interface to interact with the SecretHub API. |
15 | 15 |
|
16 | | -> [SecretHub][secrethub] is an end-to-end encrypted secret management service that helps developers keep database passwords, API keys, and other secrets out of source code. |
| 16 | +> [SecretHub][secrethub] is a secret management platform that every engineer can use. Securely provision passwords and keys throughout your entire stack with just a few lines of code. |
| 17 | +
|
| 18 | +## Get started |
| 19 | + |
| 20 | +Follow the [Getting Started Guide][getting-started] to quickly get up and running with SecretHub :rocket: |
17 | 21 |
|
18 | 22 | ## Usage |
19 | 23 |
|
| 24 | +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. |
| 25 | + |
| 26 | +### Reading and writing secrets |
20 | 27 | ```sh |
21 | | -$ secrethub write path/to/secret |
22 | | -Type in your secret: ************************ |
| 28 | +$ secrethub read <path/to/secret> |
| 29 | +Print a secret to stdout. |
23 | 30 |
|
24 | | -$ cat config.yml.tpl |
25 | | -db_user: myapp |
26 | | -db_password: {{ path/to/secret:latest }} |
| 31 | +$ secrethub generate <path/to/secret> |
| 32 | +Generate a random value and store it as a new version of a secret |
27 | 33 |
|
28 | | -$ cat config.yml.tpl | secrethub inject |
29 | | -db_user: myapp |
30 | | -db_password: LEYkTdMCksCVMc4X3gpYN0fk |
| 34 | +$ secrethub write <path/to/secret> |
| 35 | +Ask for a value to store as a secret. |
| 36 | + |
| 37 | +$ echo "mysecret" | secrethub write <path/to/secret> |
| 38 | +Store a piped value as a secret. |
| 39 | + |
| 40 | +$ secrethub write -i <filename> <path/to/secret> |
| 41 | +Store the contents of a file as a secret. |
31 | 42 | ``` |
32 | 43 |
|
33 | | -See the [reference docs][reference-docs] for a detailed overview of all commands. |
| 44 | +### Provisioning your applications with secrets |
| 45 | +```sh |
| 46 | +$ export MYSECRET=secrethub://path/to/secret |
| 47 | +$ secrethub run -- <executable/script> |
| 48 | +Automatically load secrets into environment variables and provide them to the wrapped executable or script. |
34 | 49 |
|
35 | | -## Get started |
| 50 | +$ echo "mysecret: {{path/to/secret}}" | secrethub inject |
| 51 | +Read a configuration template from stdin and automatically inject secrets into it. |
| 52 | +``` |
36 | 53 |
|
37 | | -### 1. [Download][installation-guide] the CLI. |
| 54 | +### Access control |
| 55 | +```sh |
| 56 | +$ secrethub service init <namespace>/<repo> --permission <dir>:<read/write/admin> |
| 57 | +Create a service account for the given repository and automatically grant read, write or admin permission on the given directory. |
38 | 58 |
|
39 | | -Official distributions are available for Linux, macOS, and Windows for both `386` (32-bit) and `amd64` (64-bit) architectures. |
| 59 | +$ secrethub acl set <path/to/directory> <account-name> <read/write/admin> |
| 60 | +Grant an account read, write or admin permission on a directory. |
40 | 61 |
|
41 | | -Check out the [installation guide][installation-guide] for detailed instructions on how to install the SecretHub CLI on your platform of choice. |
| 62 | +$ secrethub repo revoke <namespace>/<repo> <account-name> |
| 63 | +Revoke an account's access to a repository. |
| 64 | +``` |
42 | 65 |
|
43 | | -### 2. Run `signup` |
| 66 | +## Integrations |
44 | 67 |
|
45 | | -Run `signup` to claim your free developer account: |
| 68 | +SecretHub integrates with all the tools you already know and love. |
46 | 69 |
|
47 | | -``` |
48 | | -secrethub signup |
49 | | -``` |
| 70 | +<p align="left"> |
| 71 | + <img src="https://secrethub.io/img/features/integrations.png" width="450px" /> |
| 72 | +</p> |
50 | 73 |
|
51 | | -And you're done. |
52 | | -Follow the [getting started guide][getting-started] for a brief introduction into the basics of SecretHub. |
| 74 | +Check out the [Integrations](integrations) page to find out how SecretHub works with your tools. |
53 | 75 |
|
54 | 76 | ## Getting help |
55 | 77 |
|
@@ -93,10 +115,10 @@ Run a single test: |
93 | 115 |
|
94 | 116 |
|
95 | 117 |
|
96 | | -[secrethub]: https://secrethub.io |
| 118 | +[secrethub]: https://secrethub.io/ |
97 | 119 | [getting-started]: https://secrethub.io/docs/getting-started/ |
98 | | -[installation-guide]: https://secrethub.io/docs/getting-started/install |
99 | | -[reference-docs]: https://secrethub.io/docs/reference/ |
| 120 | +[cli-reference-docs]: https://secrethub.io/docs/reference/cli/ |
| 121 | +[integrations]: https://secrethub.io/integrations/ |
100 | 122 | [releases]: https://github.com/secrethub/secrethub-cli/releases |
101 | 123 | [latest-version]: https://github.com/secrethub/secrethub-cli/releases/latest |
102 | 124 | [godoc]: http://godoc.org/github.com/secrethub/secrethub-cli |
|
0 commit comments