-
Notifications
You must be signed in to change notification settings - Fork 0
drupal init
Initialize a Drupal project in /workspace/drupal. Supports three entry points: new project via Composer, existing project via Git clone, or a partially existing folder.
/drupal-init
No parameters required — the skill walks you through each step interactively.
Checks whether /workspace/drupal already exists and whether it looks like a Drupal project (has composer.json referencing drupal/core).
Possible states:
- Empty / not found — proceeds directly to project type selection
- Partial — warns the user and asks whether to overwrite
- Full project found — asks for explicit confirmation before touching anything
| Option | Description |
|---|---|
| New Composer project | Runs composer create-project drupal/recommended-project
|
| Clone from Git | Clones a repository URL and runs composer install
|
composer create-project drupal/recommended-project /workspace/drupal --no-interaction
cd /workspace/drupal
composer require drush/drush
composer require drupal/admin_toolbar drupal/develAlso creates a minimal web/sites/default/settings.php with database credentials pointing to the Docker stack.
git clone <URL> /workspace/drupal
cd /workspace/drupal
composer installAsks whether you have an SQL dump to import. Accepts .sql or .sql.gz. Requires the Docker stack to be running — warns if it isn't and offers to continue without import.
Asks whether you have a files/ archive (.zip or .tar.gz) to import into web/sites/default/files/. Extracts and sets correct permissions.
Creates the Docker compose configuration in /workspace/.piclaw/stack if it doesn't exist yet.
Checks whether the stack is already running and shows the Drupal URL (http://localhost:8085), or guides you to run /drupal-serve to start it.
- Always uses
/workspace/drupalas the project root — never/workspacedirectly. - If the stack is not running during DB import, the import is skipped with a warning. Run
/drupal-servefirst, then/drupal-db-importmanually.
- drupal-serve — start the Docker stack
- drupal-db-import — import a database dump
- drupal-status — verify the project is healthy