# Plugin Name Locker > Lock custom display names for your installed Obsidian plugins so they persist through updates. ## Problem Obsidian reads plugin display names from `manifest.json`. You can manually edit a plugin's `name` field to rename it — but every time Obsidian auto-updates that plugin, its `manifest.json` gets overwritten and your custom name is lost. This plugin solves that: it records your custom names and rewrites them back after every update. ## Features - 🔒 **Lock any plugin's display name** — Chinese, emoji, any characters you want - 🔄 **Auto-restore on update** — Hooks `app.plugins.installPlugin` and rewrites manifests immediately after an update completes - 📦 **Batch operations** — Select all / invert / clear, lock selected as current name, lock with template (`⭐ {name}`), or bulk unlock - 🔍 **Search & filter** — Filter by ID, current name, custom name, or community-registered name - 🌐 **Official name lookup** — Fetch community-registered names from `obsidian-releases` for comparison and restoration - 🌍 **Bilingual UI** — English / Simplified Chinese, auto-detected from system language - ⚡ **Zero startup cost** — Only touches in-memory manifest objects at launch (no disk I/O, no timers) ## Installation ### Manual Copy `main.js`, `manifest.json`, and `styles.css` into: ``` /.obsidian/plugins/plugin-name-locker/ ``` Restart Obsidian, then enable **Plugin Name Locker** in Settings → Community plugins. ### Build from source ```bash git clone https://github.com/agarcabin/plugin-name-locker.git cd plugin-name-locker npm install npm run build ``` ## Usage 1. Open Settings → Plugin Name Locker 2. Find the plugin you want to rename in the list 3. Type your custom name in the input box and click **Lock** 4. Done — the name changes immediately and survives all future updates To restore a plugin's official name: click **Unlock**, or click **Restore community name** (requires fetching the community list first). ## How it works 1. When you lock a plugin, we write your custom name to **disk** (`manifest.json`) and **memory** (`app.plugins.manifests[id].name`) simultaneously 2. When Obsidian updates a plugin, it downloads a fresh `manifest.json` — our hook fires immediately after and rewrites the locked names back to disk 3. On startup, we only touch in-memory manifest objects (no disk I/O), so there's zero measurable impact on load time ## License MIT --- # Plugin Name Locker(插件名称锁定器) > 锁定其他 Obsidian 插件的显示名称,防止官方更新时被覆盖。 ## 问题背景 Obsidian 插件的显示名称读自 `manifest.json` 的 `name` 字段。你可以手动改这个字段把插件名改成你喜欢的中文或别名,**但是每当 Obsidian 自动更新这个插件,`manifest.json` 就会被新版本覆盖,你改的名字就丢了**。 这个插件解决这个问题:把你的自定义名称记在自己的 settings 里,并且在每次插件更新后自动重写 `manifest.json`。 ## 功能 - 🔒 **锁定任意插件名称** — 支持中文、emoji、任意字符 - 🔄 **更新后自动恢复** — Hook `app.plugins.installPlugin`,更新一完成就改回去 - 📦 **批量操作** — 全选/反选/清空,批量锁定为当前名,模板锁定(`⭐ {name}`),批量解锁 - 🔍 **搜索过滤** — 按 ID、当前名、自定义名、社区注册名过滤 - 🌐 **查询官方原名** — 从 `obsidian-releases` 社区仓库拉取官方注册名,方便对照和还原 - 🌍 **中英双语界面** — 简体中文 / English,默认跟随系统语言 - ⚡ **零启动开销** — 启动时只改内存 manifest 对象,不读不写磁盘,无定时器 ## 安装 ### 手动安装 把 `main.js`、`manifest.json`、`styles.css` 三个文件复制到: ``` /.obsidian/plugins/plugin-name-locker/ ``` 重启 Obsidian,然后在 设置 → 第三方插件 中启用 **Plugin Name Locker**。 ### 从源码构建 ```bash git clone https://github.com/agarcabin/plugin-name-locker.git cd plugin-name-locker npm install npm run build ``` ## 使用 1. 打开 设置 → Plugin Name Locker 2. 在列表中找到你想改名的插件 3. 在右侧输入框输入自定义名称,点击 **锁定** 4. 完成 — 名称立刻生效,且永久保持 要还原插件官方名:点击 **解锁**,或点击 **还原为社区名**(需要先拉取社区列表)。 ## 工作原理 1. 锁定插件时,同时写入**磁盘** (`manifest.json`) 和**内存** (`app.plugins.manifests[id].name`) 2. Obsidian 更新插件时会下载新的 `manifest.json` — 我们的 hook 在更新完成后立刻触发,把已锁定的名称写回磁盘 3. 启动时只修改内存中的 manifest 对象,零磁盘 IO,对启动速度无可测量影响 ## 许可 MIT