airbridge-link-migrator-command
v0.2.2
Published
Command-line tool for migrating links to Airbridge Tracking Links
Maintainers
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-commandUsage
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 0Options
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 URLutm_source- Traffic source (required, maps to channel)utm_campaign- Campaign nameutm_medium- Marketing mediumutm_term- Keywordsutm_content- Ad contentlink- Deep link URLafl- Android fallback URLifl- iOS fallback URLofl- Desktop fallback URLst- Social titlesd- Social descriptionsi- 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 URLairbridge_short_url- Airbridge short URLchannel- 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 5000Custom Batch Size
abmig --source firebase \
--appName "MyApp" \
--apiToken "abc123" \
--scheme "myapp://" \
--inputPath "input.csv" \
--outputPath "output.csv" \
--batchSize 50License
MIT
