enonic-sandbox-manager
Enonic CLI & Local Dev Environment Helper
Procedures
Step 1: Detect Workspace Context
- Execute
node scripts/find-enonic-targets.mjsfrom the skill root to scan the current workspace for Enonic project markers (.enonic,build.gradlewithcom.enonic.xpplugin,gradle.propertieswithxpVersion). - If markers are found, note the project name, linked sandbox, and XP version from the output. Use these values as defaults for subsequent commands.
- If no markers are found, treat the request as a greenfield setup and proceed to sandbox creation or project scaffolding as appropriate.
Step 2: Ensure CLI is Available
- Verify the Enonic CLI is installed by running
enonic --version. - If the command fails, read
references/cli-reference.mdfor installation instructions and guide through the appropriate method for the detected OS:- npm (any OS):
npm install -g @enonic/cli - macOS:
brew tap enonic/cli && brew install --no-quarantine enonic - Linux:
wget -qO- https://repo.enonic.com/public/com/enonic/cli/installer/cli-linux/1.0.0/cli-linux-1.0.0.sh | sh - Windows:
scoop bucket add enonic https://github.com/enonic/cli-scoop.git && scoop install enonic
- npm (any OS):
- After installation, verify with
enonic --version.
Step 3: Sandbox Management
- Read
references/cli-reference.mdfor the full sandbox command catalog. - Match the request to the correct operation:
- Create:
enonic sandbox create <name> [-v <version>] [-t <template>] [--skip-template] [-f] - List:
enonic sandbox ls - Start:
enonic sandbox start <name> [--detach] [--prod] [--debug] - Stop:
enonic sandbox stop - Upgrade:
enonic sandbox upgrade <name> -v <version> - Delete:
enonic sandbox delete <name> -f - Copy:
enonic sandbox copy <source> <target>
- Create:
- When creating a sandbox, prompt for the XP version if not specified. Use
-fflag for non-interactive execution when the version and name are known. - If the request mentions templates, list available templates or use
-t <template>flag. Use--skip-templateto create a bare sandbox with no pre-installed apps.
Step 4: Project Scaffolding
- For new project creation, use the simplified command:
enonic create <name> [-r <starter>] [-s <sandbox>] [-f] - Common starters include
starter-vanilla,starter-headless, andstarter-nextjs. Readreferences/cli-reference.mdfor the full list of options. - To link an existing project to a different sandbox:
enonic project sandbox <name> - Ensure the project folder contains
build.gradleand.enonicconfiguration after creation.
Step 5: Development Workflow
- Determine the appropriate development command:
- Dev mode (hot-reload):
enonic dev— starts the sandbox in detached mode and runs the app with file watching. Execute from the project root. - Build only:
enonic project build - Deploy to sandbox:
enonic project deploy [sandbox-name] [-c]— use-cfor continuous deployment. - Install to running XP:
enonic project install - Run tests:
enonic project test - Clean build artifacts:
enonic project clean - Arbitrary Gradle task:
enonic project gradle <tasks>
- Dev mode (hot-reload):
- If the sandbox is not running, start it first:
enonic sandbox start <name> -d - To terminate dev mode, use
Ctrl-C. The CLI will attempt to stop the detached sandbox automatically.
Step 6: App Management on Running XP
- For managing applications on a running XP instance, read
references/cli-reference.mdfor the XP app commands. - Match the operation:
- Install from URL:
enonic app install --url <jar-url> - Install from file:
enonic app install --file <path-to-jar> - Start app:
enonic app start <app-key> - Stop app:
enonic app stop <app-key>
- Install from URL:
- Authentication is required for XP commands. Use
--cred-file <path>(XP 7.15+),--client-key <path>+--client-cert <path>for mTLS (XP 7.15+), or setENONIC_CLI_REMOTE_USERandENONIC_CLI_REMOTE_PASSenvironment variables.
Step 7: CI/CD Pipeline Generation
- Read
assets/enonic-ci.template.ymlfor the GitHub Actions workflow template. - Customize the template based on the project:
- Set the correct XP version in the sandbox creation step.
- Set the app name and Gradle build parameters.
- Configure deployment targets (sandbox for staging, cloud for production).
- Place the generated workflow file at
.github/workflows/enonic-ci.ymlin the project repository.
Step 8: Troubleshooting
- If a sandbox fails to start or a deployment fails, read
references/troubleshooting.mdfor common issues and resolutions. - Key diagnostic commands:
enonic sandbox ls— check sandbox status and XP version.enonic system info— check running XP instance details.- Check port
8080(HTTP) and5005(debug) availability.
- Read
references/compatibility.mdfor CLI-to-XP version compatibility if version mismatch errors occur.
Error Handling
- If
scripts/find-enonic-targets.mjsreturns no results, proceed with greenfield setup instructions rather than failing. - If
enonic --versionfails, guide through CLI installation per Step 2 before proceeding. - If sandbox creation fails with a version error, read
references/compatibility.mdand suggest a compatible XP version. - If port conflicts occur during sandbox start, read
references/troubleshooting.mdfor resolution steps. - If
enonic devfails, verify the project has a Gradledevtask (present in all official starters) and that the linked sandbox exists and is not already running in another terminal.
More from webmaxru/enonic-agent-skills
enonic-webhook-integrator
Sets up Enonic XP event listeners, webhook configurations, and external system integrations triggered by content lifecycle events. Covers lib-event listener registration, node event filtering, outbound webhook configuration via com.enonic.xp.webhooks.cfg, custom HTTP service controllers for inbound webhooks, task-based async processing with lib-task, and outbound HTTP calls with lib-httpClient. Use when listening for content publish/create/update/delete events, configuring outbound webhooks, building HTTP service endpoints for inbound webhooks, or triggering async processing on content changes. Do not use for content querying, frontend component development, non-Enonic event systems, or GitHub webhook configuration.
91skill-creator
Authors and structures professional-grade agent skills following the agentskills.io spec. Use when creating new skill directories, drafting procedural instructions, or optimizing metadata for discoverability. Don't use for general documentation, non-agentic library code, or README files.
89enonic-api-reference
Enonic XP server-side JavaScript/TypeScript API reference for all /lib/xp/* libraries. Provides function signatures, parameters, return types, and usage examples for lib-content, lib-node, lib-auth, lib-portal, lib-context, lib-event, lib-task, lib-repo, lib-io, lib-mail, and lib-schema. Use when looking up Enonic XP library functions, parameter shapes, return types, or usage examples. Do not use for Guillotine GraphQL queries, content type schema definitions, Enonic CLI commands, or non-Enonic JavaScript APIs.
89agent-skill-deploy
>
89enonic-content-migration
Generates Enonic XP scripts for bulk content operations — creating, updating, querying, migrating, and transforming content using lib-content and lib-node APIs. Covers the query DSL (NoQL), aggregations, batch processing, task controllers for long-running operations, and export/import workflows. Use when writing bulk content creation, update, or deletion scripts, querying with NoQL syntax, migrating content between environments, running long-running task operations, or working with aggregations and paginated retrieval. Do not use for Guillotine GraphQL frontend queries, content type schema definitions, single contentLib.get() calls, or non-Enonic data migration tools.
89enonic-guillotine-query-builder
Composes, debugs, and optimizes Guillotine GraphQL queries for Enonic XP headless content delivery. Covers query construction, variable usage, filtering, aggregation, pagination, sorting, and TypeScript type generation from the auto-generated Guillotine schema. Use when writing or troubleshooting Guillotine queries, querying custom content types through GraphQL, or generating typed interfaces from Guillotine responses. Don't use for content type XML definitions, non-Enonic GraphQL APIs (Apollo, Hasura), server-side lib-content queries, or Guillotine deployment and CORS configuration.
89