mirror of
https://github.com/eznix86/bitwarden-vault-organizer.git
synced 2026-07-25 20:39:07 +00:00
Export your json, and locally organize your vault with AI
- Python 100%
| .gitignore | ||
| bitwarden_organizer.py | ||
| README.md | ||
Bitwarden Organizer with AI + Rules
Intelligently organizes your Bitwarden vault using Local AI classification using Ollama with manual review for ambiguous cases and a rules engine for future runs.
Features
- AI Classification: Uses local LLM (Ollama) to categorize 600+ logins in minutes
- Rules Engine: Build reusable rules so items are auto-classified on future runs
- Ambiguity Detection: Flags uncertain items for your review with AI suggestions
- Folder Creation: Automatically creates folders and assigns items
- Validation: Count checks and interactive confirmations at every step
Workflow
First Run
- AI classifies most items automatically
- Flags 20-50 ambiguous items (generic names, missing URLs, etc.)
- You review each with AI suggestions + option to create rules
- Rules saved to
bitwarden_rules.json
Subsequent Runs
- Rules applied first (instant classification)
- AI only classifies new/unknown items
- Fewer ambiguous cases (rules handle most edge cases)
Usage
# Install Ollama and pull model
ollama pull qwen3:8b
# Run organizer
uv run bitwarden_organizer.py input.json output.json
Local Preview
Spin up a local bitwarden to preview your newly organized vault (using vaultwarden)
- Install mkcert
- Install docker
mkdir vw-certs
cd vw-certs
mkcert install
mkcert -key-file vaultwarden-key.pem -cert-file vaultwarden-cert.pem
docker run -d --name vaultwarden \
-v /tmp/vw-data:/data \
-v "$(pwd):/certs:ro" \
-e DOMAIN=https://localhost:8443 \
-e ROCKET_TLS='{certs="/certs/vaultwarden-cert.pem",key="/certs/vaultwarden-key.pem"}' \\
-p 8443:80 \\
vaultwarden/server:latest
Then open https://localhost:8443.
- Create an account, and import
bitwarden_organized.json. - After Preview, you can remove this vaultwarden
# Stop vaultwarden
docker stop vaultwarden && docker rm vaultwarden
export CERTS_DIR=$(pwd)
cd $CERTS_DIR/..
# Delete the certs and vaultwarden data
rm -rf /tmp/vw-data && $CERTS_DIR
Interactive Review
When ambiguous items are found:
Item #47: "Google"
URL: mail.google.com
Username: eznix@company.com
Notes: (none)
AI suggests:
1. ★ Work & Productivity
2. Email
3. Other
Reasoning: Company email address indicates work use
Choice [1-3, or type category name]: 1
→ Classified as: Work & Productivity
Create a rule for future items like this?
Options:
1. URL contains 'mail.google.com'
2. Name contains 'Google'
3. Username ends with '@company.com'
4. Exact match: 'Google' + this URL
0. No rule
Choice [0-4]: 3
✓ Rule added: Username ends with '@company.com' → Work & Productivity
Rules File Structure
bitwarden_rules.json stores your decisions:
{
"url_patterns": {
"chase.com": "Banking & Finance",
"*amazon.com": "Shopping"
},
"name_keywords": {
"VPN": "Work & Productivity",
"PIN": "Banking & Finance"
},
"username_patterns": {
"*@company.com": "Work & Productivity"
},
"notes_keywords": {
"authenticator": "Security Tools"
},
"exact_matches": {
"My Bank|https://bank.com": "Banking & Finance"
}
}
Categories
- Social Media
- Banking & Finance
- Shopping
- Work & Productivity
- Streaming & Entertainment
- Gaming
- Developer & Tech
- Health
- Travel
- Government & Legal
- Education
- Utilities & Home
- Other
Tips
- First run takes longer — review ambiguous items carefully and create good rules
- Subsequent runs are fast — rules handle most items automatically
- URL rules are powerful —
*amazon.commatches any Amazon subdomain - Username patterns are great — catch all work accounts with
*@company.com - Start broad, refine later — you can always edit
bitwarden_rules.jsonmanually
Requirements
- Python 3.13+
- Ollama with qwen3:8b (or modify MODEL variable for other models)
- Unencrypted Bitwarden JSON export