npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

raindrop-tags

v0.1.0

Published

Merging Tags

Readme

Raindrop.io Tag Consolidation Script

This script consolidates your Raindrop.io tags based on the recommendations from your tag analysis.

Setup

  1. Get your Raindrop.io API token:

    • Go to https://app.raindrop.io/settings/integrations
    • Create a new app or use an existing one
    • Copy the "Test token" or generate an access token
  2. Set your API token:

    export RAINDROP_TOKEN="your_token_here"
  3. Install dependencies (if using older Node.js):

    # Script uses built-in modules, no dependencies needed for Node.js 18+
    # For older versions, you might want to install axios:
    # npm install axios

Usage

Preview changes (recommended first):

node merge.js --dry-run

Use an external tag consolidation file (recommended for custom mappings):

node merge.js --dry-run --tags tag_consolidation.json

Apply changes to all collections:

node merge.js

Use an external tag consolidation file and apply changes:

node merge.js --tags tag_consolidation.json

Example tag_consolidation.json

{
  "development": ["Development", "Application", "App"],
  "react": ["React", "React@Square"],
  "ai": ["AI", "artificial-intelligence", "ai-tools"]
}

Get help:

node merge.js --help

What it does

The script consolidates tags in your Raindrop.io account based on a mapping. You can use the built-in mapping or provide your own via a JSON file.

  • By default: Uses the built-in mapping (see merge.js for details).
  • With --tags path/to/file.json: Loads your custom mapping from a JSON file.

Example: Built-in mapping (partial)

  • development ← Development, Application, App
  • react ← React, React@Square
  • ai ← AI, artificial-intelligence, ai-tools, ai-agents, ai-integration

Example: Custom mapping (from JSON)

{
  "mytag": ["oldtag1", "oldtag2"]
}

Safety Features

  • Dry run mode: Preview changes before applying
  • Rate limiting: 1 second delay between API calls
  • Error handling: Continues processing even if some operations fail
  • Detailed logging: Shows exactly what's happening

Example Output

🏷️  Raindrop.io Tag Consolidation Script
==========================================
🔍 Running in DRY RUN mode - no changes will be made
🔗 Using external tag consolidation file: tag_consolidation.json

📊 Found 42 tags

🔄 Consolidating tags [AI, artificial-intelligence, ai-tools] → "ai"
   📥 Found 3 raindrops with tag "AI"
   [DRY RUN] Would update raindrop 123456 with tags: ai, ...
   ...

🚀 Starting consolidation...

🔄 [DRY RUN] Merging tags [AI, artificial-intelligence, ai-tools] → "ai"
   Would merge 3 tags into "ai"
...

📈 Consolidation Summary:
✅ Successful operations: 8
❌ Failed operations: 0
📊 Total operations: 8

💡 Run without --dry-run to apply changes

Important Notes

  • Always run with --dry-run first to preview changes
  • The script will wait 3 seconds before applying changes (giving you time to cancel with Ctrl+C)
  • Changes are permanent - make sure you're happy with the consolidation plan
  • The script includes rate limiting to respect Raindrop.io's API limits
  • If you have a lot of bookmarks, the process might take a while

Testing

A simple test script is provided to validate external tag file loading and dry-run mode:

node test_merge.js

This will:

  • Create a minimal test tag mapping file
  • Run merge.js with --dry-run --tags
  • Check for expected output and clean up

Troubleshooting

  • "Please set your Raindrop.io API token": Set the RAINDROP_TOKEN environment variable
  • "Failed to fetch tags": Check your API token and internet connection
  • Rate limiting errors: The script includes delays, but you can increase them if needed