
Show HN: Creds – manage API keys with GPG on the command line - miller_joe
https://github.com/joemiller/creds
======
m6w6
Nice, must have been a fun project! I'm not sure, though, whether it adds
enough distinct functionality to warrant a project?

Lazy version:

    
    
        $ encfs $HOME/Dropbox/creds $HOME/.creds
        $ cat >~/bin/creds <<<'EOF'
        #!/bin/sh
    
        $CREDS=$HOME/.creds/$2.sh
    
        case "$1" in
        add|edit)
            $EDITOR $CREDS
            [ -f $CREDS ] && chmod +x $CREDS
            ;;
        list)
            echo $HOME/.creds/*.sh \
                | xargs -I '{}' -n1 basename {} .sh \
                | less -SRFX
            ;;
        esac
        EOF
        $ chmod +x ~/bin/creds
    

EDIT: lessen <pre> width

------
yoo1I
This seems to be the same functionality that pass[0] offers.

[0] [https://www.passwordstore.org/](https://www.passwordstore.org/)

~~~
mrkidd
pass doesn't have a command to directly source contents of a stored password
into shell variables. But it would be great to bring that functionality from
this tool into pass.

------
irickt
Also consider
[https://github.com/StackExchange/blackbox](https://github.com/StackExchange/blackbox)

------
bunkydoo
Dopesauce. I always welcome a new command line tool - it's the most effective
place to do things.

------
JoelJacobson
I wish there was an alternative to GPG or at least some bare-minimum
implementation with a decent API. The only "libraries" are wrappers on top of
the gpg executable.

Maybe there is an alternative that I don't know of?

~~~
m6w6
Library? Do you mean something like gpgme?

[https://www.gnupg.org/documentation/manuals/gpgme/](https://www.gnupg.org/documentation/manuals/gpgme/)

~~~
tristor
GPGME is a wrapper on top of the GPG executable. It also has a horrendous API.
I'm still currently fighting with it just to simply encrypt/decrypt a tarball
going to S3. It's really badly designed.

~~~
JoelJacobson
I know exactly what you are going though.

Don't look at the source code of GPG, it will give you nightmares.

------
vdfs
Similar tool that use asymmetric GPG encryption:
[https://github.com/boussouira/bash-pass](https://github.com/boussouira/bash-
pass)

