localvault 1.11.0 → 1.11.2

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: 026a87452013bc8910082a3b582dcbdea76eb0bfccb0730f419e4f1a244b8d3d
4
- data.tar.gz: 5365ca55bf39269fe4e722054a1d4e0af4ddbe3cf21de4027dcf09f004df6530
3
+ metadata.gz: 1f7a9ef056579778ef2dabd22148af8fe8fbd19b2e0b4aefafde3c9eb6a454ee
4
+ data.tar.gz: e5006419cb47849c63a7f4c123ba661e6c95bd2f93fe8ef3230faff2ab5fe7ec
5
5
  SHA512:
6
- metadata.gz: 441807ea68cd2f70b0e746a320f7fd1ece69adb13ff3727b5357a4c43de3a077cb52827d57e60003624ef5b7a04f8200acb71f2ca197d1d5b34ce416cecdd0ce
7
- data.tar.gz: 300fdd00e8b103ee0926ffcf4f45ce95a39a3a3cc0745c7f392177938dded7096518cfc9e014709304fc25b47305e3c38bc8ce3e01767d386fa220d2f554b186
6
+ metadata.gz: 9cfc5a0d2635e86601077c1600f58339252262960663d39e45213ff59aeca09ec47c8a8e392e2ad16a0d4e7b2731b500b33d268c239e44b2567ea2b09cd51ef0
7
+ data.tar.gz: 8a14b7b627c493f710c89738c0726f2cc4bca895996a76fcfca4801ff46aaf5047f27a7480aec157b876e807c757f0b3cb9dd3e9bfbe0ffe9d3313ce7dcfe5f8
data/README.md CHANGED
@@ -19,7 +19,7 @@ brew install inventlist/tap/localvault
19
19
  ### Install script (no Homebrew)
20
20
 
21
21
  ```bash
22
- curl -sSL https://raw.githubusercontent.com/inventlist/localvault/main/install.sh | sh
22
+ curl -sSL https://inventlist.com/tools/localvault/install.sh | sh
23
23
  ```
24
24
 
25
25
  Installs into an isolated prefix (`~/.localvault/runtime`) and writes a wrapper
@@ -32,7 +32,11 @@ module LocalVault
32
32
  end
33
33
 
34
34
  passphrase = prompt_passphrase("Passphrase for '#{vault_name}': ")
35
- return nil if passphrase.nil? || passphrase.empty?
35
+ if passphrase.nil? || passphrase.empty?
36
+ $stderr.puts "Error: Vault '#{vault_name}' is locked and no passphrase was entered."
37
+ $stderr.puts "Run: localvault unlock #{vault_name} # caches the passphrase for this session"
38
+ return nil
39
+ end
36
40
 
37
41
  vault = Vault.open(name: vault_name, passphrase: passphrase)
38
42
  vault.all # raises Crypto::DecryptionError on wrong passphrase
@@ -108,25 +108,51 @@ module LocalVault
108
108
 
109
109
  class_option :vault, aliases: "-v", type: :string, desc: "Vault name"
110
110
 
111
- # Main help = Thor's auto-generated command list (always complete, so new
112
- # commands appear without touching this file) + a handwritten guide for
113
- # the concepts and workflows Thor can't derive from command descriptions.
111
+ # Grouped help, generated from the command registry. Only command NAMES
112
+ # are declared per section usage strings and descriptions come from
113
+ # Thor, and any command missing from this map lands in OTHER instead of
114
+ # disappearing from help.
115
+ HELP_SECTIONS = [
116
+ ["GETTING STARTED", %w[login config init demo]],
117
+ ["SECRETS", %w[set get show groups list delete import env exec]],
118
+ ["VAULT MANAGEMENT", %w[vaults switch rekey unlock lock reset rename copy]],
119
+ ["SYNC (requires localvault login)", %w[sync]],
120
+ ["TEAM SHARING (requires localvault login)", %w[dashboard verify add remove team]],
121
+ ["KEYS (X25519 identity for vault sharing)", %w[keys identity]],
122
+ ["AI / MCP", %w[install-mcp mcp guard]],
123
+ ["LEGACY SHARING (pre-v1.2 direct share, still works)", %w[keygen share receive revoke]],
124
+ ["OTHER", %w[logout version doctor help]]
125
+ ].freeze
126
+
114
127
  def self.help(shell, subcommand = false)
