ENOSUCHBLOG

Programming, philosophy, pedaling.


KBSecret 1.6.x

Apr 27, 2018

Tags: ruby, programming, devblog, kbsecret

The KBSecret 1.6.x tree has just been released, after two prereleases.

This post will quickly summarize some of the important changes made in versions 1.4 through 1.6.

NO_COLOR support

KBSecret now supports the NO_COLOR standard, allowing users to explicitly disable all ANSI-formatted color output even when on a supporting terminal device:

$ NO_COLOR=1 kbsecret whatever-command

kbsecret login -u

The -u, --username-only flag has been added to kbsecret login. When passed, kbsecret login will not print out the password associated with each requested login record.

This flag works in both normal and terse output modes:

$ kbsecret login gmail
Label: gmail
    Username: bob@gmail.com
    Password: hunter2

$ kbsecret login -u gmail
Label: gmail
    Username: bob@gmail.com

$ kbsecret login -x gmail
gmail:bob@gmail.com:hunter2

$ kbsecret login -xu gmail
gmail:bob@gmail.com

Users may find this handy for limiting the amount of information shared when filtering records by username.

kbsecret stash-edit

kbsecret stash-edit is the newest addition to the core KBSecret commands!

kbsecret stash-edit is used to edit the contents of unstructured records, including files stored via kbsecret stash-file.

Since kbsecret stash-file can store base-64 encoded binary files, stash-edit supports transparently decoding and re-encoding base-64 data via the -b, --base64 flag.

A quick demo:

asciicast

Bugfix: type abbreviations for kbsecret list

Some versions ago, I partially broke kbsecret list -t <type> — it stopped taking type abbreviations, like env for environment and snip for snippet.

As of 1.6.x, type abbreviations work again:

# these are equivalent!
$ kbsecret list -t env
$ kbsecret list -t environment

Summary

As always, check KBSecret's website for the latest documentation (and references to the API docs).

Thanks for reading!


Reddit discussion