by Atlas Creative
Find near-duplicate tags like #idea and #ideas or #to-do and #todo, review each group, and merge them across your vault. Optional AI pass, with undo.
AI Tag Consolidator
Vaults collect near-duplicate tags over time: #idea and #ideas, #to-do and #todo, #Project and #project, #javascript and #js. This plugin finds them, shows you every group before anything changes, and merges the ones you approve across your whole vault. If you change your mind, one command puts the notes back.
Features
- Finds duplicates by rule: case variants (
#Idea,#idea), singular and plural (#idea,#ideas,#story,#stories), hyphens and underscores (#to-do,#to_do,#todo), and close spellings (#javascript,#javascrip). Nested tags are compared segment by segment, so#Project/Ideaand#project/ideasmatch. Tags that differ only in a number, like#q1and#q2, are never grouped. - Optional AI pass: finds synonyms and abbreviations the rules can't, like
#todoand#tasksor#jsand#javascript. Works with OpenAI, OpenRouter, Ollama or any endpoint that speaks the chat completions format. - Review before merging: each group shows the tag it will keep, every tag it will merge and how many notes use each. Pick a different tag to keep from the dropdown, or switch a group off.
- Merges everywhere: rewrites inline tags in note bodies and the
tagslist in frontmatter, and drops duplicates the merge creates. Tags in code blocks are left alone. A tag that changed since the scan is skipped. - Undo: Undo last merge restores every note the merge changed, as long as you haven't edited it since. Notes you edited afterwards are left as they are and listed.
Usage
- Run AI Tag Consolidator: Find duplicate tags from the command palette, or click the tags icon in the ribbon. Use Find duplicate tags with AI to include the AI pass.
- Review the groups. Change the tag to keep, or turn off any group you want to leave alone.
- Press Merge. Run AI Tag Consolidator: Undo last merge if you want the notes back.
Settings
- Matching: turn each rule on or off, and set how close two spellings must be to count as the same tag.
- Excluded folders: notes in these folders are never scanned or changed, for example
Templates. - AI: API key, base URL and model, with presets for OpenAI, Ollama and OpenRouter, a Test connection button, and how many of your most-used tags to send. Turn on Use AI on every scan to include the AI pass in the regular command and the ribbon icon.
Privacy
Without the AI pass, everything runs locally and the plugin makes no network requests.
When you use the AI pass, the plugin sends your tag names, and nothing else, to the endpoint you set in the settings. Note content, note titles and file paths are never sent. Your API key is stored in this plugin's settings in your vault. With a local endpoint like Ollama, nothing leaves your computer.
Installation
Manual
Copy main.js, manifest.json and styles.css into <your vault>/.obsidian/plugins/ai-tag-consolidator/, then enable the plugin in Settings → Community plugins.
Development
npm install
npm test # unit tests for grouping, renaming, merging and undo
npm run lint # ESLint with eslint-plugin-obsidianmd
npm run build # type-check and build main.js
Releases
Publishing a GitHub release tagged with the version in manifest.json (for example 1.0.0) runs the Release workflow. It lints, tests and builds the plugin, attests build provenance for main.js, and attaches main.js, manifest.json and styles.css to the release.
Support
If this plugin saves you time, you can sponsor me on GitHub.
License
0BSD
For plugin developers
Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.