localvault 1.11.3 → 1.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 57abcee5bdce8a863134e73333323eba61ed5d969f0675d2a0886f4c71f76a1d
4
- data.tar.gz: 35114201fc535b678d90b50cc6b8876a6d589a2079750a1e2fd912fb7a32c903
3
+ metadata.gz: 6ffea91e8b5b758be685a82b78154018889db3b8ece76a942f10879fe79e19d8
4
+ data.tar.gz: 4b43e48d4913b88dffcb0ce18ddb819dd9470edde959cde7b8d4c50e86294e3d
5
5
  SHA512:
6
- metadata.gz: a3f24c9f87df7fbd9e6595c70899c234d439718eca08eeb5b0907a9642014f9f6c52cac651312cdf4abe32e26ab9be8a16c9def5230ddb5b08f953c5fd50c3f3
7
- data.tar.gz: 927d395de3866fd187f0fbe676a518cbd26eea2f08813e6b746940b9e746794514419a22a94e1972d6068522caa313075159fb0a31df160f62237aebccb53734
6
+ metadata.gz: 73c0bb42f97afff36f09cce9a66e6ea9f37d8a25c8609a424f9c190cdaa3abc0dd6fb70765bdd2c4f0d5d113812a36f8a645dd557b4914c3620b48c5838b62d7
7
+ data.tar.gz: 5766f8a512cebf5be3ceb4778f72fa2f5cf591b098e435d3a4cfa623912016c07bb8a3073f557ae4bf5764845802584750cc2434d472907474e81ac9bfdada27
@@ -111,18 +111,20 @@ module LocalVault
111
111
  default_task :all
112
112
 
113
113
  desc "push [NAME]", "Push a vault to InventList cloud sync"
114
+ method_option :vault, type: :string, aliases: "-v", desc: "Vault name (same as NAME)"
114
115
  def push(vault_name = nil)
115
116
  return unless logged_in?
116
- vault_name ||= Config.default_vault
117
+ vault_name ||= options[:vault] || Config.default_vault
117
118
  client = ApiClient.new(token: Config.token)
118
119
  perform_push(vault_name, client)
119
120
  end
120
121
 
121
122
  desc "pull [NAME]", "Pull a vault from InventList cloud sync"
122
123
  method_option :force, type: :boolean, default: false, desc: "Overwrite existing local vault"
124
+ method_option :vault, type: :string, aliases: "-v", desc: "Vault name (same as NAME)"
123
125
  def pull(vault_name = nil)
124
126
  return unless logged_in?
125
- vault_name ||= Config.default_vault
127
+ vault_name ||= options[:vault] || Config.default_vault
126
128
  client = ApiClient.new(token: Config.token)
127
129
  perform_pull(vault_name, client, force: options[:force])
128
130
  end
@@ -150,27 +150,31 @@ module LocalVault
150
150
  rendered = sections.map { |title, names| [title, names.flat_map { |n| help_rows_for(n) }] }
151
151
  width = rendered.flat_map { |_, rows| rows.map { |usage, _| usage.length } }.max + 4
152
152
 
153
+ say_header = ->(text) { shell.say shell.set_color(text, :cyan, true) }
154
+
153
155
  shell.say ""
154
- shell.say "LocalVault — encrypted local secrets vault with MCP support for AI agents"
156
+ shell.say shell.set_color("LocalVault", :cyan, true) + " — encrypted local secrets vault with MCP support for AI agents"
155
157
  shell.say " https://inventlist.com/tools/localvault"
156
158
 
157
159
  rendered.each do |title, rows|
158
160
  next if rows.empty?
159
161
  shell.say ""
160
- shell.say title
161
- rows.each { |usage, desc| shell.say " localvault #{usage.ljust(width)}#{desc}" }
162
+ say_header.call(title)
163
+ rows.each do |usage, desc|
164
+ shell.say " localvault #{shell.set_color(usage.ljust(width), :green)}#{desc}"
165
+ end
162
166
  end
163
167
 
164
168
  shell.say ""
165
- shell.say "SAFE SECRET INPUT (preferred over passing values as arguments)"
169
+ say_header.call("SAFE SECRET INPUT (preferred over passing values as arguments)")
166
170
  shell.say " printf '%s' \"$SECRET\" | localvault set KEY --stdin"
167
171
  shell.say ""
168
- shell.say "PROJECTS (dot-notation groups inside one vault)"
172
+ say_header.call("PROJECTS (dot-notation groups inside one vault)")
169
173
  shell.say " localvault set platepose.API_KEY v Store a key in the 'platepose' group"
170
174
  shell.say " Filter any command with -p: show -p platepose, exec -p platepose -- CMD"
171
175
  shell.say " Delete a whole group: localvault delete 'platepose.*'"
172
176
  shell.say ""
173
- shell.say "USING SECRETS WITH ANY CLI"
177
+ say_header.call("USING SECRETS WITH ANY CLI")
174
178
  shell.say " localvault exec -- inventlist ships list"
175
179
  shell.say " localvault exec -- curl -H \"Authorization: Bearer $API_KEY\" ..."
176
180
  shell.say ""
@@ -316,15 +320,38 @@ module LocalVault
316
320
  vault.list.each { |key| $stdout.puts key }
317
321
  end
318
322
 
319
- desc "groups [QUERY]", "List or search stored secret groups without revealing values"
323
+ desc "groups [QUERY]", "List or search secret groups / projects without revealing values"
320
324
  long_desc <<~DESC
321
- Discover dot-notation namespaces and flat-key prefix groups.
322
-
323
- \x05 localvault groups
324
- \x05 localvault groups str
325
- \x05 localvault show --group STRIPE
326
- \x05 localvault set --group STRIPE API_KEY VALUE
325
+ Discover the groups in a vault. "Group" and "project" are the same
326
+ thing: a named bucket of keys inside one vault. You never create one
327
+ explicitly — storing a key in it creates it, deleting its last key
328
+ removes it.
329
+
330
+ CREATE by storing keys into a group (three equivalent spellings):
331
+ \x05 localvault set kuickr.API_KEY abc123 # dot-notation
332
+ \x05 localvault set --group kuickr API_KEY abc123
333
+ \x05 localvault set -g kuickr API_KEY abc123
334
+
335
+ LIST groups (names and key counts only — values stay hidden):
336
+ \x05 localvault groups # all groups in the default vault
337
+ \x05 localvault groups stock # only groups matching "stock"
338
+ \x05 localvault groups -v intellectaco # groups in another vault
339
+
340
+ WORK WITH one group (any command takes -p / --project):
341
+ \x05 localvault show -p kuickr # see its keys (masked)
342
+ \x05 localvault list -p kuickr # just the key names
343
+ \x05 localvault exec -p kuickr -- rails s # inject only its keys as env vars
344
+ \x05 localvault env -p kuickr # export only its keys
345
+ \x05 localvault import .env -p kuickr # import a .env file into the group
346
+
347
+ DELETE one key or the whole group:
348
+ \x05 localvault delete kuickr.API_KEY
349
+ \x05 localvault delete 'kuickr.*'
350
+
351
+ `localvault projects` is an alias for this command.
327
352
  DESC
353
+ map "projects" => "groups"
354
+
328
355
  def groups(query = nil)
329
356
  vault = open_vault!
330
357
  matches = GroupCatalog.new(vault.all).search(query)
@@ -1,3 +1,3 @@
1
1
  module LocalVault
2
- VERSION = "1.11.3"
2
+ VERSION = "1.12.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: localvault
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.11.3
4
+ version: 1.12.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nauman Tariq