File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -35,6 +35,13 @@ repos:
3535 types : [rust]
3636 pass_filenames : false
3737
38+ - id : gen-docs-check
39+ name : cargo xtask gen-docs --check
40+ entry : cargo xtask gen-docs --check
41+ language : system
42+ files : (crates/auths-cli/src/|crates/xtask/src/gen_docs|docs/cli/commands/)
43+ pass_filenames : false
44+
3845 - id : cargo-deny
3946 name : cargo deny (licenses + bans)
4047 entry : bash -c 'cargo deny check > .cargo/cargo-deny.log 2>&1; exit $?'
Original file line number Diff line number Diff line change @@ -13,6 +13,13 @@ auths verify HEAD
1313
1414That's it. ` auths init ` generates keys, creates your identity, and configures Git signing.
1515
16+ ### Link another device
17+
18+ ``` bash
19+ auths pair # On existing device — shows QR/code
20+ auths pair --join ABC123 # On new device — enter the code
21+ ```
22+
1623## The Basics
1724
1825### ` auths sign ` — Sign a commit or artifact
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ use crate::commands::completions::CompletionsCommand;
1212use crate :: commands:: config:: ConfigCommand ;
1313use crate :: commands:: debug:: DebugCmd ;
1414use crate :: commands:: device:: DeviceCommand ;
15+ use crate :: commands:: device:: pair:: PairCommand ;
1516use crate :: commands:: doctor:: DoctorCommand ;
1617use crate :: commands:: emergency:: EmergencyCommand ;
1718use crate :: commands:: git:: GitCommand ;
@@ -91,6 +92,7 @@ pub enum RootCommand {
9192 Whoami ( WhoamiCommand ) ,
9293 Tutorial ( LearnCommand ) ,
9394 Doctor ( DoctorCommand ) ,
95+ Pair ( PairCommand ) ,
9496 #[ command( hide = true ) ]
9597 Completions ( CompletionsCommand ) ,
9698 #[ command( hide = true ) ]
Original file line number Diff line number Diff line change @@ -10,6 +10,12 @@ use crate::commands::executable::ExecutableCommand;
1010use crate :: config:: CliConfig ;
1111use anyhow:: Result ;
1212
13+ impl ExecutableCommand for PairCommand {
14+ fn execute ( & self , ctx : & CliConfig ) -> Result < ( ) > {
15+ handle_pair ( self . clone ( ) , & ctx. env_config )
16+ }
17+ }
18+
1319impl ExecutableCommand for DeviceCommand {
1420 fn execute ( & self , ctx : & CliConfig ) -> Result < ( ) > {
1521 handle_device (
Original file line number Diff line number Diff line change @@ -476,11 +476,11 @@ fn section_linking_device() -> Result<()> {
476476 println ! ( " To link a new device:" ) ;
477477 println ! ( ) ;
478478 println ! ( " {} On your existing device:" , "1." . cyan( ) ) ;
479- println ! ( " {}" , "$ auths pair start " . cyan( ) ) ;
479+ println ! ( " {}" , "$ auths pair" . cyan( ) ) ;
480480 println ! ( " {}" , "Scan this QR code or enter: ABC123" . dimmed( ) ) ;
481481 println ! ( ) ;
482482 println ! ( " {} On your new device:" , "2." . cyan( ) ) ;
483- println ! ( " {}" , "$ auths pair join --code ABC123" . cyan( ) ) ;
483+ println ! ( " {}" , "$ auths pair --join ABC123" . cyan( ) ) ;
484484 println ! ( ) ;
485485 println ! (
486486 " This creates an {} that authorizes the new device" ,
Original file line number Diff line number Diff line change @@ -68,6 +68,7 @@ fn run() -> Result<()> {
6868 RootCommand :: Whoami ( cmd) => cmd. execute ( & ctx) ,
6969 RootCommand :: Tutorial ( cmd) => cmd. execute ( & ctx) ,
7070 RootCommand :: Doctor ( cmd) => cmd. execute ( & ctx) ,
71+ RootCommand :: Pair ( cmd) => cmd. execute ( & ctx) ,
7172 RootCommand :: Completions ( cmd) => cmd. execute ( & ctx) ,
7273 RootCommand :: Emergency ( cmd) => cmd. execute ( & ctx) ,
7374 RootCommand :: Id ( cmd) => cmd. execute ( & ctx) ,
Original file line number Diff line number Diff line change @@ -29,6 +29,11 @@ const COMMANDS: &[Cmd] = &[
2929 marker : "auths status" ,
3030 doc_file : "docs/cli/commands/primary.md" ,
3131 } ,
32+ Cmd {
33+ args : & [ "pair" ] ,
34+ marker : "auths pair" ,
35+ doc_file : "docs/cli/commands/primary.md" ,
36+ } ,
3237 // --- device ---
3338 Cmd {
3439 args : & [ "device" , "link" ] ,
Original file line number Diff line number Diff line change @@ -62,3 +62,26 @@ auths status
6262| ` -q, --quiet ` | — | Suppress non-essential output |
6363| ` --repo <REPO> ` | — | Override the local storage directory (default: ~ /.auths) |
6464<!-- END GENERATED: auths status -->
65+
66+ ---
67+
68+ ## auths pair
69+
70+ ``` bash
71+ auths pair
72+ ```
73+
74+ <!-- BEGIN GENERATED: auths pair -->
75+ | Flag | Default | Description |
76+ | ------| ---------| -------------|
77+ | ` --join <CODE> ` | — | |
78+ | ` --registry <URL> ` | — | |
79+ | ` --no-qr ` | — | |
80+ | ` --timeout <SECONDS> ` | — | |
81+ | ` --offline ` | — | |
82+ | ` --capabilities <CAPABILITIES> ` | — | |
83+ | ` --no-mdns ` | — | |
84+ | ` --json ` | — | |
85+ | ` -q, --quiet ` | — | |
86+ | ` --repo <REPO> ` | — | |
87+ <!-- END GENERATED: auths pair -->
You can’t perform that action at this time.
0 commit comments