跳到正文
本頁目錄

管理配置

lip 有兩類配置:用戶配置,包含影響 lip 與遠程服務交互方式的設置;工作區配置,包含一個工作區的設置。在 lip config 命令後加上 --workspace,即可使用當前目錄中工作區的配置。

查看配置

查看當前全部配置:

sh
lip config list
lip config list --workspace

查看某個鍵的值:

sh
lip config get <KEY>

示例:

sh
lip config get github_proxy

設置配置

設置配置值:

sh
lip config set <KEY> <VALUE>

常見配置

  • github_proxy(用戶):GitHub 請求使用的代理 URL,或空字符串表示直接連接 GitHub。
  • language(用戶):en、zh-Hans 或 zh-Hant,交互界面的語言。未設置時,界面跟隨系統的語言。
  • restart(工作區):never 或 on-failure,工作區的服務器以非零退出碼退出時 lip run 是否重啟它。

示例:

sh
lip config set github_proxy https://mirror.ghproxy.com/
lip config set github_proxy ""
lip config set language zh-Hans
lip config set restart on-failure --workspace

刪除配置

移除某項配置並恢復默認值(如果有):

sh
lip config delete <KEY>