Skip to content

Utility Commands

Additional console commands for products and email management.

Product Commands

List Products

List products with optional filters.

bash
php bin/console app:products:list [options]

Options:

OptionDescription
--user-idFilter by user ID
--emailFilter by user email
--expiring-daysShow products expiring within N days
--limitLimit result count (default: 100)

Examples:

bash
# List all products
php bin/console app:products:list

# List products expiring in 30 days
php bin/console app:products:list --expiring-days=30

# List products for specific user
php bin/console app:products:list --email=user@example.com

Create Product

Create a new product for a user.

bash
php bin/console app:product:create <user> <name> [options]

Arguments:

ArgumentDescription
userUser ID or email
nameProduct name

Options:

OptionDescription
--brandProduct brand
--categoryProduct category
--storeStore where purchased
--purchase-datePurchase date (Y-m-d format)
--warranty-monthsWarranty period in months (default: 12)
--serial-numberSerial number
--notesProduct notes

Example:

bash
php bin/console app:product:create user@example.com "iPhone 15 Pro" \
  --brand="Apple" \
  --category="Electronics" \
  --store="Apple Store" \
  --purchase-date="2024-01-15" \
  --warranty-months=24

Delete Product

Delete a product by ID.

bash
php bin/console app:products:delete --id=<product-id> --yes

DANGER

This will permanently delete the product and all associated data including receipts and claims.

Update Warranty End Date

Manually set a product's warranty end date.

bash
php bin/console app:products:set-warranty-end --id=<product-id> --date=<date>

Example:

bash
php bin/console app:products:set-warranty-end --id=123 --date=2025-12-31

Get Manufacturer Details

Fetch manufacturer details using Claude AI.

bash
php bin/console app:product:manufacturer-details <identifier> [options]

Arguments:

ArgumentDescription
identifierProduct ID or product name

Options:

OptionDescription
--brand, -bBrand name (for name search)
--category, -cProduct category
--update-notesUpdate product notes with info
--jsonOutput raw JSON response

Examples:

bash
# By product ID
php bin/console app:product:manufacturer-details 123

# By product name
php bin/console app:product:manufacturer-details "iPhone 15" --brand="Apple"

# Update product notes
php bin/console app:product:manufacturer-details 123 --update-notes

TIP

This command uses Claude AI to fetch:

  • Manufacturer contact information
  • Warranty claim processes
  • Support channels
  • Expected product lifespan

Resend Email Commands

Commands for managing emails via Resend API.

List Emails

List received or sent emails from Resend.

bash
php bin/console resend:emails:list [options]

Options:

OptionDescription
--limit, -lNumber of emails (default: 10)
--type, -tType: 'received' or 'sent' (default: received)

Examples:

bash
# List received emails
php bin/console resend:emails:list

# List sent emails
php bin/console resend:emails:list --type=sent --limit=20

View Email

View details of a specific email.

bash
php bin/console resend:emails:view <email-id> [options]

Options:

OptionDescription
--type, -tType: 'received' or 'sent'
--raw, -rShow raw JSON response
--body, -bShow full email body

Example:

bash
php bin/console resend:emails:view email_abc123 --body

Send Email

Send an email via Resend.

bash
php bin/console resend:emails:send <to> <subject> <body> [options]

Arguments:

ArgumentDescription
toRecipient email address
subjectEmail subject
bodyEmail body content

Options:

OptionDescription
--from, -fFrom email address
--htmlTreat body as HTML
--reply-to, -rReply-to address

Examples:

bash
# Send plain text email
php bin/console resend:emails:send user@example.com "Hello" "This is a test"

# Send HTML email
php bin/console resend:emails:send user@example.com "Welcome" "<h1>Hello</h1>" --html

Database Commands

Doctrine Migrations

bash
# Create new migration
php bin/console make:migration

# Run pending migrations
php bin/console doctrine:migrations:migrate

# Check migration status
php bin/console doctrine:migrations:status

Cache Management

bash
# Clear all caches
php bin/console cache:clear

# Warm up cache
php bin/console cache:warmup

Message Queue

bash
# Start processing queued messages
php bin/console messenger:consume async

# View failed messages
php bin/console messenger:failed:show

# Retry failed messages
php bin/console messenger:failed:retry

MyWarranties - Warranty Management System