0
6
近 7 天 1
18.8
生态多维模型
4 个月前
2026-04-21
快速安装与配置
opencode.json写入当前项目的 opencode.json,只对这个仓库生效。
opencode.json
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["@levibostian/opencode-pwd-title@0.1.0"]
}写入 ~/.config/opencode/opencode.json,对所有项目生效。
~/.config/opencode/opencode.json
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["@levibostian/opencode-pwd-title@0.1.0"]
}若你要在本地改造这个插件,先装到项目里再从本地路径引用。
shell
pnpm add -D @levibostian/opencode-pwd-titleopencode 启动时会通过内嵌运行时自动加载 npm 依赖并缓存至本地目录,无需手动在全局环境执行安装。
opencode plugin to set the title to current directory and git branch, similar to the format that opencode uses in the footer.
Example: ~/path/to/repo:main (path to repo, relative to home directory, followed by git branch if in a git repo)
This plugin tries to set the title as often as possible to keep it up-to-date. Sometimes (like when opening opencode or immediately after switching sessions) the title will not be set by this plugin but after you send a prompt, the title will be updated.
Installation
Add to ~/.config/opencode/opencode.json:
{
"plugin": ["@levibostian/opencode-pwd-title"]
}
Why?
I don't like how opencode changes the title of the tabs in my terminal, making it hard to differentiate between different tabs working on different Git workspaces. I want a plugin that restores the title back to what it would be if opencode were not running. The goal - set a simple title and enforce it as much as possible.