Skip to main content

CLI Quick Start

Deploy your plugin to TagadaPay in 5 minutes.

Prerequisites

  • Node.js 18+ (Download)
  • A TagadaPay account with access to a store
  • Your plugin built (dist/ directory with index.html)

Install & Login

1

Install the CLI

npm install -g @tagadapay/plugin-cli
Verify:
tgd --version
2

Login

tgd login
This opens your browser for authentication. Once complete:
✅ Successfully logged in

Deploy Your Plugin

tgd interactive
Select “Deploy Plugin”, then follow the wizard:
  1. Pick a store from the list
  2. Select a config variant (or skip)
  3. Confirm and deploy
  4. Get your deployment ID

Option 2: Direct Command

cd my-plugin
tgd deploy --store store_abc123
The CLI will:
  1. Validate plugin.manifest.json
  2. ZIP your dist/ folder + manifest
  3. Upload to blob storage
  4. Deploy via API
  5. Return the deployment ID

Plugin Structure

Your plugin directory should look like this:
my-plugin/
├── plugin.manifest.json    # Required
├── dist/                   # Required (built files)
│   ├── index.html
│   └── assets/
│       ├── index.js
│       └── style.css
└── config/                 # Optional (presets, schema)
    ├── default.preset.json
    └── schema.json

Create plugin.manifest.json

All fields below are required by the CLI validator. Missing any will fail deployment.
{
  "pluginId": "my-first-plugin",
  "name": "My First Plugin",
  "version": "1.0.0",
  "description": "My first TagadaPay plugin",
  "author": "Your Name",
  "category": "checkout",
  "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"
  }
}

Build

npm run build
ls dist/   # Should contain index.html

Step-by-Step Walkthrough

1. Verify Everything

ls plugin.manifest.json   # Must exist
ls dist/index.html         # Must exist
cat plugin.manifest.json | python3 -m json.tool  # Must be valid JSON

2. Deploy

tgd interactive
  1. Select Deploy Plugin
  2. Choose your store
  3. Optionally pick a config from config/ directory
  4. Confirm and deploy

3. Install & Mount

After deploying, create an instance and mount it:
tgd install --store store_abc123
# Select your deployment, configure if needed

tgd mount-alias --store store_abc123
# Select the instance, choose an alias path
Your plugin is now live.

4. Verify

tgd list --store store_abc123
tgd list-instances --store store_abc123
tgd list-mounts --store store_abc123

Common Workflows

Update a Plugin

# 1. Bump version in plugin.manifest.json
# 2. Rebuild
npm run build

# 3. Deploy new version
tgd deploy --store store_abc123

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

Deploy to Multiple Environments

tgd deploy --store store_dev --dev
tgd deploy --store store_staging --dev
tgd deploy --store store_prod --prod

Add a Custom Domain

tgd add-domain checkout.mystore.com
# Add the CNAME record shown in the output, then:
tgd verify-domain cdm_abc123

Quick Reference

# Auth
tgd login                          # Login (production)
tgd login --dev                    # Login (development)
tgd logout                         # Logout
tgd whoami                         # Check auth status

# Deploy
tgd deploy                         # Interactive store selection
tgd deploy -s store_123            # Direct deploy
tgd deploy -s store_123 --overwrite # Replace existing

# Manage
tgd list -s store_123              # List deployments
tgd install -s store_123           # Create instance
tgd mount-alias -s store_123       # Mount instance
tgd list-instances -s store_123    # List instances
tgd list-mounts -s store_123       # List mount points

# Domains
tgd list-domains                   # List all domains
tgd add-domain my.domain.com       # Add domain

# Interactive (all-in-one)
tgd interactive                    # Menu-driven interface

What’s Next?

Full CLI Reference

All commands and flags

CLI Configuration

Manifest, config variants, environments

Plugin SDK

Build interactive plugins with React

Hosting & A/B Testing

Host pages and set up A/B tests