Skip to main content
Version: v1 (Current)

Getting Started

Use @gxp-dev/tools to develop a Vue app on your workstation. The CLI scaffolds source/configuration, runs the local preview and packages an app. It does not create a platform project, grant permissions or publish a Developer Hub release.

For managed workspaces and team planning, use hosted sessions and AI planning. To contribute to the platform's Laravel/Docker codebase, use Local Dev Setup; that is a different environment.

Prerequisites​

  • A Node version compatible with the installed toolkit and its Vite/test dependencies. Node 24 is the reviewed baseline. Vite 8 alone accepts Node 22.12, but the current Faker dependency requires Node 22.13+ on the 22 line and npm 10+; check the complete dependency tree, not only Vite.
  • npm and access to the package registry.
  • A terminal and editor. Native mkcert is optional for HTTPS; an AI CLI and account are optional for agent assistance.

The reviewed toolkit source is version 2.1.40. Source review does not establish which version your registry/install currently provides. Check gxdev --version, the lockfile and the installed package before comparing behavior.

The 2.1.40 source release adds local MCP store guidance for project context, UI flags and response-field safety. Its runtime/CLI source is unchanged from the reviewed 2.1.39 baseline; this does not establish package publication or your installed version. See AI agent guidance.

Installation​

For an initial project, install globally:

npm install -g @gxp-dev/tools
gxdev --version
gxdev --help

For an existing project, add the toolkit locally:

npm install --save-dev @gxp-dev/tools
npx gxdev --help

Project npm scripts use the local binary. A global launcher also normally prefers the project's installed toolkit runtime/templates. --use-global forces its own toolkit resources when diagnosing a version difference; it does not upgrade the local installation.

Create a New Plugin​

1. Initialize Your Project​

From a parent directory, create a named project:

gxdev init my-plugin

With no name and no existing package.json, init asks for a name. Inside an existing package, unnamed init takes the update path instead. A named new-project target must not already exist.

For a predictable setup without an AI request, certificate trust changes or server startup:

gxdev init my-plugin --yes
cd my-plugin

This still runs dependency installation and lockfile verification. If either fails, initialization aborts; inspect the partially created directory before retrying instead of assuming the entire project was removed.

2. Interactive Configuration​

Interactive creation copies the scaffold, installs dependencies, then asks for app name/description, SSL setup and an optional interactive AI agent. If you choose an agent, its session replaces the later Start Development/browser prompts. If you skip the agent, the wizard offers development startup and an optional browser extension.

The wizard's “logged in” provider label comes from availability detection, which can only check that a CLI exists. Authenticate the chosen provider separately and inspect its actual errors. For Codex, use codex login and codex login status, as documented in the official CLI reference.

3. AI-Powered Scaffolding (Optional)​

There are two distinct local paths:

  • Interactive init launches a selected installed AI CLI to clarify, plan and implement with you.
  • --build requests noninteractive scaffolding; --provider chooses claude, codex or gemini. The default is Gemini when omitted.
gxdev init checkin-kiosk --description "Conference check-in" \
--build "A kiosk with a welcome screen and scanner input" --provider codex

This makes a provider request and can write generated files. It does not provide the hosted planner's approval/lifecycle guarantees. Review the diff, bindings and tests before packaging; local assistant credentials/billing are separate from platform team quotas. See AI agent configuration.

4. SSL Setup​

For HTTPS, install the native mkcert tool for your OS, then run:

gxdev setup-ssl

The helper reuses suitable existing .certs/ files or runs native mkcert, including installation of its local certificate authority. It updates certificate paths in an existing .env. Keep certificate keys out of Git. This is optional for the initial HTTP walkthrough.

5. Start Development​

From the scaffolded project:

gxdev dev --no-https=true

Open the URL printed by the server, normally http://localhost:3060 for the generated .env. The plain CLI's port priority is --port, then NODE_PORT, then 3000 without either setting. A generated project normally sets 3060.

