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 +4 -4
- data/README.md +1 -1
- data/lib/localvault/cli/team_helpers.rb +5 -1
- data/lib/localvault/cli.rb +40 -24
- data/lib/localvault/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1f7a9ef056579778ef2dabd22148af8fe8fbd19b2e0b4aefafde3c9eb6a454ee
|
|
4
|
+
data.tar.gz: e5006419cb47849c63a7f4c123ba661e6c95bd2f93fe8ef3230faff2ab5fe7ec
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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://
|
|
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
|
-
|
|
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
|
data/lib/localvault/cli.rb
CHANGED
|
@@ -108,25 +108,51 @@ module LocalVault
|
|
|
108
108
|
|
|
109
109
|
class_option :vault, aliases: "-v", type: :string, desc: "Vault name"
|
|
110
110
|
|
|
111
|
-
#
|
|
112
|
-
#
|
|
113
|
-
#
|
|
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
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
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 "
|
|
141
|
-
shell.say "
|
|
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
|
data/lib/localvault/version.rb
CHANGED