Configuration de l'environnement de développement local

VérifiéPrudence

Initialise un environnement de développement local complet avec l'infrastructure devflow. Vérifie les prérequis, configure les services partagés et le projet, et applique les migrations si l'option --full est utilisée. Utile pour démarrer rapidement un projet devflow sans configuration manuelle.

Spar Skills Guide Bot
DeveloppementIntermédiaire
5002/06/2026
Claude CodeCursorWindsurfCopilotCodex
#devflow#environment-setup#infrastructure-setup#local-development#project-bootstrap

Recommandé pour

Notre avis

Configure un environnement de développement local complet pour un projet géré par devflow en vérifiant les prérequis, démarrant l'infrastructure, configurant le projet et vérifiant le tout.

Points forts

  • Automatise plusieurs étapes d'installation, y compris l'infrastructure, les entrées hosts et les migrations.
  • Fournit un aperçu en mode dry-run avant d'appliquer les modifications.
  • Gère les erreurs courantes comme Docker manquant ou conflits de ports.

Limites

  • Nécessite que la CLI devflow soit installée et configurée.
  • Certaines étapes peuvent nécessiter sudo (ex. fichier hosts).
  • Se limite aux projets gérés par devflow.
Quand l'utiliser

Utilisez-le lorsque vous démarrez un nouveau projet géré par devflow ou que vous configurez un projet existant sur un nouvel environnement.

Quand l'éviter

Ne l'utilisez pas pour des projets non devflow ou lorsque vous avez besoin d'une pile d'infrastructure différente.

Analyse de sécurité

Prudence
Score qualité92/100

The skill executes bash commands to set up a local development environment using devflow, including Docker infrastructure, host file modifications, and database migrations. No destructive or malicious commands are present. The use of Docker and sudo for host entries is legitimate but warrants caution due to elevated privileges and container orchestration.

Aucun point d'attention détecté

Exemples

Standard setup
Set up the local development environment for this devflow project.
Full setup with migrations
Set up the local development environment with full infrastructure and database migrations.
Minimal setup
Set up only the project services without shared infrastructure.

name: setup description: Initialize and set up local development environment with devflow infrastructure allowed-tools: Bash, Read, Write disable-model-invocation: true argument-hint: [--full|--minimal]

Local Development Setup

Set up a complete local development environment for a devflow-managed project.

Usage

  • /devflow-setup - Standard setup (infrastructure + project)
  • /devflow-setup --full - Full setup including database migrations
  • /devflow-setup --minimal - Project only, skip shared infrastructure

Prerequisites Check

First, verify the environment:

devflow doctor

If any tools are missing, inform the user what needs to be installed before proceeding.

Setup Steps

Step 1: Verify Configuration

Check that devflow.yml exists in the current directory:

devflow config validate

If missing, ask the user which preset to use (aocodex, aosentry, or custom).

Step 2: Start Shared Infrastructure (unless --minimal)

devflow infra status --json

If infrastructure is not running:

devflow infra up

Step 3: Configure Project for Shared Infrastructure

Check if project is already configured:

devflow infra status --json

If not registered, configure it:

devflow infra configure . --dry-run

Show the user what changes will be made. If they approve:

devflow infra configure .

Step 4: Set Up Hosts Entries

devflow infra hosts list --json

If domains are missing, inform user they need to run with sudo:

sudo devflow infra hosts add

Step 5: Start Project Services

devflow dev start

Step 6: Apply Local Migrations (if --full)

devflow db status --env local --json

If migrations are pending:

devflow db migrate --env local

Step 7: Verify Setup

Run a final status check:

devflow infra status
devflow db status --env local

Output

Provide a summary showing:

  • Infrastructure status (Traefik dashboard URL)
  • Project domains configured
  • Services running
  • Database migration state
  • Any manual steps remaining (like hosts file if sudo wasn't available)

Error Handling

  • If Docker is not running, instruct user to start Docker Desktop or daemon
  • If mkcert CA is not installed, provide installation instructions
  • If ports are in use, identify conflicting processes
  • If compose file has issues, show specific validation errors
Skills similaires