命令參考
用法
帳號與狀態
status 顯示的「登入」一行以伺服器答覆為準:裝置在伺服器被註銷後會顯示「憑據已失效」, 而不是照本機檔案說「是」。網路不通時不會誤判成憑據失效。網關
安裝與診斷
維護
recodex update 只接受帶有效簽名的發布清單。簽名驗不過就直接拒絕更新, 不會退而求其次裝一個來源不明的二進位。Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
ReCodex CLI 的全部命令、參數和環境變數。
recodex [--lang zh|en] [--api URL] <命令>
| 命令 | 作用 |
|---|---|
recodex login | 瀏覽器完成裝置授權後登入,並寫入託管設定與憑據 |
recodex status | 登入狀態、簽發時間、目前網關、設定是否託管、網關可達性,並附上額度 |
recodex account [--json] | 帳號信箱、帳號類型(獨享/共享)與方案名 |
recodex usage [--refresh] [--json] | 可用額度、已用量、資料時間,以及 5 小時 / 7 天兩個視窗 |
recodex logout | 註銷此裝置並還原登入前的 Codex 設定 |
status 顯示的「登入」一行以伺服器答覆為準:裝置在伺服器被註銷後會顯示「憑據已失效」, 而不是照本機檔案說「是」。網路不通時不會誤判成憑據失效。| 命令 | 作用 |
|---|---|
recodex gateways [list] | 列出全部網關:延遲、健康狀態,並標出目前選中的 |
recodex gateways test | 重新測一遍各網關延遲 |
recodex gateways use <id> | 切到指定網關,例如 recodex gateways use jp |
recodex gateways auto | 自動選延遲最低的健康網關 |
$ recodex gateways
jp 日本直連 53ms healthy
sg 新加坡直連 31ms healthy selected
jpcf 日本CF 63ms healthy
sgcf 新加坡CF 45ms healthy
| 命令 | 作用 |
|---|---|
recodex install check | 檢查安裝前提;能辨識從應用商店(MSIX)安裝的 Codex |
recodex install repair | 修復託管的 Codex 設定 |
recodex doctor | 逐項體檢:客戶端安裝、託管設定、登入、憑據、網關、訂閱與 Codex 可用性 |
recodex doctor --fix | 先自動修復能安全修的項,再重新體檢 |
recodex doctor --json | 同上但輸出 JSON(schema_version / ok / checks),便於指令碼判斷或貼給客服 |
recodex refresh | 重新拉取託管設定,不用重新登入 |
recodex logs [--limit N] | 最近 N 條脫敏診斷日誌,預設 50 |
| 命令 | 作用 |
|---|---|
recodex update | 從簽名發布清單安全更新目前程式 |
recodex version | 顯示客戶端版本 |
recodex uninstall | 註銷、還原設定,然後刪除全部 ReCodex 客戶端資料 |
recodex update 只接受帶有效簽名的發布清單。簽名驗不過就直接拒絕更新, 不會退而求其次裝一個來源不明的二進位。# 首次登入
recodex login
# 看狀態和額度
recodex status
# 出問題先自檢,能自動修的它會修
recodex doctor --fix
# 換個更快的網關
recodex gateways auto
# 退出並還原原設定
recodex logout
--lang zh|enrecodex --lang en status
--api URL| 變數 | 作用 |
|---|---|
RECODEX_LANG | 預設輸出語言:zh 或 en |
RECODEX_API | 覆蓋 API 根位址;一般使用者保持預設 |
RECODEX_KEY | 登入時由客戶端寫入,Codex 用它存取網關。不要手動改 |
recodex login 寫入的 RECODEX_KEY 對已經打開的終端不可見 —— 需要新開一個終端視窗。這也是為什麼登入後 doctor 可能提示憑據問題,而新終端裡一切正常。recodex logs --limit 50
{"time":"2026-08-20T09:11:24Z","event":"command_finished","command":"doctor","result":"success","version":"1.2.55","os":"windows"}