128
+ visible = all_commands.reject { |_, c| c.hidden? }
129
+ width = visible.values.map { |c| c.usage.length }.max + 4
130
+
115
131
  shell.say ""
116
132
  shell.say "LocalVault — encrypted local secrets vault with MCP support for AI agents"
117
133
  shell.say " https://inventlist.com/tools/localvault"
118
- shell.say ""
119
- super
120
- shell.say ""
121
- shell.say "GETTING STARTED"
122
- shell.say " localvault init [NAME] Create a new encrypted vault"
123
- shell.say " localvault demo Create a demo vault to explore commands"
124
- shell.say " localvault login [TOKEN] Log in to a sync server (enables sync + team features)"
125
- shell.say " localvault config set server URL Use your own sync host (default: inventlist.com)"
134
+
135
+ listed = []
136
+ sections = HELP_SECTIONS.map { |title, names| [title, names.dup] }
137
+ leftovers = visible.keys - HELP_SECTIONS.flat_map { |_, names| names.map { |n| n.tr("-", "_") } }
138
+ sections.last[1].concat(leftovers.map { |n| n.tr("_", "-") })
139
+
140
+ sections.each do |title, names|
141
+ rows = names.filter_map do |name|
142
+ command = visible[name.tr("-", "_")]
143
+ next unless command
144
+ listed << name
145
+ " localvault #{command.usage.ljust(width)}#{command.description}"
146
+ end
147
+ next if rows.empty?
148
+ shell.say ""
149
+ shell.say title
150
+ rows.each { |row| shell.say row }
151
+ end
152
+
126
153
  shell.say ""
127
154
  shell.say "SAFE SECRET INPUT (preferred over passing values as arguments)"
128
155
  shell.say " printf '%s' \"$SECRET\" | localvault set KEY --stdin"
129
- shell.say " Store a secret without argv/history exposure"
130
156
  shell.say ""
131
157
  shell.say "PROJECTS (dot-notation groups inside one vault)"
132
158
  shell.say " localvault set platepose.API_KEY v Store a key in the 'platepose' group"
@@ -137,18 +163,8 @@ module LocalVault
137
163
  shell.say " localvault exec -- inventlist ships list"
138
164
  shell.say " localvault exec -- curl -H \"Authorization: Bearer $API_KEY\" ..."
139
165
  shell.say ""
140
- shell.say "TEAM SHARING (requires localvault login)"
141
- shell.say " Convert with `team init`, then `add @HANDLE` / `remove @HANDLE`."
142
- shell.say " Use --scope KEY... for partial access; `team rotate` re-keys for all members."
143
- shell.say " `team add/remove/verify` also work as aliases for the top-level commands."
144
- shell.say ""
145
- shell.say "AI / MCP"
146
- shell.say " Agents: list secret names, then use localvault_build_exec for safe injection."
147
- shell.say " `guard install` blocks plaintext secrets in agent commands (Claude Code hooks)."
148
- shell.say ""
149
- shell.say "LEGACY SHARING (pre-v1.2 direct share, still works as fallback)"
150
- shell.say " keygen / share / receive / revoke — superseded by `keys` + team vaults."
151
- shell.say ""
166
+ shell.say "Own sync host: localvault config set server URL (default: inventlist.com)"
167
+ shell.say "Subcommands: localvault help team|keys|guard|identity|sync"
152
168
  shell.say "Full help for any command: localvault help COMMAND"
153
169
  shell.say ""
154
170
  end
@@ -1,3 +1,3 @@
1
1
  module LocalVault
2
- VERSION = "1.11.0"
2
+ VERSION = "1.11.2"
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.0
4
+ version: 1.11.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nauman Tariq