Skip to content

Commit

Permalink
Merge pull request #6 from sylvek/experimental/refacto
Browse files Browse the repository at this point in the history
Experimental/refacto
  • Loading branch information
sylvek authored Jul 22, 2019
2 parents 2c5ed96 + 762afe7 commit fb19871
Show file tree
Hide file tree
Showing 18 changed files with 643 additions and 305 deletions.
52 changes: 32 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,49 +17,61 @@ $> sudo gem install leeloo
## How to use it ?

```
$> leeloo init
$> leeloo
# will create your first keystore (stored in ~/.leeloo/private)
$> leeloo
# will display all your keystores
+----------------+----------------------------------------+
| Name | Path |
+----------------+----------------------------------------+
| private | /Users/sylvek/.leeloo/private |
+----------------+----------------------------------------+
+-------+------------------------------+-------+
|Name |Path |Default|
+-------+------------------------------+-------+
|private|/Users/sylvek/.leeloo/private |* |
+-------+------------------------------+-------+
$> leeloo add keystore password-store ~/.password-store
$> leeloo keystore add password-store ~/.password-store
# will add password-store keystore
+----------------+----------------------------------------+
| Name | Path |
+----------------+----------------------------------------+
| private | /Users/sylvek/.leeloo/private |
| password-store | /Users/sylvek/.password-store |
+----------------+----------------------------------------+
+-------+------------------------------+-------+
|Name |Path |Default|
+-------+------------------------------+-------+
|private|/Users/sylvek/.leeloo/private |* |
|test |/Users/sylvek/Desktop/test | |
+-------+------------------------------+-------+
$> leeloo keystore default test
# will change the default keystore
+-------+------------------------------+-------+
|Name |Path |Default|
+-------+------------------------------+-------+
|private|/Users/sylvek/.leeloo/private | |
|test |/Users/sylvek/Desktop/test |* |
+-------+------------------------------+-------+
# please make symbolic link to secrets if you use leeloo with password-store
$> ll ~/.password-store
drwx------ 35 sylvek staff 1,2K 4 sep 20:38 Personal
drwxr-xr-x 3 sylvek staff 102B 4 sep 23:04 keys
lrwxr-xr-x 1 sylvek staff 8B 4 sep 20:38 secrets -> Personal
$> leeloo add secret my_secret
$> leeloo write my_secret
# will add a secret
$> leeloo add secret my_secret --generate 5
$> leeloo write my_secret --generate 5
# will add a randomized secret
$> echo "my secret" | leeloo add secret my_secret --stdin
$> echo "my secret" | leeloo write my_secret --stdin
# will add a secret from STDIN
$> leeloo add secret my_secret --keystore password-store
$> leeloo write my_secret --keystore password-store
# will add a secret to "password-store"
$> leeloo read secret my_secret
$> leeloo read my_secret
# display it
$> leeloo sync secret
# will (re)crypt all secrets with the new given keys (from keys directory)
$> leeloo sync
# will synchronize keystore
$> cat file | leeloo translate
# will replace ${my_secret} by the current secret and will return file translated
```

## How to share a keystore ?
Expand Down
2 changes: 1 addition & 1 deletion leeloo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To

## Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/leeloo. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
Bug reports and pull requests are welcome on GitHub at https://github.com/sylvek/leeloo. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.

## License

Expand Down
11 changes: 5 additions & 6 deletions leeloo/leeloo.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,11 @@ Gem::Specification.new do |spec|
spec.add_dependency "commander", "~> 4.4"
spec.add_dependency "gpgme", "~> 2.0"
spec.add_dependency "git", "~> 1.5"
spec.add_dependency "terminal-table", "~> 1.8"
spec.add_dependency "tty-tree", "~> 0.1"
spec.add_dependency "clipboard", "~> 1.1"
spec.add_dependency "ffi", "~> 1.9"
spec.add_dependency "tty-table", "~> 0.10"
spec.add_dependency "tty-tree", "~> 0.3"
spec.add_dependency "clipboard", "~> 1.3"

spec.add_development_dependency "bundler", "~> 1.15"
spec.add_development_dependency "rake", "~> 10.0"
spec.add_development_dependency "bundler", "~> 2.0"
spec.add_development_dependency "rake", "~> 12.0"
spec.add_development_dependency "rspec", "~> 3.0"
end
6 changes: 3 additions & 3 deletions leeloo/lib/leeloo.rb
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
require 'leeloo/version'
require 'leeloo/command'
require 'leeloo/secret'
require 'leeloo/preferences'
require 'leeloo/keystore'
require 'leeloo/config'
require 'leeloo/secret'
require 'leeloo/output'

module Leeloo
def self.start
Config.load
Command.new.run
end
end
Loading

0 comments on commit fb19871

Please sign in to comment.