enonic-sandbox-manager
Original:🇺🇸 English
Translated
2 scripts
Guides developers through Enonic CLI commands for sandbox management, project scaffolding, local development, app deployment, and CI/CD pipeline generation. Use when creating Enonic XP sandboxes, starting or stopping local instances, scaffolding projects from starters, running dev mode with hot-reload, deploying apps, or generating CI/CD workflows for Enonic apps. Don't use for writing XP application code (controllers, content types), querying via Guillotine or lib-content APIs, configuring non-Enonic environments, or Docker/Kubernetes deployment of XP.
17installs
Added on
NPX Install
npx skill4agent add webmaxru/enonic-agent-skills enonic-sandbox-managerTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →Enonic CLI & Local Dev Environment Helper
Procedures
Step 1: Detect Workspace Context
- Execute from the skill root to scan the current workspace for Enonic project markers (
node scripts/find-enonic-targets.mjs,.enonicwithbuild.gradleplugin,com.enonic.xpwithgradle.properties).xpVersion - 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 for installation instructions and guide through the appropriate method for the detected OS:
references/cli-reference.md- 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 for the full sandbox command catalog.
references/cli-reference.md - 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 flag for non-interactive execution when the version and name are known.
-f - If the request mentions templates, list available templates or use flag. Use
-t <template>to create a bare sandbox with no pre-installed apps.--skip-template
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, andstarter-headless. Readstarter-nextjsfor the full list of options.references/cli-reference.md - To link an existing project to a different sandbox:
enonic project sandbox <name> - Ensure the project folder contains and
build.gradleconfiguration after creation..enonic
Step 5: Development Workflow
- Determine the appropriate development command:
- Dev mode (hot-reload): — starts the sandbox in detached mode and runs the app with file watching. Execute from the project root.
enonic dev - Build only:
enonic project build - Deploy to sandbox: — use
enonic project deploy [sandbox-name] [-c]for continuous deployment.-c - 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 . The CLI will attempt to stop the detached sandbox automatically.
Ctrl-C
Step 6: App Management on Running XP
- For managing applications on a running XP instance, read for the XP app commands.
references/cli-reference.md - 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 (XP 7.15+) or set
--cred-file <path>andENONIC_CLI_REMOTE_USERenvironment variables.ENONIC_CLI_REMOTE_PASS
Step 7: CI/CD Pipeline Generation
- Read for the GitHub Actions workflow template.
assets/enonic-ci.template.yml - 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 in the project repository.
.github/workflows/enonic-ci.yml
Step 8: Troubleshooting
- If a sandbox fails to start or a deployment fails, read for common issues and resolutions.
references/troubleshooting.md - Key diagnostic commands:
- — check sandbox status and XP version.
enonic sandbox ls - — check running XP instance details.
enonic system info - Check port (HTTP) and
8080(debug) availability.5005
- Read for CLI-to-XP version compatibility if version mismatch errors occur.
references/compatibility.md
Error Handling
- If returns no results, proceed with greenfield setup instructions rather than failing.
scripts/find-enonic-targets.mjs - If fails, guide through CLI installation per Step 2 before proceeding.
enonic --version - If sandbox creation fails with a version error, read and suggest a compatible XP version.
references/compatibility.md - If port conflicts occur during sandbox start, read for resolution steps.
references/troubleshooting.md - If fails, verify the project has a Gradle
enonic devtask (present in all official starters) and that the linked sandbox exists and is not already running in another terminal.dev