docs: make README an index; move WhatCable doc to whatcable.md

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-10 14:07:28 +08:00
parent 61487183c5
commit bcf70f33c0
3 changed files with 72 additions and 63 deletions

View File

@@ -4,7 +4,7 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
## What this is
A personal notes repo documenting Homebrew-installed CLI tools. No code, no build, no tests — just markdown. Each tool gets one file at the repo root (e.g. `witr.md`, `README.md` for WhatCable).
A personal notes repo documenting Homebrew-installed CLI tools. No code, no build, no tests — just markdown. Each tool gets one file at the repo root (e.g. `witr.md`, `whatcable.md`). `README.md` is the index listing every tool.
## Conventions

View File

@@ -1,65 +1,9 @@
# WhatCable CLI 文件
# Homebrew CLI 筆記
查 USB-C 連接埠與線材實際能力的工具。版本 1.1.2
以繁體中文記錄常用 CLI 工具的安裝與用法。每個工具一個檔案
參考:<https://www.whatcable.uk/cli>
## 安裝
```sh
brew install --cask darrylmorley/whatcable/whatcable # 選單列 App + CLI
brew install darrylmorley/whatcable/whatcable-cli # 只裝 CLI
```
## 系統需求
- macOS 14 (Sonoma) 以上
- Apple SiliconM1+),不支援 Intel Mac
## 基本用法
```sh
whatcable # 掃描所有 USB-C 埠,輸出白話摘要(充電狀態、線材規格、裝置資訊)
```
## 選項
| 選項 | 說明 |
| 工具 | 說明 |
|------|------|
| `--watch` | 持續監看變化(Ctrl+C 結束) |
| `--json` | 輸出 JSON,方便接 `jq` 寫腳本 |
| `--raw` | 一併輸出底層 IOKit 屬性,用於除錯 |
| `--report` | 印出線材報告(markdown + GitHub 回報 URL)後結束 |
| `--desktop` | 以 Dock App 視窗開啟 WhatCable |
| `--popover` | 以選單列 popover 模式開啟 |
| `--tb-debug` | 傾印 IOThunderboltSwitch 樹(協助開發 Thunderbolt 功能用) |
| `--version` | 印出版本後結束 |
| `-h`, `--help` | 顯示說明 |
### Pro 功能(需授權)
| 選項 | 說明 |
|------|------|
| `--dashboard` | 全螢幕 TUI 儀表板:埠、電力、Thunderbolt |
| `--monitor` | 監看即時電力遙測 |
| `--monitor-json` | 即時電力遙測輸出為 newline-delimited JSON |
| `--activate KEY` | 啟用 Pro 授權(KEY 格式 XXXX-XXXX-XXXX-XXXX) |
| `--licence` | 顯示目前 Pro 授權狀態 |
| `--deactivate` | 移除本機儲存的 Pro 授權 |
| `--pro` | 顯示 Pro 功能並開啟購買頁 |
### 雜項
| 選項 | 說明 |
|------|------|
| `--silence-pro-hints` | 隱藏輸出結尾的 Pro 提示 |
| `--show-pro-hints` | 重新顯示 Pro 提示 |
| `--test-kit` | 執行診斷探測並回傳資料以協助改善 WhatCable |
## 範例
```sh
whatcable --watch # 即時監看插拔
whatcable --json | jq '.ports' # 取出埠資訊
whatcable --report # 產生線材回報
```
| [witr](witr.md) | 追溯行程祖先,解釋某個 process 或 port 為什麼在跑 |
| [whatcable](whatcable.md) | 查 USB-C 連接埠與線材實際能力(macOS) |
| [frogmouth](frogmouth.md) | 在終端機瀏覽 Markdown 的 TUI 工具 |

65
whatcable.md Normal file
View File

@@ -0,0 +1,65 @@
# WhatCable CLI 文件
查 USB-C 連接埠與線材實際能力的工具。版本 1.1.2。
參考:<https://www.whatcable.uk/cli>
## 安裝
```sh
brew install --cask darrylmorley/whatcable/whatcable # 選單列 App + CLI
brew install darrylmorley/whatcable/whatcable-cli # 只裝 CLI
```
## 系統需求
- macOS 14 (Sonoma) 以上
- Apple SiliconM1+),不支援 Intel Mac
## 基本用法
```sh
whatcable # 掃描所有 USB-C 埠,輸出白話摘要(充電狀態、線材規格、裝置資訊)
```
## 選項
| 選項 | 說明 |
|------|------|
| `--watch` | 持續監看變化(Ctrl+C 結束) |
| `--json` | 輸出 JSON,方便接 `jq` 寫腳本 |
| `--raw` | 一併輸出底層 IOKit 屬性,用於除錯 |
| `--report` | 印出線材報告(markdown + GitHub 回報 URL)後結束 |
| `--desktop` | 以 Dock App 視窗開啟 WhatCable |
| `--popover` | 以選單列 popover 模式開啟 |
| `--tb-debug` | 傾印 IOThunderboltSwitch 樹(協助開發 Thunderbolt 功能用) |
| `--version` | 印出版本後結束 |
| `-h`, `--help` | 顯示說明 |
### Pro 功能(需授權)
| 選項 | 說明 |
|------|------|
| `--dashboard` | 全螢幕 TUI 儀表板:埠、電力、Thunderbolt |
| `--monitor` | 監看即時電力遙測 |
| `--monitor-json` | 即時電力遙測輸出為 newline-delimited JSON |
| `--activate KEY` | 啟用 Pro 授權(KEY 格式 XXXX-XXXX-XXXX-XXXX) |
| `--licence` | 顯示目前 Pro 授權狀態 |
| `--deactivate` | 移除本機儲存的 Pro 授權 |
| `--pro` | 顯示 Pro 功能並開啟購買頁 |
### 雜項
| 選項 | 說明 |
|------|------|
| `--silence-pro-hints` | 隱藏輸出結尾的 Pro 提示 |
| `--show-pro-hints` | 重新顯示 Pro 提示 |
| `--test-kit` | 執行診斷探測並回傳資料以協助改善 WhatCable |
## 範例
```sh
whatcable --watch # 即時監看插拔
whatcable --json | jq '.ports' # 取出埠資訊
whatcable --report # 產生線材回報
```