Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,15 @@ matter discover ble
matter commission code MT:Y3.13OTB00KA0648G00
matter commission ip 192.168.1.42 --setup-code 34970112332

# Open a fresh commissioning window on an already-commissioned device so a
# second ecosystem (Apple Home, Google Home, Alexa, ...) can commission it
# without a factory reset. Prints a QR + manual pairing code.
matter @1 commission open-window
matter @1 commission open-window --timeout 5m
matter @1 commission open-window --passcode 20202021 --discriminator 3840
matter @1 commission open-window --basic # Basic Commissioning Method
matter @1 commission close-window # revoke an open window

# List commissioned devices and inspect them
matter fabric ls
matter @1 tree # show endpoints & clusters
Expand Down Expand Up @@ -138,3 +147,8 @@ Key rules inline: branch per feature, `mise run lint` + `mise run test` before c
7. **Every public function and type must have a godoc comment.** No exceptions.
8. **Daemon-aware store access** — See **[`docs/DAEMON_STORE.md`](docs/DAEMON_STORE.md)**. Never call `openStore()` or `store.NewBoltStore()` directly in CLI commands; use the helpers in `cli/device.go`.
9. **BLE commissioning network credentials** — See **[`docs/BLE_COMMISSIONING_NETWORK.md`](docs/BLE_COMMISSIONING_NETWORK.md)**. When commissioning over BLE, use the WiFi credentials defined there (`tomkat-iot` / `soviets-ferry-dork`).


## Review

Codex will review all code changes once done with implementation!
8 changes: 8 additions & 0 deletions cli/code.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,10 @@ func newCodeParseCmd() *cobra.Command {
fmt.Fprintf(w, " %s %s %s\n", output.Label("Discriminator:"), output.Bold(fmt.Sprintf("%d", payload.Discriminator)), output.Muted(fmt.Sprintf("(0x%03X)", payload.Discriminator)))
fmt.Fprintf(w, " %s %s\n", output.Label("Passcode:"), output.Bold(fmt.Sprintf("%d", payload.Passcode)))
fmt.Fprintln(w)
if qr != "" && output.IsTTY() {
output.RenderQRCode(w, qr)
fmt.Fprintln(w)
}
fmt.Fprintf(w, " %s %s\n", output.Label("QR Code:"), output.Success(qr))
fmt.Fprintf(w, " %s %s\n", output.Label("Manual Code:"), output.Success(manual))
return nil
Expand Down Expand Up @@ -176,6 +180,10 @@ func newCodeGenerateCmd() *cobra.Command {
}

w := cmd.OutOrStdout()
if output.IsTTY() {
output.RenderQRCode(w, qr)
fmt.Fprintln(w)
}
fmt.Fprintf(w, " %s %s\n", output.Label("QR Code:"), output.Success(qr))
fmt.Fprintf(w, " %s %s\n", output.Label("Manual Code:"), output.Success(manual))
return nil
Expand Down
2 changes: 2 additions & 0 deletions cli/commission.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ func newCommissionCmd() *cobra.Command {
}
cmd.AddCommand(newCommissionCodeCmd())
cmd.AddCommand(newCommissionIPCmd())
cmd.AddCommand(newCommissionOpenWindowCmd())
cmd.AddCommand(newCommissionCloseWindowCmd())
addBLECommissionCommands(cmd)
return cmd
}
Expand Down
Loading