@@ -38,18 +38,17 @@ struct DeviceEntry {
3838
3939#[ derive( Args , Debug , Clone ) ]
4040#[ command(
41- about = "Manage device authorizations within an identity repository ." ,
41+ about = "Manage which devices can sign with your identity ." ,
4242 after_help = "Examples:
43- auths device list # List all linked devices
44- auths device link --key identity-key --device-key device-key --device-did did:key:...
45- # Link a new device to your identity
46- auths device revoke # Revoke a device authorization
43+ auths device list # List authorized devices
44+ auths device link --key identity-key --device-key device-key --device did:key:...
45+ # Authorize a new device
46+ auths device revoke # Revoke a device
4747 auths device extend # Extend device expiry
4848
4949Related:
50- auths pair — Pair a new device with your identity
5150 auths status — Show device status and expiry
52- auths init — Set up identity and linking "
51+ auths init — Set up identity and signing "
5352) ]
5453pub struct DeviceCommand {
5554 #[ command( subcommand) ]
@@ -74,19 +73,19 @@ pub enum DeviceSubcommand {
7473 /// Authorize a new device to act on behalf of the identity.
7574 #[ command( visible_alias = "add" ) ]
7675 Link {
77- #[ arg( long, help = "Local alias of the * identity's* key (used for signing) ." ) ]
76+ #[ arg( long, help = "Your identity's key name ." ) ]
7877 key : String ,
7978
8079 #[ arg(
8180 long,
82- help = "Local alias of the * new device's* key (must be imported first )."
81+ help = "The new device's key name (import first with: auths key import )."
8382 ) ]
8483 device_key : String ,
8584
8685 #[ arg(
8786 long,
8887 visible_alias = "device" ,
89- help = "Identity ID of the new device being authorized (must match --device-key)."
88+ help = "The device's ID (must match --device-key)."
9089 ) ]
9190 device_did : String ,
9291
@@ -128,17 +127,10 @@ pub enum DeviceSubcommand {
128127
129128 /// Revoke an existing device authorization using the identity key.
130129 Revoke {
131- #[ arg(
132- long,
133- visible_alias = "device" ,
134- help = "Identity ID of the device authorization to revoke."
135- ) ]
130+ #[ arg( long, visible_alias = "device" , help = "The device's ID to revoke." ) ]
136131 device_did : String ,
137132
138- #[ arg(
139- long,
140- help = "Local alias of the *identity's* key (required to authorize revocation)."
141- ) ]
133+ #[ arg( long, help = "Your identity's key name." ) ]
142134 key : String ,
143135
144136 #[ arg( long, help = "Optional note explaining the revocation." ) ]
@@ -148,12 +140,12 @@ pub enum DeviceSubcommand {
148140 dry_run : bool ,
149141 } ,
150142
151- /// Resolve a device DID to its controller identity DID .
143+ /// Resolve a device to its owner identity.
152144 Resolve {
153145 #[ arg(
154146 long,
155147 visible_alias = "device" ,
156- help = "The device DID to resolve (e.g. did:key:z6Mk...)."
148+ help = "The device ID to resolve (e.g. did:key:z6Mk...)."
157149 ) ]
158150 device_did : String ,
159151 } ,
@@ -167,11 +159,7 @@ pub enum DeviceSubcommand {
167159
168160 /// Extend the expiration date of an existing device authorization.
169161 Extend {
170- #[ arg(
171- long,
172- visible_alias = "device" ,
173- help = "Identity ID of the device authorization to extend."
174- ) ]
162+ #[ arg( long, visible_alias = "device" , help = "The device's ID to extend." ) ]
175163 device_did : String ,
176164
177165 /// Duration in seconds until expiration (per RFC 6749).
@@ -182,16 +170,10 @@ pub enum DeviceSubcommand {
182170 ) ]
183171 expires_in : u64 ,
184172
185- #[ arg(
186- long,
187- help = "Local alias of the *identity's* key (required for re-signing)."
188- ) ]
173+ #[ arg( long, help = "Your identity's key name." ) ]
189174 key : String ,
190175
191- #[ arg(
192- long,
193- help = "Local alias of the *device's* key (required for re-signing)."
194- ) ]
176+ #[ arg( long, help = "The device's key name." ) ]
195177 device_key : String ,
196178 } ,
197179}
@@ -331,11 +313,11 @@ pub fn handle_device(
331313
332314fn display_link_result (
333315 result : & auths_sdk:: result:: DeviceLinkResult ,
334- device_did : & str ,
316+ _device_did : & str ,
335317) -> Result < ( ) > {
336318 println ! (
337- "\n ✅ Successfully linked device {} (attestation : {})" ,
338- device_did , result. attestation_id
319+ "\n ✅ Device authorized. (Attestation : {})" ,
320+ result. attestation_id
339321 ) ;
340322 Ok ( ( ) )
341323}
@@ -577,7 +559,7 @@ fn list_devices(
577559 . map_err ( anyhow:: Error :: from) ;
578560 }
579561
580- println ! ( "Devices for identity : {}" , identity. controller_did) ;
562+ println ! ( "Authorized devices for : {}" , identity. controller_did) ;
581563 if entries. is_empty ( ) {
582564 if include_revoked {
583565 println ! ( " No authorized devices found." ) ;
0 commit comments