Skip to main content

TagadaPay Plugin CLI

Latest Version

v3.0.3@tagadapay/plugin-cli
A command-line tool for deploying React apps, static websites, and plugins on TagadaPay with routing, domain management, and instance management.
npm install -g @tagadapay/plugin-cli
The CLI installs two binary aliases: tgd (short) and tgdcli (long). All examples below use tgd.

Quick Start

1

Login

tgd login
Opens your browser for secure authentication. Defaults to production.
2

Deploy your plugin

cd my-plugin
tgd deploy
The CLI reads plugin.manifest.json, creates a ZIP of your dist/ folder, uploads it, and deploys.

Interactive Mode

The easiest way to manage everything — deploy, mount, install, manage domains:
tgd interactive
🎛️  TagadaPay Plugin Manager
────────────────────────────

? What would you like to do? (Use arrow keys)
❯ 🚀 Deploy Plugin
  📋 List Deployments
  🔌 Install Plugin from Store
  🔗 Mount Plugin to Alias
  📊 List Instances
  🌐 Manage Domains
  ❌ Exit
Interactive mode provides store selection, config variant picking, real-time upload progress, and guided workflows.

Commands

Authentication

tgd login              # Production (default)
tgd login --dev        # Development
tgd login --local      # Local dev server

Deploy

tgd deploy                                     # Auto-detect manifest, prompt for store
tgd deploy --store store_abc123                # Specify store
tgd deploy --store store_abc123 --config config/production.json
tgd deploy --plugin-id "custom-id"             # Override plugin ID
tgd deploy --auto-suffix                       # Append random suffix to plugin ID
tgd deploy --overwrite                         # Replace existing deployment (same plugin+version)
FlagAliasDescription
--store--store-id, -sTarget store ID (prompts if omitted)
--config-cPath to manifest (default: plugin.manifest.json)
--env-eEnvironment: dev, local, prod
--dev-dShortcut for --env dev
--local-lShortcut for --env local
--prod-pShortcut for --env prod (default)
--plugin-idOverride plugin ID from manifest
--auto-suffixAppend random 6-char suffix to plugin ID
--overwrite--forceDelete existing deployment and replace
--verboseShow detailed API logs
--overwrite permanently deletes the existing deployment (record, instances, routes) and replaces it. This is not reversible.
After deploying, the CLI auto-syncs config templates if a config/ folder exists (presets, schema, uiSchema).

Archive

Create a local ZIP without deploying:
tgd archive                        # Creates archive from current dir
tgd archive --output my-plugin.zip # Custom output filename

List

tgd list --store store_abc123           # List active plugins
tgd list --store store_abc123 --inactive # Include inactive

Instance Management

tgd install --store store_abc123
# Interactive — select plugin, configure, create instance

Domain Management

Domain commands authenticate via your login session. They do not require --store-id.
tgd list-domains
tgd list-domains --dev

Plugin Manifest

Every plugin requires a plugin.manifest.json. The CLI validates it before deploying.

Required Fields

{
  "pluginId": "my-checkout-plugin",
  "name": "My Checkout Plugin",
  "version": "1.0.0",
  "description": "A custom checkout experience",
  "author": "Your Name",
  "category": "checkout",
  "mode": "direct-mode",
  "pages": [
    {
      "path": "/",
      "features": ["landing"],
      "remappable": false
    },
    {
      "path": "/checkout",
      "features": [
        {
          "type": "checkout",
          "requirements": ["payment"]
        }
      ],
      "remappable": true
    },
    {
      "path": "/thankyou/:orderId",
      "features": [
        {
          "type": "thankyou"
        }
      ],
      "remappable": true
    }
  ],
  "router": {
    "basePath": "/",
    "matcher": ".*",
    "excluder": null
  },
  "requirements": {
    "sdk": "@tagadapay/plugin-sdk",
    "sdkVersion": "v2"
  }
}

All Manifest Fields

FieldRequiredDescription
pluginIdYesUnique plugin identifier
nameYesHuman-readable name
versionYesSemver (1.0.0)
descriptionYesShort description
authorYesAuthor name
categoryYesCategory (e.g. checkout, landing, upsell)
pagesYesArray of page definitions (at least one)
routerYesRouting config: basePath, matcher, excluder
requirementsYesSDK info: sdk, sdkVersion (v1 or v2)
modeNodirect-mode (default) or proxy-mode
configurationNoConfig schema for CRM: schema, uiSchema, presets
homepageNoURL to plugin homepage
repositoryNoURL to source repository
licenseNoLicense identifier
tagsNoArray of tag strings
landingImgUrlNoPreview image URL
publicNoWhether plugin is listed publicly

Page Features

Simple string features:
{ "path": "/", "features": ["landing"] }
Features with requirements (for pages that need data):
{
  "path": "/checkout",
  "features": [
    {
      "type": "checkout",
      "requirements": ["payment", "shipping", "customer"]
    }
  ]
}
Feature types: landing, checkout, thankyou, product-page, catalog, upsell, post-purchase, static Requirements: payment, shipping, customer, order, cart, inventory

Environments

The CLI supports three built-in environments:
FlagEnvironmentAPI URL
--prod (default)Productionhttps://app.tagadapay.com
--devDevelopmenthttps://app.tagadapay.dev
--localLocalhttp://app.localhost:3000
You can also pass a custom URL:
tgd login --base-url https://custom.tagadapay.com

Workflow Examples

Deploy & Mount

1

Build your plugin

npm run build
2

Deploy

tgd deploy --store store_abc123
Note the deployment ID from the output.
3

Install (create instance)

tgd install --store store_abc123
Select the deployment, optionally configure it.
4

Mount to alias

tgd mount-alias --store store_abc123
Select the instance and choose an alias path.

Update a Plugin

# Bump version in plugin.manifest.json
npm run build
tgd deploy --store store_abc123

# Or overwrite same version
tgd deploy --store store_abc123 --overwrite

A/B Testing

Deploy two variants and mount them via the A/B testing API:
tgd deploy --config config/variant-a.json --store store_abc123
# Note: deployment ID A

tgd deploy --config config/variant-b.json --store store_abc123
# Note: deployment ID B
Then configure split testing via the API or CRM.

Custom Domain

tgd add-domain checkout.mystore.com
# CLI will show CNAME record to add

tgd verify-domain cdm_abc123
# After DNS propagation

Troubleshooting

tgd logout
tgd login
tgd whoami
Ensure plugin.manifest.json exists in your current directory and is valid JSON:
cat plugin.manifest.json | python3 -m json.tool
Build your plugin before deploying:
npm run build
ls dist/
A deployment already exists for this plugin ID + version. Either:
  • Bump the version in your manifest
  • Use --overwrite to replace the existing deployment
DNS can take up to 48 hours to propagate. Check status:
tgd domain-info checkout.mystore.com
tgd verify-domain cdm_abc123

Verbose Mode

For detailed API request/response logs:
tgd --verbose deploy

Support