Skip to main content
Version: v1 (Current)

CLI Reference

Complete reference for the gxdev command-line interface.

Installation

# Global installation (recommended)
pnpm install -g @gxp-dev/tools

# Project-level installation
pnpm install --save-dev @gxp-dev/tools

Quick Reference

CommandDescription
gxdevLaunch interactive TUI
gxdev init [name]Create or update a project
gxdev devStart development server
gxdev buildBuild for production
gxdev datastore <action>Manage store data
gxdev socket <action>Socket event simulation
gxdev assets <action>Asset management
gxdev ext:chromeLaunch Chrome with extension
gxdev ext:firefoxLaunch Firefox with extension
gxdev ext:buildBuild extensions for distribution
gxdev ext:install <browser>Permanent extension install guide
gxdev setup-sslGenerate SSL certificates
gxdev publish <file>Copy runtime files to project
gxdev add-dependencyAdd API dependency via wizard
gxdev extract-configExtract GxP config from source

gxdev init

Initialize a new GxP project with an interactive configuration wizard.

gxdev init [name] [options]

Arguments

ArgumentDescription
nameProject name (optional - will prompt if not provided)

Options

OptionAliasDescription
--description-dProject description (skips interactive prompt)
--build-bAI build prompt for auto-scaffolding (skips interactive mode)
--provider-pAI provider: claude, codex, or gemini (default: gemini)

Interactive Flow

After providing a project name, the init command runs an interactive configuration wizard:

Step 1: App Name

──────────────────────────────────────────────────
📝 Configure Your Plugin
──────────────────────────────────────────────────

? App name
❯ my-plugin - From package.json
Enter custom name

Use arrow keys to:

  • Select the prepopulated name (from package.json)
  • Or select "Enter custom name" and type a new value

Step 2: Description

? Description
A GxP kiosk plugin - From package.json
Enter custom description

Step 3: AI Scaffolding

──────────────────────────────────────────────────
🤖 AI-Powered Scaffolding
──────────────────────────────────────────────────
Describe what you want to build and AI will generate
starter components, views, and manifest configuration.

? Choose AI provider for scaffolding
Skip AI scaffolding
Claude - logged in
Codex - logged in
Gemini - via API key

The wizard auto-detects available AI providers. If you select one:

📝 Describe your plugin (what it does, key features, UI elements):
(Press Enter twice when done)

> A check-in kiosk for conference attendees
> Should have a welcome screen, badge scanner input
> Success/error confirmation screens
>

Step 4: SSL Configuration

──────────────────────────────────────────────────
🔒 SSL Configuration
──────────────────────────────────────────────────

? Set up SSL certificates for HTTPS development?
Yes, set up SSL - Recommended for full feature access
Skip SSL setup - Can be set up later with pnpm run setup-ssl

Step 5: Start Development

──────────────────────────────────────────────────
🚀 Start Development
──────────────────────────────────────────────────

? How would you like to start the development server?
Start app - HTTPS dev server
Start app with Mock API - Dev server + Socket.IO + Mock API
Skip

Step 6: Browser Extension (if starting app)

? Launch browser with GxP extension?
Chrome - Launch Chrome with DevTools panel
Firefox - Launch Firefox with DevTools panel
Skip

AI Scaffolding

When you provide a build description, the AI will generate:

  • Vue component files in src/
  • Updates to app-manifest.json with strings and assets
  • A brief explanation of what was created

Supported AI Providers

ProviderAuthenticationSetup
ClaudeCLI loginpnpm i -g @anthropic-ai/claude-code && claude login
CodexCLI loginpnpm i -g @openai/codex && codex auth
GeminiCLI loginpnpm i -g @google/gemini-cli && gemini
GeminiAPI keyexport GEMINI_API_KEY=your_key
Geminigcloudgcloud auth login

The init wizard auto-detects which providers are available and shows only those options. You can also specify a provider directly:

# Use Claude
gxdev init my-plugin -b "Build description" -p claude

# Use Codex
gxdev init my-plugin -b "Build description" -p codex

# Use Gemini (default)
gxdev init my-plugin -b "Build description" -p gemini

Behavior

