Deletes duplicate login items in 1Password.
Based on the script originally made by pauladams8.
It looks at the URL and username of login items. If two items have the same URL and username, it will delete one of the items. Login items with OTP or a longer password are kept and the other is deleted.
# Install the 1Password CLI if you don't already have it
brew install --cask 1password/tap/1password-cli
# Download and setup
git clone [email protected]:Ben-Hampson/1Password-Deduplicator.git
cd 1Password-Deduplicator
pip install -r requirements.txt
# Run it
python -m 1password_deduplicator -d
--ignore-favorites - Ignores favourited login items.
--archive - Archives items instead of deleting them.
--dry-run - Tells you which items it would delete but doesn't delete them.
-y - Doesn't prompt before deleting / archiving.
--tag <tag> - Only looks for duplicates with the given tag. (untested)
--vault <vault> - Only looks for duplicates in the given vault. (untested)