Skip to main content

TagadaPay Plugin CLI

Latest Version

v2.1.5 - Powerful CLI for deploying and managing plugins on TagadaPay
A comprehensive command-line tool for deploying React apps, static websites, and plugins on the TagadaPay platform with advanced routing and domain management capabilities.

Interactive Mode - The Best Way to Manage Plugins

The CLI’s Interactive Mode (tgdcli int) provides a beautiful, user-friendly interface for all your deployment needs:
tgdcli int
πŸŽ›οΈ  Interactive Deployment Manager
───────────────────────────────────

? What would you like to do? (Use arrow keys)
❯ πŸš€ Deploy Plugin
  πŸ“‹ Manage Deployments (with mount/unmount actions)  
  πŸͺ Change Store
  πŸ”„ Refresh
  ❌ Exit

Deploy Plugin Demo

When you select β€πŸš€ Deploy Plugin”, you get guided deployment:
πŸš€ Plugin Deployment Wizard
────────────────────────────

βœ… Plugin detected: my-awesome-plugin v1.2.0
πŸ“ Build directory: ./dist
πŸ“‹ Manifest: plugin.manifest.json

? Select store to deploy to: (Use arrow keys)
❯ πŸͺ My Production Store (store_prod_123)
  πŸ§ͺ My Staging Store (store_staging_456) 
  πŸ”§ My Development Store (store_dev_789)

? Select configuration: (Use arrow keys)
  β—‹ No configuration
  β—‹ .local.json
❯ ● config/production.json
  β—‹ config/theme-variant.json

πŸš€ Deploying... β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ 100%

βœ… Deployment successful!

πŸ“‹ Deployment Details:
β”œβ”€β”€ ID: dep_abc123xyz
β”œβ”€β”€ Name: my-awesome-plugin-v1.2.0
β”œβ”€β”€ Store: My Production Store
└── URL: https://my-plugin-abc123.tagadapay.app

πŸ”— Next steps:
β€’ Test your plugin at the URL above
β€’ Mount to custom domain with: tgdcli imount
β€’ View all deployments with: tgdcli ilist

Manage Deployments Demo

The β€πŸ“‹ Manage Deployments” option shows a beautiful tree view:
πŸ“‹ Deployment Manager - My Production Store
─────────────────────────────────────────

πŸ“ My Production Store (store_prod_123)
β”œβ”€β”€ πŸš€ my-plugin-v1.2.0 (dep_abc123) [ACTIVE]
β”‚   β”œβ”€β”€ 🌐 https://my-plugin-abc123.tagadapay.app
β”‚   β”œβ”€β”€ πŸ”— my-plugin.mystore.com
β”‚   └── πŸ“Š Actions: [Mount] [Unmount] [Remove]
β”œβ”€β”€ πŸš€ landing-page-v2 (dep_def456) [ACTIVE]  
β”‚   β”œβ”€β”€ 🌐 https://landing-def456.tagadapay.app
β”‚   └── πŸ“Š Actions: [Mount] [Remove]
└── πŸš€ old-checkout (dep_ghi789) [INACTIVE]
    β”œβ”€β”€ 🌐 https://old-checkout-ghi789.tagadapay.app
    └── πŸ“Š Actions: [Remove]

? Select deployment to manage: (Use arrow keys)
❯ my-plugin-v1.2.0 (dep_abc123)
  landing-page-v2 (def456)  
  old-checkout (dep_ghi789)
  ← Back to main menu

Quick Start

1

Install globally

npm install -g @tagadapay/plugin-cli@latest
2

Login to TagadaPay

tgdcli login
3

Start Interactive Mode

tgdcli int
πŸŽ‰ This is all you need! The interactive mode guides you through everything.
The CLI features a powerful interactive mode that makes deployment management intuitive and efficient:
  • Interactive Deploy
  • Interactive Mount
  • Interactive Manager
tgdcli ideploy
Features:
  • 🎯 Auto-detect plugin configuration
  • πŸ“ Smart config file selection
  • πŸͺ Store selection with search
  • βœ… Real-time validation
  • πŸ“Š Deployment progress tracking

Core Commands

Authentication

tgdcli login

Deployment Management

# Interactive mode (recommended)
tgdcli ideploy

# Command line mode
tgdcli deploy --store-id your-store-id

Domain Management

# Interactive mounting
tgdcli imount

# Direct mounting
tgdcli mount deployment-id custom-domain.com --store-id your-store-id

Configuration Management

Plugin Manifest

Every plugin needs a plugin.manifest.json file:
plugin.manifest.json
{
  "name": "my-awesome-plugin",
  "version": "1.0.0",
  "description": "An amazing TagadaPay plugin",
  "routes": {
    "/": "index.html",
    "/checkout": "index.html",
    "/success": "success.html"
  },
  "type": "checkout",
  "author": "Your Name",
  "homepage": "https://yourwebsite.com"
}

Local Development Config

Create .local.json for local development:
.local.json
{
  "storeId": "your-store-id",
  "accountId": "your-account-id",
  "apiUrl": "https://app.tagadapay.dev"
}