New Project:

  1. Prompts for project name (if not provided)
  2. Creates project directory
  3. Generates package.json with required dependencies
  4. Copies template files (Plugin.vue, layouts, manifest, etc.)
  5. Runs pnpm install
  6. Enters interactive configuration wizard:
    • App name (prepopulated from package.json)
    • Description (prepopulated from package.json)
    • AI scaffolding (optional)
    • SSL setup (optional)
    • Start development (optional)
    • Browser extension (optional)

Existing Project (has package.json):

  1. Updates dependencies to latest versions
  2. Copies any missing template files (won't overwrite existing)
  3. Updates package scripts

Non-Interactive Mode (with --build flag): Skips the interactive wizard and directly runs AI scaffolding

Files Created

my-plugin/
├── src/
│ ├── Plugin.vue # Your main plugin entry point
│ ├── DemoPage.vue # Example component
│ ├── assets/ # User assets directory
│ └── stores/
│ └── index.js # Pinia store setup
├── theme-layouts/
│ ├── PublicLayout.vue # Public-facing layout
│ ├── PrivateLayout.vue # Authenticated layout
│ ├── SystemLayout.vue # Admin layout
│ └── AdditionalStyling.css
├── .claude/
│ ├── agents/
│ │ └── gxp-developer.md # Claude Code subagent
│ └── settings.json # MCP server configuration
├── socket-events/ # Socket event templates
├── scripts/
│ └── launch-chrome.js # Chrome launcher
├── app-manifest.json # Plugin configuration
├── configuration.json # Additional configuration
├── app-instructions.md # Plugin instructions
├── default-styling.css # Default CSS styles
├── AGENTS.md # Codex/AI agent instructions
├── GEMINI.md # Gemini Code Assist instructions
├── .env # Environment variables
├── .env.example # Environment template
├── .gitignore
└── README.md

Examples

# Create new project interactively (recommended)
gxdev init

# Create new project with name
gxdev init my-awesome-plugin

# Create with name and description
gxdev init my-plugin -d "Event check-in kiosk for conferences"

# Create with AI scaffolding (non-interactive)
gxdev init checkin-kiosk -d "Conference check-in" -b "A kiosk with welcome screen, badge scanner, and confirmation"

# Update existing project
cd existing-project
gxdev init

gxdev dev

Start the development server with hot reload.

gxdev dev [options]

Options

OptionAliasDefaultDescription
--port3060Development server port
--no-httpsfalseDisable HTTPS, use HTTP
--with-socket-sfalseStart Socket.IO server
--with-mock-mfalseEnable Mock API server (requires socket)
--chromefalseLaunch Chrome with extension
--firefoxfalseLaunch Firefox with extension
--component-path./src/Plugin.vuePath to main component
--node-log-levelinfoNode log level

Examples

# Start with HTTPS (default)
gxdev dev

# Start without HTTPS (simpler setup)
gxdev dev --no-https

# Start with Socket.IO server
gxdev dev --with-socket

# Start with Mock API server
gxdev dev --with-socket --with-mock

# Start and launch Chrome with extension
gxdev dev --chrome

# Start and launch Firefox with extension
gxdev dev --firefox

# Combine options
gxdev dev --no-https --with-socket --chrome

Package Scripts

After gxdev init, these scripts are available:

pnpm run dev          # gxdev dev --with-socket
pnpm run dev-app # gxdev dev
pnpm run dev-http # gxdev dev --no-https

gxdev build

Build the plugin for production deployment.

gxdev build [options]

Options

OptionDefaultDescription
--component-path./src/Plugin.vuePath to main component
--node-log-levelerrorNode log level

Build Output

The build process creates:

dist/
├── build/
│ ├── plugin.es.js # Main plugin bundle (ES module)
│ ├── plugin.es.css # Extracted styles
│ ├── app-manifest.json # Cleaned manifest
│ ├── assets/ # Copied from src/assets/
│ ├── appInstructions.md # Optional instructions
│ ├── default-styling.css # Optional styling
│ └── configuration.json # Optional config
└── my-plugin.gxpapp # Packaged plugin (ZIP)

Build Process

  1. Vite Build - Compiles Vue SFCs, bundles dependencies, extracts CSS
  2. Asset Copy - Copies assets from src/assets/ to dist/build/assets/
  3. Manifest Processing - Cleans and copies app-manifest.json
  4. Optional Files - Processes appInstructions, defaultStyling, configuration
  5. Package Creation - Creates .gxpapp ZIP file with all build artifacts

Package Contents (.gxpapp)

The .gxpapp file is a ZIP archive containing:

  • plugin.es.js - Main plugin code
  • plugin.es.css - Plugin styles
  • app-manifest.json - Plugin configuration
  • assets/ - Static assets
  • appInstructions.md (optional)
  • default-styling.css (optional)
  • configuration.json (optional)

Examples

# Standard build
gxdev build

# Build with custom component path
gxdev build --component-path ./src/CustomPlugin.vue

gxdev datastore

Manage GxP datastore test data and configuration.

gxdev datastore <action> [options]

Actions

ActionDescription
listList all store variables
addAdd a new variable
scan-stringsScan components for hardcoded strings
configSwitch between test configurations
initAdd datastore to existing project

datastore list

Display all variables in the store:

gxdev datastore list

Output shows:

  • 🔧 Plugin Variables (pluginVars)
  • 📝 Strings (stringsList)
  • 🖼️ Assets (assetList)
  • 🔗 Dependencies (dependencyList)

datastore add

Add a new variable to the store:

# Interactive mode
gxdev datastore add

# Direct mode
gxdev datastore add --type string --key welcome_title --value "Hello World"
gxdev datastore add --type setting --key max_items --value 10
gxdev datastore add --type asset --key logo --value "/dev-assets/images/logo.png"

Options:

OptionDescription
--typeVariable type: string, setting, or asset
--keyVariable key/name
--valueVariable value

datastore scan-strings

Scan Vue components for hardcoded strings that should be extracted:

# Scan a specific component
gxdev datastore scan-strings --component src/Plugin.vue

# Interactive mode
gxdev datastore scan-strings

The scanner:

  1. Parses the <template> section
  2. Finds text content within HTML elements
  3. Suggests key names based on the text
  4. Prompts to add each string to the store

datastore config

Switch between named test data configurations:

# List available configurations
gxdev datastore config

# Switch to a specific configuration
gxdev datastore config --config production

Create configurations by copying test-data.json:

cp src/stores/test-data.json src/stores/test-data-production.json

datastore init

Add GxP datastore to an existing Vue project:

gxdev datastore init

This will:

  1. Add Pinia and Axios dependencies
  2. Create store files in src/stores/
  3. Add datastore scripts to package.json
  4. Update main.js to include Pinia

gxdev socket

Simulate Socket.IO events for development testing.

gxdev socket <action> [options]

Actions

ActionDescription
listList available socket events
sendSend a socket event

socket list

Display all available socket event templates:

gxdev socket list

Shows for each event:

  • Event name
  • Channel
  • Data ID (if applicable)

socket send

Send a socket event to the running Socket.IO server:

gxdev socket send --event <EventName> [--identifier <id>]

Options:

OptionDescription
--eventEvent name (matches JSON file in socket-events/)
--identifierOverride the channel identifier

Examples:

# Send an event
gxdev socket send --event AiSessionMessageCreated

# Send with custom identifier
gxdev socket send --event SocialStreamPostCreated --identifier my_stream_id

Socket Event Files

Events are defined in JSON files in the socket-events/ directory:

{
"event": "EventName",
"channel": "private.Model.identifier",
"data": {
"id": 123,
"message": "Event payload"
}
}

gxdev assets

Manage development assets and placeholder image generation.

gxdev assets <action> [options]

Actions

ActionDescription
listList development assets
generateGenerate placeholder images
initInitialize asset directories

assets list

Display all files in dev-assets/:

gxdev assets list

Shows file name, size, and development URL for each asset.

assets generate

Generate placeholder images using ImageMagick:

gxdev assets generate [options]

Options:

OptionDefaultDescription
--size400x300Image dimensions (WxH)
--nameplaceholderBase filename
--formatpngImage format: png, jpg, jpeg, gif
--colorrandomBackground color (hex)
--textautoText overlay
--count1Number of variants to generate

Examples:

# Generate a single placeholder
gxdev assets generate

# Generate with specific size and name
gxdev assets generate --size 800x600 --name hero

# Generate multiple variants
gxdev assets generate --name banner --count 5

# Generate with specific color
gxdev assets generate --color "#FF6B6B" --name error-bg

Note: Requires ImageMagick to be installed on your system.

assets init

Set up the development assets directory structure:

gxdev assets init

Creates:

dev-assets/
├── images/ # Image placeholders
└── videos/ # Video placeholders

Also copies any starter assets from the toolkit and adds dev-assets/ to .gitignore.


gxdev ext:chrome

Launch Google Chrome with the GxP Inspector extension loaded.

gxdev ext:chrome

Behavior

  1. Looks for extension in browser-extensions/chrome/ (project or toolkit)
  2. Launches Chrome with the extension auto-loaded
  3. Opens to the development server URL

Requirements

  • Google Chrome installed
  • Extension directory exists

gxdev ext:firefox

Launch Firefox with the GxP Inspector extension loaded.

gxdev ext:firefox

Behavior

  1. Looks for extension in browser-extensions/firefox/ (project or toolkit)
  2. Uses web-ext to launch Firefox with temporary extension
  3. Opens to the development server URL

Requirements

  • Firefox installed
  • web-ext npm package (installed automatically)

gxdev ext:build

Build browser extensions for distribution.

gxdev ext:build

Output

dist/
├── firefox/ # Firefox extension package (.xpi)
└── chrome/ # Chrome extension package (.crx)

What It Does

  1. Firefox - Uses web-ext build to create signed extension package
  2. Chrome - Uses packaging script to create Chrome extension

gxdev ext:install

Get instructions for permanently installing extensions in your browser.

gxdev ext:install <browser>

Arguments

ArgumentDescription
browserBrowser to install: chrome or firefox

Chrome Installation

gxdev ext:install chrome

Instructions provided:

  1. Navigate to chrome://extensions/
  2. Enable "Developer mode"
  3. Click "Load unpacked"
  4. Select the extension directory

Firefox Installation

gxdev ext:install firefox

Two options provided:

  1. Temporary Add-on - Easy but removed on restart
  2. Persistent Installation - Requires Firefox Developer Edition

gxdev setup-ssl

Generate SSL certificates for HTTPS development using mkcert.

gxdev setup-ssl

What It Does

  1. Checks for mkcert installation
  2. Installs local CA if needed
  3. Generates certificates for localhost
  4. Updates .env with certificate paths

Requirements

Certificate Location

Certificates are generated in the project root:

  • localhost.pem - Certificate
  • localhost-key.pem - Private key

gxdev publish

Copy runtime files from the toolkit to your project for customization.

gxdev publish <file>

Available Files

FileDestinationDescription
server.js./server.jsSocket.IO server
gxpPortalConfigStore.js./src/stores/GxP Pinia store
main.js./main.jsDevelopment entry point
vite.config.js./vite.config.jsVite configuration
index.html./index.htmlDevelopment HTML

When to Use

Use publish when you need to customize files that normally come from the toolkit's runtime/ directory. Once published, the local copy takes precedence.

Examples

# Customize the Socket.IO server
gxdev publish server.js

# Customize the Pinia store
gxdev publish gxpPortalConfigStore.js

# Customize Vite configuration
gxdev publish vite.config.js

Environment Variables

Key environment variables recognized by gxdev:

VariableDefaultDescription
NODE_PORT3060Development server port
SOCKET_IO_PORT3069Socket.IO server port
USE_HTTPStrueEnable HTTPS
CERT_PATHSSL certificate path
KEY_PATHSSL private key path
COMPONENT_PATH./src/Plugin.vueMain component path
SOCKET_IO_ENABLEDfalseAuto-start Socket.IO
VITE_API_ENVmockAPI environment: mock, local, develop, staging, production
VITE_API_KEYAPI authentication key
VITE_API_PROJECT_IDProject ID for API calls

API Environments

EnvironmentAPI Base URL
mockhttps://localhost:3060/mock-api
localhttps://dashboard.eventfinity.test
develophttps://api.zenith-develop.env.eventfinity.app
staginghttps://api.efz-staging.env.eventfinity.app
productionhttps://api.gramercy.cloud

Global Configuration

Create a .gxdevrc.json file in your home directory for global defaults:

{
"defaultPort": 3060,
"preferHttps": true,
"autoStartSocket": false
}

Project-level .gxdevrc.json overrides global settings.


gxdev add-dependency

Interactive wizard for adding API dependencies to your app-manifest.json.

gxdev add-dependency [options]

Options

OptionAliasDefaultDescription
--env-edevelopAPI environment: develop or local

What It Does

The wizard:

  1. Loads OpenAPI and AsyncAPI specifications from the selected environment
  2. Groups API endpoints by tags/models
  3. Displays a type-ahead selection for choosing a model
  4. Shows available endpoints with multi-select
  5. Shows available socket events with multi-select
  6. Prompts for a dependency identifier
  7. Generates and saves the dependency configuration

Interactive Flow

╔════════════════════════════════════════════╗
Add API Dependency Wizard
╚════════════════════════════════════════════╝

Environment: develop
Loading API specifications...

Loaded OpenAPI spec (156 paths)
Loaded AsyncAPI spec (23 events)

Select a model/tag (type to filter):
AccessPoint (5 paths, 2 events)
Attendee (12 paths, 4 events)
Badge (8 paths, 1 event)
...

Select API endpoints:
[x] GET /v1/projects/.../access-points
[x] GET /v1/projects/.../access-points/{access_point}
[ ] POST /v1/projects/.../access-points
[ ] PUT /v1/projects/.../access-points/{access_point}
...

Select socket events:
[x] AccessPointUpdated
[x] AccessPointDeleted

Enter dependency identifier: access_points

─────────────────────────────────────────────
Generated Dependency Configuration:
─────────────────────────────────────────────
{
"identifier": "access_points",
"model": "AccessPoint",
"permissionKey": "access_point",
"permissions": ["view_access_points"],
"operations": {
"access-points.index": "get:/v1/projects/{teamSlug}/{projectSlug}/access-points",
"access-points.show": "get:/v1/projects/{teamSlug}/{projectSlug}/access-points/{access_point}"
},
"events": {
"AccessPointUpdated": "AccessPointUpdated",
"AccessPointDeleted": "AccessPointDeleted"
}
}

Added dependency to app-manifest.json

Generated Dependency Structure

FieldDescription
identifierUnique ID used when calling store.callApi()
modelThe API model/resource name
permissionKeyPermission key for access control
permissionsRequired permissions extracted from API spec
operationsMap of operationId → method:path
eventsMap of socket events for this resource

Using the Dependency

Once added, call any operation using gxpStore.callApi():

const store = useGxpStore();

// Use the operationId and identifier
const items = await store.callApi('access-points.index', 'access_points');

const item = await store.callApi('access-points.show', 'access_points', {
access_point: 123
});

Examples

# Use default environment (develop)
gxdev add-dependency

# Use local API
gxdev add-dependency --env local
gxdev add-dependency -e local

TUI Usage

The command is also available in the interactive TUI:

/add-dependency
/add-dependency --env local

Note: Running from TUI will exit and launch the wizard in a separate terminal session (required for interactive prompts).


gxdev extract-config

Scan source files and extract GxP configuration to app-manifest.json.

gxdev extract-config [options]

Options

OptionAliasDescription
--dry-run-dPreview changes without modifying files
--overwrite-oOverwrite existing values in manifest

What It Extracts

  • gxp-string attributes → strings section
  • gxp-src attributes → assets section
  • gxp-settings attributes → settings section
  • gxp-state attributes → triggerState section
  • store.getString() calls → strings section
  • store.getAsset() calls → assets section

Examples

# Preview what would be extracted
gxdev extract-config --dry-run

# Extract and merge with existing manifest
gxdev extract-config

# Extract and overwrite existing values
gxdev extract-config --overwrite

TUI Usage

/extract-config
/extract-config --dry-run
/extract-config --overwrite