secrethub-cli

module
v0.21.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 11, 2019 License: Apache-2.0

README

SecretHub

CLI

GoDoc Travis CI GolangCI Go Report Card Version Discord

The SecretHub CLI provides the command-line interface to interact with SecretHub.

SecretHub is a developer tool to help you keep database passwords, API tokens, and other secrets out of IT automation scripts.

Usage

$ secrethub write path/to/secret
Type in your secret: ************************  

$ cat config.yml.tpl
db_user: myapp
db_password: ${path/to/secret:latest}

$ cat config.yml.tpl | secrethub inject
db_user: myapp
db_password: LEYkTdMCksCVMc4X3gpYN0fk

See the getting started guide for a more extensive introduction and check out the reference docs for an overview of all commands.

Installation

Official distributions are available for Linux, macOS, and Windows for both 386 (32-bit) and amd64 (64-bit) architectures.

Check out the installation guide for detailed instructions on how to install the SecretHub CLI on your platform of choice.

Development

Pull requests from the community are welcome. If you'd like to contribute, please checkout the contributing guidelines.

Build

To build from source, having Golang installed is required. To build the binary in the current directory, run:

make build

Install

To install the binary in the GOBIN directory, run:

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

Getting help

Come chat with us on Discord or email us at support@secrethub.io

Directories

Path Synopsis
cmd
secrethub command
internals
cli
cli/clip
Package clip provides functionality to read from and write to the clipboard.
Package clip provides functionality to read from and write to the clipboard.
cli/clip/fakeclip
Package fakeclip provides fake implementations of the clip.Clipper interface to be used for testing.
Package fakeclip provides fake implementations of the clip.Clipper interface to be used for testing.
cli/cloneproc
Package cloneproc provides functionality to spawn a detached clone of the current process.
Package cloneproc provides functionality to spawn a detached clone of the current process.
cli/filemode
Package filemode provides a wrapper around os.FileMode so that it can be parsed from a CLI flag.
Package filemode provides a wrapper around os.FileMode so that it can be parsed from a CLI flag.
cli/mlock
Package mlock allows for locking memory, providing implementations for different operating systems.
Package mlock allows for locking memory, providing implementations for different operating systems.
cli/progress
Package progress provides a printer that writes dots at a configured interval.
Package progress provides a printer that writes dots at a configured interval.
cli/progress/fakeprogress
Package fakeprogress provides an implementation of the progress.Printer interface to be used in tests.
Package fakeprogress provides an implementation of the progress.Printer interface to be used in tests.
cli/ui
Package ui provides a simple way to interact with the user through the terminal, i.e.
Package ui provides a simple way to interact with the user through the terminal, i.e.
secrethub
Package secrethub provides the SecretHub CLI application.
Package secrethub provides the SecretHub CLI application.
secretspec
Package secretspec provides functionality to set and clear secrets in environment variables, files and fields in configuration files, based on a specification provided in a secrets.yml file.
Package secretspec provides functionality to set and clear secrets in environment variables, files and fields in configuration files, based on a specification provided in a secrets.yml file.
tpl
Package tpl provides a way to parse a template string and inject secret values into it.
Package tpl provides a way to parse a template string and inject secret values into it.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL