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:
ποΈ 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
Install globally
npm install -g @tagadapay/plugin-cli@latest
Start Interactive Mode
π This is all you need! The interactive mode guides you through everything.
Interactive Mode (Recommended)
The CLI features a powerful interactive mode that makes deployment management intuitive and efficient:
Interactive Deploy
Interactive Mount
Interactive Manager
Features:
π― Auto-detect plugin configuration
π Smart config file selection
πͺ Store selection with search
β
Real-time validation
π Deployment progress tracking
Core Commands
Authentication
Deployment Management
Deploy Plugin
List Deployments
Remove Deployment
# Interactive mode (recommended)
tgdcli ideploy
# Command line mode
tgdcli deploy --store-id your-store-id
Domain Management
Mount to Domain
Unmount Domain
List Mounts
# 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:
{
"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:
{
"storeId" : "your-store-id" ,
"accountId" : "your-account-id" ,
"apiUrl" : "https://app.tagadapay.dev"
}
Deployment Variants
Create multiple configuration files for different deployments:
{
"theme" : {
"primaryColor" : "#28a745" ,
"secondaryColor" : "#6c757d"
},
"features" : {
"upsells" : true ,
"promotions" : true
}
}
{
"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:
π 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:
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:
Local Development : Uses .local.json
Staging : Uses selected config file + store settings
Production : Uses store configuration + plugin settings
Workflow Examples
Development to Production
Develop locally
# Your plugin runs with .local.json config
npm run dev
Deploy to staging
tgdcli ideploy
# Select staging store
# Choose config variant
Test deployment
# Test the provided staging URL
# Verify functionality
Deploy to production
tgdcli ideploy
# Select production store
# Use production config
Mount to custom domain
tgdcli imount
# Select deployment
# Enter custom domain
A/B Testing Setup
Create config variants
# Create config/variant-a.json
# Create config/variant-b.json
Deploy variant A
tgdcli deploy --config config/variant-a.json --store-id your-store
Deploy variant B
tgdcli deploy --config config/variant-b.json --store-id your-store
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
Option Description Example --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:
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