跳到主要内容

更新与卸载

更新​

uvx 使用 --refresh 获取 PyPI 上的最新版本。npx 从 npm 获取最新版本;下面的命令固定使用 0.1.2:

npx --yes wezterm-codex-status-line@0.1.2 update

update 保留显示配置和终端标题设置。完成后重新加载 WezTerm 配置,再运行 doctor 检查安装。

npx 命令中的包版本决定目标版本。uvx 也可用 uvx wezterm-codex-status-line@0.1.2 update 指定版本。

卸载​

先从 WezTerm 配置中移除 codex_statusline 的加载语句及 setup() 调用,例如:

require("codex_statusline").setup()

重新加载 WezTerm 配置,然后运行:

npx --yes wezterm-codex-status-line@0.1.2 uninstall

uninstall 移除状态栏文件和本项目的 Codex hook,默认保留 codex_statusline_config.json。要同时删除显示配置,在命令末尾添加 --purge-config。

如果命令提示模块仍被引用,请检查 ~/.wezterm.lua、~/.config/wezterm/wezterm.lua 及它们加载的其他配置文件。

关闭终端标题功能​

update --no-title-bridge 会保留已经写入的标题设置。要恢复原来的 Codex 标题,先按上面的步骤卸载,再使用 install --no-title-bridge 重新安装,最后恢复 WezTerm 中的 setup() 调用。

预览更改​

在 install、configure、update 或 uninstall 后添加 --dry-run,可以查看操作结果而不写入文件:

npx --yes wezterm-codex-status-line@0.1.2 update --dry-run

自定义安装目录需要继续传入相同的 --wezterm-module-dir 等路径选项。完整参数见命令行参考。