Skip to content
/ sk Public

Minimal macOS Keychain CLI for storing and retrieving secrets by key.

License

Notifications You must be signed in to change notification settings

dmoliveira/sk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 

Repository files navigation

sk

Minimal macOS Keychain CLI for storing and retrieving secrets by key.

Made by Diego Marinho de Oliveira

Install

Homebrew (tap)

brew tap <github-user>/tap
brew install sk

Local install

./sk install

Override install location:

SK_INSTALL_DIR="$HOME/bin" ./sk install

If ~/.local/bin is not in your PATH:

export PATH="$HOME/.local/bin:$PATH"

Usage

Store a secret:

sk add -k OPENAI_API_KEY -v "sk-xxxx"

Avoid shell history by piping the value:

printf '%s' "sk-xxxx" | sk add -k OPENAI_API_KEY -v -

Read a secret (prints only the value):

export OPENAI_API_KEY=$(sk get -k OPENAI_API_KEY)

List secrets (masked):

sk list

List only keys:

sk list --keys

Remove a secret:

sk remove -k OPENAI_API_KEY

Skip confirmation:

sk remove -k OPENAI_API_KEY -y

Uninstall:

sk uninstall

Version:

sk --version

Notes

  • Uses macOS Keychain via security.
  • Entries are scoped to the sk: service prefix.
  • Override the prefix with SK_SERVICE_PREFIX if needed.

License

MIT

About

Minimal macOS Keychain CLI for storing and retrieving secrets by key.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages