Skip to content

Commit f819df4

Browse files
bordumbclaude
andcommitted
feat: add auths pair to generated CLI docs and pre-commit hook
- Add `auths pair` to xtask gen-docs command list (primary.md) - Add gen-docs --check as a pre-commit hook (scoped to CLI/xtask/docs files) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 199d8dc commit f819df4

3 files changed

Lines changed: 35 additions & 0 deletions

File tree

.pre-commit-config.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff 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 $?'

crates/xtask/src/gen_docs.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff 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"],

docs/cli/commands/primary.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff 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 -->

0 commit comments

Comments
 (0)