localvault 1.2.0 → 1.2.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: b181487cbbb186078cda14748801f5272f55349217358a9d9d93e47e079fb0c6
4
- data.tar.gz: 66ffd265de195800930cd7da63da0359d9df62e0a69c8f6b9e519d8d643b62e7
3
+ metadata.gz: 8b2b620a7747bb01fb98a821780c4cd259be663169f3025f168d23f922ee9ac6
4
+ data.tar.gz: ccd95f6f3d9879c72d20fdec0750ca3da73fe4ad2eeae0c374481f1a7d0d370e
5
5
  SHA512:
6
- metadata.gz: e360a9858c992f4f257393ee6a0dad05c4f993624a7b59545048f85f7050c1ba7a9ec0cc2b22c8ad48a704f4a70ef66b1e749075aa83c88e145717f649a67c4b
7
- data.tar.gz: a84fb0edbf9fddb7b7bd4324354798003ae0caa95dfed899a75ca00fbb019db7441de5301ac135dccd11944ea2ad07efec1844456f849cc6e7bee50779067f9d
6
+ metadata.gz: 491eb77e19cdc140567afaa889068d59c323e1a47377c1e224ec9b853fd4b3c4da96b142376b8665af711ffb711007421ce46d9d433cc2c529806899f06f1b4e
7
+ data.tar.gz: 59040f871912eae921cdf533c99a032f1e02a4b4e749f54412256375406db1fbecd8cb9899756bd4ffeb01915e871755be8a7e1de763cb2c2e8fb8dc2ccc4b3c
@@ -207,7 +207,7 @@ module LocalVault
207
207
  $stderr.puts
208
208
  $stderr.puts " localvault login YOUR_TOKEN"
209
209
  $stderr.puts
210
- $stderr.puts "Get your token at: https://inventlist.com/settings"
210
+ $stderr.puts "Get your token at: https://inventlist.com/@YOUR_HANDLE/edit#developer"
211
211
  $stderr.puts "New to InventList? Sign up free at https://inventlist.com"
212
212
  $stderr.puts "Docs: https://inventlist.com/sites/localvault/series/localvault"
213
213
  false
@@ -14,7 +14,7 @@ module LocalVault
14
14
  unless Config.token
15
15
  $stderr.puts "Error: Not logged in."
16
16
  $stderr.puts "\n localvault login YOUR_TOKEN\n"
17
- $stderr.puts "Get your token at: https://inventlist.com/settings"
17
+ $stderr.puts "Get your token at: https://inventlist.com/@YOUR_HANDLE/edit#developer"
18
18
  return
19
19
  end
20
20
 
@@ -91,7 +91,7 @@ module LocalVault
91
91
  $stderr.puts
92
92
  $stderr.puts " localvault login YOUR_TOKEN"
93
93
  $stderr.puts
94
- $stderr.puts "Get your token at: https://inventlist.com/settings"
94
+ $stderr.puts "Get your token at: https://inventlist.com/@YOUR_HANDLE/edit#developer"
95
95
  $stderr.puts "New to InventList? Sign up free at https://inventlist.com"
96
96
  $stderr.puts "Docs: https://inventlist.com/sites/localvault/series/localvault"
97
97
  return
@@ -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/@YOUR_HANDLE/edit#developer"
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)"
@@ -141,7 +176,7 @@ module LocalVault
141
176
  unless Config.token
142
177
  $stderr.puts "Error: Not logged in."
143
178
  $stderr.puts "\n localvault login YOUR_TOKEN\n"
144
- $stderr.puts "Get your token at: https://inventlist.com/settings"
179
+ $stderr.puts "Get your token at: https://inventlist.com/@YOUR_HANDLE/edit#developer"
145
180
  return
146
181
  end
147
182
 
@@ -271,7 +306,7 @@ module LocalVault
271
306
  $stderr.puts
272
307
  $stderr.puts " localvault login YOUR_TOKEN"
273
308
  $stderr.puts
274
- $stderr.puts "Get your token at: https://inventlist.com/settings"
309
+ $stderr.puts "Get your token at: https://inventlist.com/@YOUR_HANDLE/edit#developer"
275
310
  $stderr.puts "New to InventList? Sign up free at https://inventlist.com"
276
311
  $stderr.puts "Docs: https://inventlist.com/sites/localvault/series/localvault"
277
312
  return
@@ -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"
@@ -541,7 +544,7 @@ module LocalVault
541
544
  unless token
542
545
  $stdout.puts "Usage: localvault login YOUR_TOKEN"
543
546
  $stdout.puts
544
- $stdout.puts "Get your token at: https://inventlist.com/settings"
547
+ $stdout.puts "Get your token at: https://inventlist.com/@YOUR_HANDLE/edit#developer"
545
548
  $stdout.puts "New to InventList? Sign up free at https://inventlist.com"
546
549
  $stdout.puts
547
550
  $stdout.puts "LocalVault sync and team features require a free InventList account."
@@ -569,7 +572,7 @@ module LocalVault
569
572
  $stdout.puts "Next: localvault sync push # sync your vault to the cloud"
570
573
  rescue ApiClient::ApiError => e
571
574
  if e.status == 401
572
- $stdout.puts "Invalid token. Check your token at: https://inventlist.com/settings"
575
+ $stdout.puts "Invalid token. Check your token at: https://inventlist.com/@YOUR_HANDLE/edit#developer"
573
576
  else
574
577
  $stdout.puts "Error connecting to InventList: #{e.message}"
575
578
  end
@@ -606,7 +609,7 @@ module LocalVault
606
609
  desc: "Recipient: @handle, team:HANDLE, or crew:SLUG"
607
610
  def share(vault_name = nil)
608
611
  unless Config.token
609
- abort_with "Not logged in. Run: localvault login YOUR_TOKEN\n Get your token at: https://inventlist.com/settings"
612
+ abort_with "Not logged in. Run: localvault login YOUR_TOKEN\n Get your token at: https://inventlist.com/@YOUR_HANDLE/edit#developer"
610
613
  return
611
614
  end
612
615
 
@@ -649,7 +652,7 @@ module LocalVault
649
652
  desc "receive", "Fetch and import vaults shared with you"
650
653
  def receive
651
654
  unless Config.token
652
- abort_with "Not logged in. Run: localvault login YOUR_TOKEN\n Get your token at: https://inventlist.com/settings"
655
+ abort_with "Not logged in. Run: localvault login YOUR_TOKEN\n Get your token at: https://inventlist.com/@YOUR_HANDLE/edit#developer"
653
656
  return
654
657
  end
655
658
 
@@ -717,7 +720,7 @@ module LocalVault
717
720
  desc "revoke SHARE_ID", "Revoke a vault share (stops future access)"
718
721
  def revoke(share_id)
719
722
  unless Config.token
720
- abort_with "Not logged in. Run: localvault login YOUR_TOKEN\n Get your token at: https://inventlist.com/settings"
723
+ abort_with "Not logged in. Run: localvault login YOUR_TOKEN\n Get your token at: https://inventlist.com/@YOUR_HANDLE/edit#developer"
721
724
  return
722
725
  end
723
726
 
@@ -1,3 +1,3 @@
1
1
  module LocalVault
2
- VERSION = "1.2.0"
2
+ VERSION = "1.2.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.2.0
4
+ version: 1.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nauman Tariq