localvault 1.2.0 → 1.2.1
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/lib/localvault/cli/team.rb +35 -0
- data/lib/localvault/cli.rb +6 -3
- 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: 562ba1f8c08282229d6645fd70940e1b7da5e9eba6163657eb6fd1b7cd9a4204
|
|
4
|
+
data.tar.gz: aec7cfa0c78668970e1da1722b3544f0c5bc2d0a9319544c96daa3a39857c18f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 765e8d0e3460b965633865e652e8142cb8de539e1c2b38e5e4c6df2fb5f1a5e4370427aa6ea4816577aa2c1b0afbb56089ac457b2bd8e75292a06f75207e414c
|
|
7
|
+
data.tar.gz: d7ca677a23bb1bb34c3f34590f348ead480562db5e172b86053902a337a41416ad197191a6a51f8202d1db384699772562210d3e4eb7f1511b6327a3346cc503
|
data/lib/localvault/cli/team.rb
CHANGED
|
@@ -129,6 +129,41 @@ module LocalVault
|
|
|
129
129
|
$stderr.puts "Error: #{e.message}"
|
|
130
130
|
end
|
|
131
131
|
|
|
132
|
+
desc "verify HANDLE", "Check if a user exists and has a public key for sharing"
|
|
133
|
+
# Verify a user's handle and public key status before adding them.
|
|
134
|
+
#
|
|
135
|
+
# Checks InventList for the handle and whether they have a published
|
|
136
|
+
# X25519 public key. Does not modify anything.
|
|
137
|
+
def verify(handle)
|
|
138
|
+
unless Config.token
|
|
139
|
+
$stderr.puts "Error: Not logged in."
|
|
140
|
+
$stderr.puts "\n localvault login YOUR_TOKEN\n"
|
|
141
|
+
$stderr.puts "Get your token at: https://inventlist.com/settings"
|
|
142
|
+
return
|
|
143
|
+
end
|
|
144
|
+
|
|
145
|
+
handle = handle.delete_prefix("@")
|
|
146
|
+
client = ApiClient.new(token: Config.token)
|
|
147
|
+
result = client.get_public_key(handle)
|
|
148
|
+
pub_key = result["public_key"]
|
|
149
|
+
|
|
150
|
+
if pub_key && !pub_key.empty?
|
|
151
|
+
fingerprint = pub_key.length > 12 ? "#{pub_key[0..7]}...#{pub_key[-4..]}" : pub_key
|
|
152
|
+
$stdout.puts "@#{handle} — public key published"
|
|
153
|
+
$stdout.puts " Fingerprint: #{fingerprint}"
|
|
154
|
+
$stdout.puts " Ready for: localvault team add @#{handle} -v VAULT"
|
|
155
|
+
else
|
|
156
|
+
$stderr.puts "@#{handle} exists but has no public key published."
|
|
157
|
+
$stderr.puts "They need to run: localvault login TOKEN"
|
|
158
|
+
end
|
|
159
|
+
rescue ApiClient::ApiError => e
|
|
160
|
+
if e.status == 404
|
|
161
|
+
$stderr.puts "Error: @#{handle} not found on InventList."
|
|
162
|
+
else
|
|
163
|
+
$stderr.puts "Error: #{e.message}"
|
|
164
|
+
end
|
|
165
|
+
end
|
|
166
|
+
|
|
132
167
|
desc "add HANDLE", "Add a teammate to a synced vault via key slot"
|
|
133
168
|
method_option :vault, type: :string, aliases: "-v"
|
|
134
169
|
method_option :scope, type: :array, desc: "Groups or keys to share (omit for full access)"
|
data/lib/localvault/cli.rb
CHANGED
|
@@ -35,18 +35,21 @@ module LocalVault
|
|
|
35
35
|
shell.say " localvault unlock Cache passphrase for session"
|
|
36
36
|
shell.say " localvault lock [NAME] Clear cached passphrase"
|
|
37
37
|
shell.say " localvault reset [NAME] Destroy and reinitialize a vault"
|
|
38
|
+
shell.say " localvault rename OLD NEW Rename a secret key"
|
|
39
|
+
shell.say " localvault copy KEY --to V Copy a secret to another vault"
|
|
38
40
|
shell.say ""
|
|
39
41
|
shell.say "TEAM & SYNC (requires localvault login)"
|
|
40
42
|
shell.say " localvault sync push [NAME] Push vault to cloud"
|
|
41
43
|
shell.say " localvault sync pull [NAME] Pull vault from cloud"
|
|
42
44
|
shell.say " localvault sync status Show sync status"
|
|
43
|
-
shell.say " localvault team add HANDLE Add teammate (use --scope KEY... for partial access)"
|
|
44
|
-
shell.say " localvault team remove HANDLE Remove teammate"
|
|
45
|
-
shell.say " localvault team list List vault members"
|
|
46
45
|
shell.say " localvault team init Convert vault to team vault (required before team add)"
|
|
46
|
+
shell.say " localvault team add HANDLE Add teammate (use --scope KEY... for partial access)"
|
|
47
|
+
shell.say " localvault team remove HANDLE Remove teammate (--scope KEY to strip one key, --rotate to re-key)"
|
|
48
|
+
shell.say " localvault team list List vault members and their access"
|
|
47
49
|
shell.say " localvault team rotate Re-key vault, keep all members"
|
|
48
50
|
shell.say " localvault keys generate Generate X25519 identity keypair"
|
|
49
51
|
shell.say " localvault keys publish Publish public key so others can share vaults with you"
|
|
52
|
+
shell.say " localvault keys show Display your current public key"
|
|
50
53
|
shell.say ""
|
|
51
54
|
shell.say "AI / MCP"
|
|
52
55
|
shell.say " localvault install-mcp Configure MCP server in your AI tool"
|
data/lib/localvault/version.rb
CHANGED