+++++++=++=+++====++====+==========+=============+=======+$ODD8ZD8D++++++++++++?
=++=~++=~~============================================++ID$$????77O8DD++=+++++++
~+++$+===============================================?O8??++++++++???Z8+=?+?++++
~+=+================================================I$$+??+++++++++???$D+=====+=
~==================================================I7?I????+?++++?????777======+
~==================================================$87III???+=+++++III78O=======
===================================================$DZII??+++++++??+?IZDD=====+=
===================================================$DO??III7I?$$8DDO7?7DZ=====+=
+==================================================8NIO8Z8DDDZZDD8O78Z?8O?======
+==================================================D8IOODDDN7??IZ7$8+ZI8Z:======
===================================================8$I?+?7?I?++????I?$7Z$=======
====?+==?7I~======~=,+~~=======~=,:=========+======:Z$Z$???ZI?+???++I$787=====DI
====~NNN:$NND====.NNNDMNND====NDNNMNND===DNDMDND:===D7ZZI?IDDZZ88I?777IZ$=======
=====NNN===NNM==7NNM~===NNN~=.NN===~MD==MND====NM===8D$$ZI?7DDDD??I7I$I7========
=====NNN==MNN===NNN=====~NNN=:NNN~~==~~=NNN7=~=~?~====O7$7777I7?II?I77I=========
=====NNNNNND.==:NNN=~~===NNN==DNNNDN====:NNNNN.~======88$7+???+?+?7I77==========
=====NNN~=7NNN=~NNN==~~~=NNN~=~~NNNNNN====MNNNNN=====~ODOZ7Z$O$?$Z$Z88==~=====OI
=====NNN===DNN:=NND=~~~~,NND=,=~~~=NNN.======MNNN~~==ONDD8ZII7+?II$DD:~~~~~~~=?Z
=====NNN==~NNN~~.NNM=~~=NNM~~NN~~~~=NN:~NZ~~==DNN~==DM?7DDD888DD88DD??8:~~~~~=~I
===$NNNNNNNNN==~=:NNNMDNND~=~INNM,,NNN=~NND~=~NNNNNNDM=?7$DDDDNND8D7?=888N:~~~:7
=========~~~~~~~~~~==,:=~~~~~~~:IDN.~$$7=~=Z8DZNNDDDDD===?$DDDDDD87+~=8888888O:$
=========~~~~~~~~~~~~~~~~~~~~~~~~~~~~IOO777$$ZOMDDNDDD=====7$NDN7=~~~=88888888~I
=======~~~~~=~~~~~~~~~~~~~~~~~~~~~~NDD877$7?IIIMDNDDDD=~=~~=DZ$7~~~~~88888O88O=I
=====~~~~=~~~=~~~~~~~~==~~~~~~~~~~DDDN$$?I??7ZDNDDDNDD:~~~~D$D$Z8:~~=O8O88888O=Z
what
A command-line utility that helps manage all your accounts and associated keys (eventually) for heroku.
why
heroku_plus is pretty cool but I wanted something a little different.
installation
gem install shacho
usage
shacho action params
Where action
is one of the standard CRUDy actions:
- create
- use
- list
- which
- edit
- remove
- clear
params
refers to any additional parameters you might want to pass in. For now, that's just the name of the account you want to create
examples!
# Create: makes a new account
shacho create default
# Use: switches the user
shacho use default
# List: shows all the accounts on your machine
shacho list
# Which: shows the current account in use
shacho which
# Edit: allows you to edit the credentials for a specific account
shacho edit default
# Remove: removes a specific account
shacho remove default
# Clear: removes all accounts
shacho clear
details of implementation
shacho
creates folders in your ~/.heroku
that correspond to the account name you passsed into the command. The following call:
shacho create default
Would result in the following file structure:
/home/your_username/.heroku
└── accounts
└── default
└── credentials
When you use
an account, shacho
creates a symbolic link from the credentials file generated during the create
step to the one heroku reads at ~/.heroku/credentials
You can now use heroku account-specific commands by simply firing off a shacho use
:3
keys
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM:.~ZOOZ? ,?MMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM: ,7OOOZ$$Z+ ,?MMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM=. ~OOOOZ$I7$$Z= ~IMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM: ,OOOZZ$$I?II7$$Z~ =?MMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM?, 7OOZZ$$7I?+??I7$$Z7, ?MMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMM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MMMMMMMMMM
MMZOOO$I=,IZZ7I+ =D+$MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMOZ7+:. .+$$I??. O8+OMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMM~, MMM.=77?+++ ?D?$MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMM,MMMMMM:+I?~:~.,ZMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMM=?+:, 7MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMM+== +MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
We got your keys.
As of version 0.1.4
, shacho
will auto-generate keys and place them in an account-specific .ssh
directory upon the create
action.
The use
action will register the auto-generated keys with heroku.
don't believe me?
I got your tests right here:
git clone git@github.com:kellydunn/shacho
cd shacho
bundle install
rspec spec