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 🙏

© 2025 – Pkg Stats / Ryan Hefner

airbridge-link-migrator-command

v0.2.2

Published

Command-line tool for migrating links to Airbridge Tracking Links

Readme

airbridge-link-migrator-command

Command-line tool for batch migration to Airbridge Tracking Links from various sources.

Installation

# Install globally
npm install -g airbridge-link-migrator-command

# Or use with npx
npx airbridge-link-migrator-command

Usage

After installation, the tool is available as abmig (short alias) or airbridge-link-migrator-command:

abmig --source firebase \
      --appName "YourAirbridgeApp" \
      --apiToken "your-airbridge-api-token" \
      --scheme "scheme://" \
      --inputPath "input.csv" \
      --outputPath "output.csv" \
      --batchSize 100 \
      --index 0

Options

Required

  • --source <type> - Source platform type (currently supports: "firebase")
  • --appName <name> - Airbirdge app name
  • --apiToken <token> - Airbridge API token
  • --scheme <scheme> - App URL scheme (e.g., "scheme://")
  • --inputPath <path> - Input CSV file path containing source links
  • --outputPath <path> - Output CSV file path for Airbridge Tracking Links

Optional

  • --batchSize <size> - Number of links to process in parallel (default: 100)
  • --index <index> - Starting index for processing, useful for resuming (default: auto-detect from output file or 0)

CSV Format

Firebase Dynamic Links

When using --source firebase, the tool processes Firebase Dynamic Links and converts them to Airbridge Tracking Links.

Input

The input CSV should have the following columns:

  • short_link - Firebase short link URL
  • utm_source - Traffic source (required, maps to channel)
  • utm_campaign - Campaign name
  • utm_medium - Marketing medium
  • utm_term - Keywords
  • utm_content - Ad content
  • link - Deep link URL
  • afl - Android fallback URL
  • ifl - iOS fallback URL
  • ofl - Desktop fallback URL
  • st - Social title
  • sd - Social description
  • si - Social image URL

Output

The output CSV will contain:

  • firebase_short_link - Original Firebase short link (for reference)
  • success - true/false indicating migration success

When successful, the following Airbridge tracking parameters are included:

  • airbridge_long_url - Airbridge long URL
  • airbridge_short_url - Airbridge short URL
  • channel - Marketing channel (from utm_source, required)
  • campaign - Campaign name (from utm_campaign)
  • sub_publisher - Sub-publisher/medium (from utm_medium)
  • keyword - Search keywords (from utm_term)
  • content - Ad content identifier (from utm_content)
  • deeplink - App deep link URL (converted from link parameter)
  • android_fallback_path - Android fallback URL (from afl)
  • ios_fallback_path - iOS fallback URL (from ifl)
  • desktop_fallback_path - Desktop fallback URL (from ofl)
  • title - Social sharing title (from st)
  • description - Social sharing description (from sd)
  • image_url - Social sharing image URL (from si)

When failed, the following error message parameter is included:

  • error - Error message (if failed)

Features

Auto-Resume

The tool automatically detects the progress from the output file and resumes from where it left off if interrupted.

Rate Limiting

Automatically handles Airbridge API rate limits (40 requests per second).

⚠️ Important: Do NOT run multiple CLI instances simultaneously!

  • Each CLI instance already maximizes the API rate limit (40 requests/second)
  • Running multiple instances will cause API rate limit errors
  • Multiple instances will NOT speed up migration, they will actually slow it down due to rate limit conflicts
  • If you need to process multiple files, run them sequentially, not in parallel

Progress Display

Shows real-time progress including:

  • Current batch being processed
  • Success/failure counts
  • Processing speed
  • Estimated time remaining

Error Handling

  • Continues processing even if individual links fail
  • Failed items are included in output CSV with error messages
  • Summary report at the end shows total successes and failures
  • Common errors:
    • Missing utm_source (channel is required)
    • Invalid channel format (must be lowercase with only letters, numbers, underscore, hyphen, or dot)
    • API rate limit exceeded (automatically handled with retry)

Examples

Basic Migration (Firebase)

abmig --source firebase \
      --appName "MyApp" \
      --apiToken "abc123" \
      --scheme "myapp://" \
      --inputPath "firebase-links.csv" \
      --outputPath "airbridge-links.csv"

Resume from Specific Index

abmig --source firebase \
      --appName "MyApp" \
      --apiToken "abc123" \
      --scheme "myapp://" \
      --inputPath "input.csv" \
      --outputPath "output.csv" \
      --index 5000

Custom Batch Size

abmig --source firebase \
      --appName "MyApp" \
      --apiToken "abc123" \
      --scheme "myapp://" \
      --inputPath "input.csv" \
      --outputPath "output.csv" \
      --batchSize 50

License

MIT