README.md in sconb-0.0.1 vs README.md in sconb-0.0.2

- old
+ new

@@ -2,21 +2,23 @@ Ssh CONfig Buckup tool. ## Installation -Add this line to your application's Gemfile: +Install it yourself as: -```ruby -gem 'sconb' -``` + $ gem install sconb -And then execute: +## Usage - $ bundle + $ sconb -## Usage + Commands: + sconb dump > dump.json # Dump .ssh/config to JSON + sconb help [COMMAND] # Describe available commands or one specific command + sconb keyregen < dump.json # Regenerate private keys from JSON + sconb restore < dump.json > .ssh/config # Restore .ssh/config from JSON ### Backup .ssh/config to JSON $ sconb dump > ssh_config.json @@ -30,12 +32,32 @@ ### Regenerate private keys from JSON $ sconb keyregen < ssh_config.json +## Advanced Tips + +### Select host + +Dump github.com config only. + + $ sconb dump | jq '{"github.com"}' > github.json + +And append github.com config to .ssh/config + + $ sconb restore < github.json >> ~/.ssh/config + +### Merge config + + $ jq -s '.[0] + .[1]' a.json b.json | sconb restore > ~/.ssh/config + ## Contributing 1. Fork it ( https://github.com/[my-github-username]/sconb/fork ) 2. Create your feature branch (`git checkout -b my-new-feature`) 3. Commit your changes (`git commit -am 'Add some feature'`) 4. Push to the branch (`git push origin my-new-feature`) 5. Create a new Pull Request + +## TODO + +- Make test