Socket.IO starts by default; --no-socket disables it. For schema-generated mock API responses, set API_ENV=mock in the project's .env, keep the socket service enabled and run gxdev dev --no-https=true --with-mock. The flag enables the mock service; it does not change API_ENV or redirect a live API configuration. Stop and restart development after changing .env. Local state, mock responses and live authenticated API behavior are separate evidence.

Current HTTP flag

The plain parser turns bare --no-https into https=false, while its dev handler reads no-https. Use the explicit --no-https=true form to force HTTP, particularly when certificates exist. The generated dev-http script still contains the bare form. With no certificates, the server independently falls back to HTTP.

Stop the foreground server with Ctrl+C. Use the logged service result to diagnose startup; a URL banner alone is not a successful page/module load.

6. Browser Extension (Optional)​

Use gxdev dev --chrome or --firefox when you want an installed browser launched with the toolkit extension. Browsers/extensions are optional and separate from the embedded development inspectors. See browser extensions.

Project Structure​

Important scaffold files include:

PathPurpose
src/Plugin.vueApp entry component
src/DemoPage.vue, src/DemoExperience.vueExample page/experience flows
src/stores/index.jsExposes the runtime store
src/public/Default package asset source
theme-layouts/Local development layouts
app-manifest.jsonApp identity, declarations and package inputs
configuration.json, app-instructions.md, default-styling.cssOptional package content
vite.extend.jsExtend the managed Vite configuration
vitest.config.js, eslint.config.js, .prettierrcTest and code-quality setup
.githooks/pre-commitFormatting, JS lint and manifest/config checks
.env.example, .envExample/local development configuration
AGENTS.md, CLAUDE.md, GEMINI.md, agent/MCP JSON filesLocal assistant instructions/configuration

The runtime normally supplies main.js, index.html and Vite configuration from the package. They need not appear in a new project. Use vite.extend.js for Vite changes rather than assuming a root vite.config.js takes over.

Your First Edit​

Replace src/Plugin.vue with a small interactive component and save:

<script setup>
import { ref } from 'vue'
const count = ref(0)
</script>

<template>
<main>
<h1>My first GxP app</h1>
<button type="button" @click="count++">Clicked {{ count }} times</button>
</main>
</template>

Confirm HMR updates the page and the button increments. For platform-configurable text/assets/API data, follow the manifest, strings and store guides. Their declared bindings require separate installed-project validation.

Using the Interactive TUI​

Bare gxdev displays help. Open the terminal UI explicitly:

gxdev ui
# Or start development inside it:
gxdev dev --ui

The TUI requires an interactive terminal and its compiled bundle. The dispatcher auto-starts selected long-running commands; adding --ui to init/build does not run those commands automatically. See Interactive TUI for its controls.

Verify and Build​

npm run lint
npm run lint:js
npm test
npm run build

Configuration lint and JavaScript lint are separate. Tests default to allowing an empty suite; inspect the test count instead of treating a zero exit code as executed tests. Build packages source and does not automatically run tests.

Confirm dist/{app-name}.gxpapp exists. For a platform release, review/commit source, build the correct production branch in the hub, publish and test the exact installed release. See Git and builds and variants/releases.

Update an Existing Project​

Commit or back up existing source before updating. First install the toolkit version whose templates you intend to apply. For example, to select the registry's current version in the project:

npm install --save-dev @gxp-dev/tools@latest
npx gxdev --version
npx gxdev init
npm install

Use an explicit package version instead of @latest when your team pins upgrades. A globally installed version can supply the templates with gxdev init --use-global, but upgrade/check that global installation first. Updating dependency ranges after init does not retroactively change which templates init used.

Unnamed existing-project init adjusts required dependency ranges, adds missing scripts/config files and updates the base-framework declaration. It preserves existing scripts/files rather than automatically repairing every old command. This path does not itself install dependencies; inspect the diff and lockfile, then run installation/tests afterward.

--local initializes in the current directory. --local --yes enables overwrite, including existing package/scaffold files; it is not a safe unattended update recipe for customized projects.

Next Steps​