Deployment Variants

Create multiple configuration files for different deployments:
config/theme-green.json
{
  "theme": {
    "primaryColor": "#28a745",
    "secondaryColor": "#6c757d"
  },
  "features": {
    "upsells": true,
    "promotions": true
  }
}
config/theme-blue.json
{
  "theme": {
    "primaryColor": "#007bff",
    "secondaryColor": "#6c757d"
  },
  "features": {
    "upsells": false,
    "promotions": true
  }
}

Advanced Features

Multi-Store Management

The CLI automatically manages multiple stores and environments:
# Store selection is interactive
tgdcli ideploy
# > Select store: [Store A] [Store B] [Store C]

# Or specify directly
tgdcli deploy --store-id store-123

Deployment Tree View

Visualize your deployments with the interactive tree view:
tgdcli ilist
πŸ“ my-store (store-123)
β”œβ”€β”€ πŸš€ my-plugin-v1 (dep-abc123)
β”‚   β”œβ”€β”€ 🌐 https://my-plugin.tagadapay.app
β”‚   └── πŸ”— custom-domain.com
β”œβ”€β”€ πŸš€ landing-page (dep-def456)
β”‚   └── 🌐 https://landing.tagadapay.app
└── πŸš€ checkout-flow (dep-ghi789)
    β”œβ”€β”€ 🌐 https://checkout.tagadapay.app
    └── πŸ”— checkout.mystore.com

Clean Remove

Safely remove deployments with dependency checking:
tgdcli iremove
The CLI will:
  • βœ… Check for domain mounts
  • βœ… Verify no active traffic
  • βœ… Show impact analysis
  • βœ… Confirm before deletion

Configuration Injection

The CLI automatically injects the right configuration based on your deployment:
  1. Local Development: Uses .local.json
  2. Staging: Uses selected config file + store settings
  3. Production: Uses store configuration + plugin settings

Workflow Examples

Development to Production

1

Develop locally

# Your plugin runs with .local.json config
npm run dev
2

Deploy to staging

tgdcli ideploy
# Select staging store
# Choose config variant
3

Test deployment

# Test the provided staging URL
# Verify functionality
4

Deploy to production

tgdcli ideploy
# Select production store
# Use production config
5

Mount to custom domain

tgdcli imount
# Select deployment
# Enter custom domain

A/B Testing Setup

1

Create config variants

# Create config/variant-a.json
# Create config/variant-b.json
2

Deploy variant A

tgdcli deploy --config config/variant-a.json --store-id your-store
3

Deploy variant B

tgdcli deploy --config config/variant-b.json --store-id your-store
4

Mount to different domains

tgdcli mount deployment-a-id variant-a.mystore.com
tgdcli mount deployment-b-id variant-b.mystore.com

CLI Reference

Global Options

OptionDescriptionExample
--store-idSpecify store ID--store-id store-123
--configUse specific config file--config config/prod.json
--dry-runPreview changes without executing--dry-run
--verboseEnable detailed logging--verbose
--helpShow command help--help

Environment Variables

# Set default store
export TAGADA_STORE_ID=your-store-id

# Set API environment
export TAGADA_API_URL=https://app.tagadapay.com

# Enable debug logging
export TAGADA_DEBUG=true

Troubleshooting

Common Issues

Solution: Run tgdcli logout then tgdcli login to refresh your authentication tokens.
Solution: Check that you’re using the correct store ID and that the deployment exists with tgdcli list.
Solution: Verify the domain is properly configured and points to TagadaPay’s servers. Check DNS settings.
Solution: Ensure your config file path is correct and the file exists. Use --config flag to specify the path.

Debug Mode

Enable verbose logging for troubleshooting:
tgdcli --verbose ideploy
This will show:
  • πŸ“ Detailed API requests
  • πŸ” Configuration resolution
  • πŸ“Š Upload progress
  • ⚠️ Warning messages

Best Practices

1. Use Interactive Mode

Interactive commands provide better UX and error prevention:
# βœ… Recommended
tgdcli ideploy

# ❌ Avoid unless scripting
tgdcli deploy --store-id store-123 --config config.json

2. Organize Configurations

Keep your configs organized:
config/
β”œβ”€β”€ development.json
β”œβ”€β”€ staging.json
β”œβ”€β”€ production.json
└── variants/
    β”œβ”€β”€ theme-a.json
    └── theme-b.json

3. Version Your Deployments

Use meaningful deployment names:
# βœ… Good
my-plugin-v2.1.0

# ❌ Avoid
my-plugin-123

4. Test Before Production

Always test in staging first:
# Deploy to staging
tgdcli ideploy # Select staging store

# Test thoroughly, then deploy to production
tgdcli ideploy # Select production store

Support

Need help with the CLI? We’re here to help:
  • Documentation: Complete command reference
  • Examples: Real-world usage scenarios
  • Support: developer-support@tagadapay.com
  • GitHub: Report issues and contribute