Conceal is a command-line utility that eases the interaction between developer and OSX Keychain Access. It is the open-source companion to Summon as every secret added using this tool into Keychain is added using Summon-compliant formatting.
- MacOS
brew tap infamousjoeg/tap
brew install conceal
- Download the latest release available at GitHub Releases.
- Move the
conceal
executable file to a directory in yourPATH
. (I use~/bin
.) - In Terminal, run the following command to make sure it's in your
PATH
:
$ conceal
$ conceal set dockerhub/token
To add a secret to Keychain, call conceal
and use the set
command to pass the account name to add. You will be immediately prompted to provide a secret value in a secure manner.
$ conceal get dockerhub/token
To retrieve a secret from Keychain, call conceal
and use the get
command to pass the account name to retrieve from. The secret value will be added to your clipboard for 15 seconds.
$ conceal list
To list all secrets associated with Summon in Keychain, call conceal
and use the list
command to list all accounts present.
To filter the list further, pipe to grep
like this $ conceal list | grep dockerhub/
.
$ conceal unset dockerhub/token
To remove a secret that was added for Summon, call conceal
and use the unset
command to pass the account name to remove.
$ conceal help
To display the help message, just call conceal help
.
$ conceal help [COMMAND]
To display the help message for a specific command, just call conceal help
and provide the command name, such as set
or get
.
$ conceal version
To display the current version, call conceal
with the version
command.
import "github.com/infamousjoeg/conceal/pkg/conceal/keychain"
func AddSecret(secretID string, secret []byte)
AddSecret is a non-return function that adds the secret and secret value to keychain.
func DeleteSecret(secretID string)
DeleteSecret is a non-return function that removes the secret from keychain
func ListSecrets() []string
ListSecrets is a string array function that returns all secrets in keychain with
the label summon
.
func SecretExists(secretID string) bool
SecretExists is a boolean function to verify a secret is present in keychain
import "github.com/infamousjoeg/conceal/pkg/conceal/clipboard"
func Secret(secret string)
Secret is a non-return function that adds content to the host clipboard that persists for 15 seconds. If a signal interrupt is detected, the content is immediately cleared.
func SetupCloseHandler()
SetupCloseHandler creates a 'listener' on a new goroutine which will notify the program if it receives an interrupt from the OS. We then handle this by calling our clean up procedure and exiting the program.
Pull Requests are currently being accepted. Please read and follow the guidelines laid out in CONTRIBUTING.md.