ETL Service CLI Commands Reference
This document provides a comprehensive list of all available CLI commands in the ETL service, organized by category.
Running Commands
Development Mode
npm run cli:dev -- <command-name> [options]
Production Mode
npm run cli -- <command-name> [options]
Note: Always use double dashes (--) before the command name when running CLI commands.
Event Matching Commands
compare-events
Compares events using the EventMatcherService to process and match events between platforms.
Description: Compare events using the EventMatcherService
Example:
npm run cli:dev -- compare-events
npm run cli:dev -- compare-events --eventRunId 123
Options:
--eventRunId <eventRunId>- Event Run ID to process
match-events
Searches Ticketmaster events and finds matching Skybox events.
Description: Search Ticketmaster events and find matching Skybox events
Example:
npm run cli:dev -- match-events
npm run cli:dev -- match-events --search "concert" --page 2 --limit 50
Options:
-s, --search <search>- Search term to find events-p, --page <page>- Page number (default: 1)-l, --limit <limit>- Number of results per page (default: 100)
match-monitored-listings
Matches events specifically for monitored listings that lack combined_result_id.
Description: Match events specifically for monitored listings that lack combined_result_id
Example:
npm run cli:dev -- match-monitored-listings
npm run cli:dev -- match-monitored-listings --limit 50 --dry-run
Options:
-l, --limit <limit>- Maximum number of monitored listings to process (default: 100)--dry-run- Show what would be processed without making changes
populate-ticketmaster-data
Populates missing Ticketmaster event data for CombinedResults created by match-monitored-listings.
Description: Populate missing Ticketmaster event data for CombinedResults
Example:
npm run cli:dev -- populate-ticketmaster-data
npm run cli:dev -- populate-ticketmaster-data --limit 50 --dry-run
Options:
-l, --limit <limit>- Maximum number of combined results to process (default: 100)--dry-run- Show what would be processed without making changes
sync-monitored-listing-data
Comprehensive sync command that ensures monitored listings have all required data: SkyboxResult, TickOps data, and CombinedResult with isCheaper logic.
Description: Sync all missing data for monitored listings: SkyboxResult, TickOps, and CombinedResult with isCheaper logic
Example:
npm run cli:dev -- sync-monitored-listing-data
npm run cli:dev -- sync-monitored-listing-data --inventory-id 730604022
npm run cli:dev -- sync-monitored-listing-data --event-id 5461874 --force-refresh
npm run cli:dev -- sync-monitored-listing-data --limit 5 --dry-run
Options:
--inventory-id <inventoryId>- Sync data for specific inventory ID--event-id <eventId>- Sync data for specific event ID-l, --limit <limit>- Maximum number of monitored listings to process (default: 10)--dry-run- Show what would be processed without making changes--force-refresh- Force refresh existing data (update SkyboxResult, TickOps, and CombinedResult)
test:event-matching
Tests event matching service with inventory without combined results.
Description: Test event matching service with inventory without combined results
Example:
npm run cli:dev -- test:event-matching
Monitored Listings Commands
create-monitored-listings
Creates monitored listings for combined results where isCheaper is true and event date is in the future.
Description: Create monitored listings
Example:
npm run cli:dev -- create-monitored-listings
create-xhp-monitored-listings
Creates monitored listings for all XHP tagged inventory.
Description: Create monitored listings for all XHP tagged inventory
Example:
npm run cli:dev -- create-xhp-monitored-listings
npm run cli:dev -- create-xhp-monitored-listings --dry-run
Options:
--dry-run- Show what would be created without actually creating
debug-monitored-listings
Debugs monitored listings to understand why none are due for check.
Description: Debug monitored listings to understand why none are due for check
Example:
npm run cli:dev -- debug-monitored-listings
trigger-monitored-listings
Manually triggers the process monitored listings job.
Description: Manually trigger the process monitored listings job
Example:
npm run cli:dev -- trigger-monitored-listings
Pricing and Monitoring Commands
monitor-pricing
Monitors and analyzes pricing for specific inventory IDs or all XHP tagged inventory.
Description: Monitor and analyze pricing for specific inventory IDs or all XHP tagged inventory
Example:
npm run cli:dev -- monitor-pricing
npm run cli:dev -- monitor-pricing 12345 67890
npm run cli:dev -- monitor-pricing --apply-adjustments --no-update-db
Options:
--no-update-db- Skip updating monitored listings in database--apply-adjustments- Apply recommended price adjustments
check-inventory-pricing
Checks pricing for a specific inventory item.
Description: Check pricing for a specific inventory item
Example:
npm run cli:dev -- check-inventory-pricing 12345
npm run cli:dev -- check-inventory-pricing 12345 --apply-adjustment
Options:
--no-update-db- Skip updating monitored listings in database--apply-adjustment- Apply recommended price adjustment if needed
monitoring-stats
Views pricing monitoring statistics and recent decisions.
Description: View pricing monitoring statistics and recent decisions
Example:
npm run cli:dev -- monitoring-stats
npm run cli:dev -- monitoring-stats --days 30 --sessions 10
npm run cli:dev -- monitoring-stats --inventory-id 12345
Options:
--days <number>- Number of days to look back (default: 7)--sessions <number>- Number of recent sessions to show (default: 5)--inventory-id <id>- Show history for specific inventory item
view-monitored-listings
Views all active monitored listings and their status.
Description: View all active monitored listings and their status
Example:
npm run cli:dev -- view-monitored-listings
npm run cli:dev -- view-monitored-listings --limit 100 --due-only
Options:
--limit <number>- Maximum number of listings to show (default: 50)--due-only- Show only listings due for checking
monitoring-status
Gets current monitoring status and overview.
Description: Get current monitoring status and overview
Example:
npm run cli:dev -- monitoring-status
npm run cli:dev -- monitoring-status --detailed
Options:
--detailed- Show detailed statistics
monitoring-health
Comprehensive health check for the monitored listings system with detailed statistics and problem identification.
Description: Comprehensive health check for monitored listings system
Example:
npm run cli:dev -- monitoring-health
npm run cli:dev -- monitoring-health --detailed --show-score
npm run cli:dev -- monitoring-health --problematic-only --limit 10
Options:
--detailed- Show detailed statistics and breakdowns--problematic-only- Only show problematic listings that need attention-l, --limit <limit>- Maximum number of problematic listings to show (default: 20)--show-score- Calculate and show overall health score (0-100)
Pipeline Commands
run-pipeline
Runs the complete event matching and purchase creation pipeline in a single command.
Description: Run the complete event matching and purchase creation pipeline
Example:
npm run cli:dev -- run-pipeline
npm run cli:dev -- run-pipeline --dry-run --limit 20
npm run cli:dev -- run-pipeline --skip-matching --skip-comparing
Options:
--dry-run- Show what would be done without making changes-l, --limit <limit>- Maximum number of items to process at each stage (default: 50)--skip-matching- Skip the event matching stage--skip-comparing- Skip the event comparison stage--skip-monitoring- Skip creating monitored listings--skip-purchases- Skip creating purchases
Note: Only processes data updated in the last 24 hours for purchases to ensure freshness.
data-freshness
Analyzes the freshness of potential purchase opportunities to ensure only recent data is used.
Description: Check data freshness for potential purchase opportunities
Example:
npm run cli:dev -- data-freshness
npm run cli:dev -- data-freshness --show-all --limit 20
Options:
--show-all- Show all opportunities including stale data-l, --limit <limit>- Maximum number of items to show (default: 20)
Purchase Commands
create-purchases
Creates purchases from combined results where isCheaper is true.
Description: Create purchases from combined results where isCheaper is true
Example:
npm run cli:dev -- create-purchases
npm run cli:dev -- create-purchases --dry-run --limit 10
Options:
--dry-run- Show what purchases would be created without actually creating them-l, --limit <limit>- Maximum number of purchases to create (default: 10)
Note: Only processes data updated in the last 24 hours to ensure purchase decisions are based on fresh pricing data.
count-profitable-opportunities
Counts combined results where isCheaper=true and ready for purchase (processed=false).
Description: Count combined results where isCheaper=true and ready for purchase (processed=false)
Example:
npm run cli:dev -- count-profitable-opportunities
npm run cli:dev -- count-profitable-opportunities --days 7
npm run cli:dev -- count-profitable-opportunities --show-recent
Options:
--days <number>- Number of days to look back (default: all time)--show-recent- Show recent opportunities instead of just count
Inventory Management Commands
inventory-sync
Syncs inventory data.
Description: Sync inventory
Example:
npm run cli:dev -- inventory-sync
delist-sold-out-events
Delists inventory for sold-out events.
Description: Delist inventory for sold-out events
Example:
npm run cli:dev -- delist-sold-out-events
delist-all-inventory
Delists all active inventory (emergency API limit response).
Description: Delist all active inventory (emergency API limit response)
Example:
npm run cli:dev -- delist-all-inventory --dry-run
npm run cli:dev -- delist-all-inventory --reason "API limit reached"
Options:
--dry-run- Show what would be delisted without actually doing it--reason <reason>- Reason for delisting (default: manual)
relist-all-inventory
Relists all previously delisted inventory.
Description: Relist all previously delisted inventory
Example:
npm run cli:dev -- relist-all-inventory --dry-run
npm run cli:dev -- relist-all-inventory --reason "API limit resolved"
Options:
--dry-run- Show what would be relisted without actually doing it--reason <reason>- Reason for relisting (default: manual)
inventory-status
Shows current inventory status and delisting history.
Description: Show current inventory status and delisting history
Example:
npm run cli:dev -- inventory-status
npm run cli:dev -- inventory-status --detailed
Options:
--detailed- Show detailed inventory breakdown
Investigation Commands
investigate-invoice
Investigates a Skybox invoice by fetching and displaying all relevant data.
Description: Investigate a Skybox invoice by fetching and displaying all relevant data
Example:
npm run cli:dev -- investigate-invoice --invoice-id 12345
npm run cli:dev -- investigate-invoice --sold-inventory-id 67890
Options:
-i, --invoice-id <invoiceId>- The Skybox invoice ID to investigate-s, --sold-inventory-id <soldInventoryId>- The Skybox sold inventory ID to investigate
investigate-listing
Investigates an active listing by fetching and displaying all relevant data.
Description: Investigate an active listing by fetching and displaying all relevant data
Example:
npm run cli:dev -- investigate-listing --inventory-id 12345
npm run cli:dev -- investigate-listing --event-id 67890
Options:
-i, --inventory-id <inventoryId>- The Skybox inventory ID to investigate-e, --event-id <eventId>- The Skybox event ID to investigate
XHP Inventory Commands
list-xhp-inventory
Lists XHP tagged inventory items with skybox results for testing.
Description: List XHP tagged inventory items with skybox results for testing
Example:
npm run cli:dev -- list-xhp-inventory
npm run cli:dev -- list-xhp-inventory --limit 50 --future-only --min-price 100 --max-price 500
Options:
--limit <number>- Maximum number of items to return (default: 20)--min-price <number>- Minimum listing price filter (default: 0)--max-price <number>- Maximum listing price filter (default: 1000)--future-only- Only show future events--with-skybox-result- Only show items with skybox results
show-inventory-details
Shows detailed information for a specific inventory item.
Description: Show detailed information for a specific inventory item
Example:
npm run cli:dev -- show-inventory-details 12345
find-xhp-with-combined-results
Finds XHP inventory that has CombinedResult records for better monitoring.
Description: Find XHP inventory that has CombinedResult records for better monitoring
Example:
npm run cli:dev -- find-xhp-with-combined-results
npm run cli:dev -- find-xhp-with-combined-results --limit 10
Options:
--limit <number>- Maximum number of items to return (default: 5)
Data Sync Commands
scrape-and-store-events
Scrapes Ticketmaster events and stores them in the database.
Description: Scrape Ticketmaster events and store them in the database
Example:
npm run cli:dev -- scrape-and-store-events
get-tickops-data
Gets tickops data and stores it.
Description: Get tickops data
Example:
npm run cli:dev -- get-tickops-data
update-combined-results
Updates all CombinedResult records for future events with latest TickOps and VividSeats data.
Description: Update all CombinedResult records for future events with latest data
Example:
npm run cli:dev -- update-combined-results
API Testing Commands
test-vivid-api
Tests VividSeats API call for a specific event ID.
Description: Test VividSeats API call for a specific event ID
Example:
npm run cli:dev -- test-vivid-api 12345
test-tickops-api
Tests TickOps API call for a specific Ticketmaster URL.
Description: Test TickOps API call for a specific Ticketmaster URL
Example:
npm run cli:dev -- test-tickops-api "https://www.ticketmaster.com/event/..."
test-both-apis
Tests both VividSeats and TickOps APIs for the same event.
Description: Test both VividSeats and TickOps APIs for the same event
Example:
npm run cli:dev -- test-both-apis 12345 "https://www.ticketmaster.com/event/..."
test-event-prices
Tests getEventPrices method for a specific Skybox event ID.
Description: Test getEventPrices method for a specific Skybox event ID
Example:
npm run cli:dev -- test-event-prices 12345
npm run cli:dev -- test-event-prices 12345 --raw
Options:
--raw- Show raw API response
TickOps Quota Commands
tickops-quota status
Shows current TickOps quota usage.
Description: Show current TickOps quota usage
Example:
npm run cli:dev -- tickops-quota status
npm run cli:dev -- tickops-quota status --detailed
Options:
--detailed- Show detailed quota information
tickops-quota reset
Resets TickOps quota counters.
Description: Reset TickOps quota counters
Example:
npm run cli:dev -- tickops-quota reset --type daily --confirm
npm run cli:dev -- tickops-quota reset --type both --confirm
Options:
--type <type>- Reset type: daily, monthly, or both (default: both)--confirm- Confirm the reset operation
tickops-quota test-check
Tests quota checking without making actual API calls.
Description: Test quota checking without making actual API calls
Example:
npm run cli:dev -- tickops-quota test-check
tickops-quota simulate-request
Simulates a TickOps API request (increments quota counters).
Description: Simulate a TickOps API request (increments quota counters)
Example:
npm run cli:dev -- tickops-quota simulate-request --count 5 --confirm
Options:
--count <count>- Number of requests to simulate (default: 1)--confirm- Confirm the simulation
Monitoring and Metrics Commands
test-pushgateway
Tests Pushgateway connectivity and metrics push.
Description: Test Pushgateway connectivity and metrics push
Example:
npm run cli:dev -- test-pushgateway
npm run cli:dev -- test-pushgateway --job-name custom-test --verbose
Options:
--job-name <name>- Job name for test metrics (default: etl-worker-test)--verbose- Show detailed debug information
test-pushgateway-simple
Tests Pushgateway connectivity without full service initialization.
Description: Test Pushgateway connectivity without full service initialization
Example:
npm run cli:dev -- test-pushgateway-simple
npm run cli:dev -- test-pushgateway-simple --job-name custom-test --verbose
Options:
--job-name <name>- Job name for test metrics (default: etl-worker-test)--verbose- Show detailed debug information
Utility Commands
show-logs
Shows monitoring logs for a specific inventory ID.
Description: Show monitoring logs for a specific inventory ID
Example:
npm run cli:dev -- show-logs 12345
npm run cli:dev -- show-logs 12345 --limit 20
Options:
--limit <number>- Maximum number of logs to show (default: 10)
test-find
Tests find matching skybox event functionality.
Description: Test find matching skybox event
Example:
npm run cli:dev -- test-find
Environment Variables
Some commands require specific environment variables to be set:
PUSHGATEWAY_URL- Required for pushgateway test commandsVIVIDSEATS_EMAIL- Required for VividSeats API authenticationVIVIDSEATS_PASSWORD- Required for VividSeats API authenticationPLAYWRIGHT_SERVER_URL- URL for the Playwright authentication server
Common Workflows
Setting up monitoring for new XHP inventory
# 1. List available XHP inventory
npm run cli:dev -- list-xhp-inventory --future-only
# 2. Create monitored listings for all XHP inventory
npm run cli:dev -- create-xhp-monitored-listings
# 3. Monitor pricing and apply adjustments
npm run cli:dev -- monitor-pricing --apply-adjustments
Investigating issues with a specific listing
# 1. Investigate the listing details
npm run cli:dev -- investigate-listing --inventory-id 12345
# 2. Check current pricing
npm run cli:dev -- check-inventory-pricing 12345
# 3. View monitoring logs
npm run cli:dev -- show-logs 12345
Emergency API limit response
# 1. Check current inventory status
npm run cli:dev -- inventory-status
# 2. Delist all inventory (dry run first)
npm run cli:dev -- delist-all-inventory --dry-run
# 3. Actually delist if needed
npm run cli:dev -- delist-all-inventory --reason "API limit reached"
# 4. Later, relist when resolved
npm run cli:dev -- relist-all-inventory --reason "API limit resolved"