From bcf70f33c0343febedd1c01c5319fd201c986eb8 Mon Sep 17 00:00:00 2001 From: Timmy Date: Fri, 10 Jul 2026 14:07:28 +0800 Subject: [PATCH] docs: make README an index; move WhatCable doc to whatcable.md Co-Authored-By: Claude Opus 4.8 (1M context) --- CLAUDE.md | 2 +- README.md | 68 +++++----------------------------------------------- whatcable.md | 65 +++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 72 insertions(+), 63 deletions(-) create mode 100644 whatcable.md diff --git a/CLAUDE.md b/CLAUDE.md index 7621a21..75e7b3a 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -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 diff --git a/README.md b/README.md index 7d78f62..87350f2 100644 --- a/README.md +++ b/README.md @@ -1,65 +1,9 @@ -# WhatCable CLI 文件 +# Homebrew CLI 筆記 -查 USB-C 連接埠與線材實際能力的工具。版本 1.1.2。 +以繁體中文記錄常用 CLI 工具的安裝與用法。每個工具一個檔案。 -參考: - -## 安裝 - -```sh -brew install --cask darrylmorley/whatcable/whatcable # 選單列 App + CLI -brew install darrylmorley/whatcable/whatcable-cli # 只裝 CLI -``` - -## 系統需求 - -- macOS 14 (Sonoma) 以上 -- Apple Silicon(M1+),不支援 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 工具 | diff --git a/whatcable.md b/whatcable.md new file mode 100644 index 0000000..7d78f62 --- /dev/null +++ b/whatcable.md @@ -0,0 +1,65 @@ +# WhatCable CLI 文件 + +查 USB-C 連接埠與線材實際能力的工具。版本 1.1.2。 + +參考: + +## 安裝 + +```sh +brew install --cask darrylmorley/whatcable/whatcable # 選單列 App + CLI +brew install darrylmorley/whatcable/whatcable-cli # 只裝 CLI +``` + +## 系統需求 + +- macOS 14 (Sonoma) 以上 +- Apple Silicon(M1+),不支援 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 # 產生線材回報 +```