| Summary | Match and sync local tags with stash-box endpoints. Bulk cleanup your tag library with smart layered matching (exact, alias, fuzzy, synonym) and field-by-field merge dialog. | |
| Repository | https://github.com/carrotwaxr/stash-plugins/tree/main/plugins/tagManager | |
| Source URL | https://carrotwaxr.github.io/stash-plugins/stable/index.yml | |
| Install | How to install a plugin? |
Tag Manager
Match and sync your local tags with StashDB (or other stash-box instances). Browse unmatched tags, find matches with smart layered search, and update tags with a field-by-field merge dialog.
Links
- Repository: GitHub - carrotwaxr/stash-plugins
- Issues: GitHub - Where software is built
Requirements
- Stash 0.30+ (requires
stash_idsfield on tags) - At least one stash-box endpoint configured (Settings â Metadata Providers â Stash-Box Endpoints)
- Python 3.8+
Python Dependencies (Optional)
The plugin works without any pip dependencies - youâll have exact, alias, and synonym matching. Installing the optional packages enables fuzzy matching:
| Package | Purpose | Required? |
|---|---|---|
thefuzz |
Fuzzy string matching (typos, plurals) | Optional |
python-Levenshtein |
Speeds up thefuzz 4-10x | Optional |
Docker:
docker exec -it stash /root/.stash/venv/bin/pip install thefuzz python-Levenshtein
Mac / Native Install:
Find your Python path in Settings â System â Application Paths â Python Executable, then:
/path/to/your/python -m pip install thefuzz python-Levenshtein
If Python is giving you trouble, skip this step entirely - the plugin still works, just without fuzzy matching.
Installation
- Go to Settings â Plugins â Available Plugins
- Add source:
https://carrotwaxr.github.io/stash-plugins/stable/index.yml - Click Reload and install âTag Managerâ
- (Optional) Install Python dependencies for fuzzy matching (see above)
Features
- Multi-endpoint support - Select from any configured stash-box (StashDB, FansDB, etc.)
- Tag caching - Caches all tags locally with 24-hour expiry for fast searches
- Smart matching - Layered search: exact name â alias â synonym â fuzzy
- One-click accept - Quick accept for high-confidence matches
- Field-by-field merge - Choose what to keep vs. update for each field
- Manual search - Search the stash-box directly for edge cases
- Stash-box linking - Adds
stash_idsto tags for future syncing - Tag Hierarchy View - Browse your tags in a visual tree showing parent/child relationships
- Scene Tag Sync - Bulk sync tags from StashDB to your scenes (see below)
Tag Matching
Access via the tags icon button on the Tags page, or navigate to /plugins/tag-manager.
Workflow
- Select your stash-box endpoint from the dropdown
- The plugin loads cached tags (or fetches them if no cache exists)
- Click Find Matches for Page to search all visible unmatched tags
- For each match:
- Accept - Opens diff dialog with smart defaults
- More - View all potential matches or search manually
- In the diff dialog, choose what to update:
- Keep - Keep your current value
- Keep + Add alias - Keep your name, add stash-box name as alias
- StashDB - Use the stash-box value (your old name auto-added as alias)
Match Types
| Type | Color | Description |
|---|---|---|
| exact | Green | Exact name match (case-insensitive) |
| alias | Blue | Matched via stash-box alias |
| synonym | Purple | Matched via custom synonym mapping |
| fuzzy | Yellow | Fuzzy string match (requires thefuzz) |
Tag Hierarchy
Access via the sitemap icon button on the Tags page, or navigate to /plugins/tag-hierarchy.
- Browse tags in a tree view showing parent/child relationships
- Click arrows to expand/collapse branches
- Use âExpand Allâ / âCollapse Allâ for quick navigation
- Toggle âShow imagesâ to display tag thumbnails
Scene Tag Sync (v0.3.0+)
Automatically sync tags from StashDB to your local scenes. Run via Settings â Tasks â âSync Scene Tags from StashDBâ.
How it works
- Finds all scenes with StashDB IDs
- Fetches tag data from StashDB for each scene
- Matches StashDB tags to your local tags (by stash_id link, name, or alias)
- Merges new tags into your scenes
Important notes
- Dry run enabled by default - Preview mode shows what would change without modifying anything
- Dry run caps at 200 scenes - For safety when previewing large libraries
- Only adds existing local tags - Wonât create new tags, only adds tags you already have
- Uses efficient batch querying (fingerprints first, then fallback to ID lookup)
Settings
| Setting | Description | Default |
|---|---|---|
| Scene Tag Sync - Dry Run | Preview without making changes | Enabled |
Tag Caching
Fetching all tags from a stash-box takes 20-40 seconds. The plugin caches tags locally:
- Cache location:
plugins/tagManager/cache/ - Cache expiry: 24 hours (auto-refreshes on next use)
- Manual refresh: Click âRefresh Cacheâ to force update
- Per-endpoint: Each stash-box has its own cache file
Cache status indicator:
Green - Valid cache with tag count and age
Yellow - Cache expired (will refresh automatically)
Gray - No cache yet (will fetch on first use)
Plugin Settings
Go to Settings â Plugins â Tag Manager:
| Setting | Description | Default |
|---|---|---|
| Enable Fuzzy Search | Use fuzzy matching (requires thefuzz) | Enabled |
| Enable Synonym Search | Use custom synonym mappings | Enabled |
| Fuzzy Threshold | Minimum score (0-100) for fuzzy matches | 80 |
| Page Size | Tags per page | 25 |
| Scene Tag Sync - Dry Run | Preview sync without changes | Enabled |
Custom Synonyms
Edit plugins/tagManager/synonyms.json to add custom mappings:
{
"synonyms": {
"Your Local Tag": ["StashDB Tag 1", "StashDB Tag 2"]
}
}
Troubleshooting
Common Issues
- âNo Stash-Box Configuredâ - Add a stash-box in Settings â Metadata Providers
- âthefuzz not installedâ - Fuzzy matching disabled; install the package or ignore if you donât need it
- Cache takes too long - First fetch is slow (~30s); subsequent loads use cache
- No matches found - Try âRefresh Cacheâ to update the tag list
Debug Logging
Check Stash logs (Settings â Logs) for detailed output:
- Info - High-level operations (cache hits, sync progress)
- Debug - Detailed info (endpoints, matches found)
- Trace - Very detailed (individual requests)