Usage Guide

This comprehensive guide explains how to use the PrestaShop Enterprise Developer Tools effectively. Whether you’re setting up your first project or managing multiple environments, this guide will help you master the CLI workflow.

Overview

The PrestaShop Enterprise Developer Tools CLI provides two main ways to work:

  1. Automated Workflow: Run ps-enterprise without arguments for a complete setup
  2. Individual Commands: Execute specific commands for targeted operations

Getting Started

Basic Usage

From your project directory, simply run:

ps-enterprise

This single command will intelligently execute all necessary steps to get your local environment running.

What Happens Automatically

When you run ps-enterprise without arguments, the tool follows this intelligent workflow:

graph LR A[ps-enterprise] --> B{Auth configured?} B -->|No| C[Run auth] B -->|Yes| D{Config complete?} C --> D D -->|No| E[Run config] D -->|Yes| H{Database dump exists?} E --> H H -->|No| I[Run remote-dump] H -->|Yes| F{Shop files exist?} I --> F F -->|No| G[Run clone] F -->|Yes| J[Run patch] G --> J J --> K[Stop environment] K --> L[Start environment] L --> M[Show logs]

Execution Logic

The automated workflow is designed to be efficient and non-destructive:

Step When It Runs Purpose
auth Only if authentication is missing or invalid Authenticate with PrestaShop Enterprise Platform
config Only if configuration is incomplete Set up project and environment settings
remote-dump Only if database dump is missing Create local database backup from remote
clone Only if no shop files exist locally Download shop files from remote environment
patch Always (if previous steps completed) Apply local environment configurations
stop Always Cleanly stop any running containers
start Always Start the local development environment
log Always (final step) Display real-time environment logs

While the automated ps-enterprise command is powerful, you can also execute each step as a separate command. This gives you granular control over your environment.

For a complete list of all available commands and their options, please refer to the Commands Reference page.

Common Workflows

Daily Development Workflow

# Start your day
cd /path/to/your/project
ps-enterprise start

# Make your changes...
# Edit files, develop features, etc.

# End your day
ps-enterprise stop

Setting Up New Project

# Create project directory
mkdir my-prestashop-project
cd my-prestashop-project

# Complete setup (first time)
ps-enterprise

# The tool will guide you through:
# 1. Authentication
# 2. Project/environment selection
# 3. File cloning
# 4. Database setup
# 5. Environment startup

Switching Projects

# Navigate to different project
cd /path/to/other/project

# Clean previous setup
ps-enterprise clean

# Set up new project
ps-enterprise

Troubleshooting Issues

# Clean environment
ps-enterprise clean

# Start fresh
ps-enterprise

# Monitor for issues
ps-enterprise log

Module Development

# Set up environment
ps-enterprise

# Develop your module...

# Check compliance
ps-enterprise compliance mymodule

# Test in container
ps-enterprise exec --interactive

Important Notes

System Requirements

Prerequisites: Ensure Docker service is running before executing any commands.
macOS Users: You may need to authorize the application in System Settings after installation.

Performance Considerations

  • First Run: Initial setup takes longer due to Docker image downloads
  • Disk Space: Ensure adequate space for containers and database dumps
  • Memory: Monitor system memory usage during development

Network Requirements

  • Internet Connection: Required for authentication and remote operations
  • GitLab Access: SSH access to GitLab repositories must be configured
  • Enterprise Platform: Access to PrestaShop Enterprise Platform required

Getting Help

Built-in Help

# General help
ps-enterprise --help

# Command-specific help
ps-enterprise <command> --help

Common Issues

Issue Solution
Docker not running Start Docker Desktop/service
SSH key issues Regenerate and add SSH keys to GitLab
Permission errors Check user permissions for Docker
Network issues Verify internet connection and firewall settings

Support Resources

  • Documentation: Comprehensive guides for each operating system
  • Community: Connect with other PrestaShop developers
  • Enterprise Support: Contact PrestaShop Enterprise support team

Summary

The PrestaShop Enterprise Developer Tools provide a powerful, automated workflow for managing local development environments. Whether you prefer the automated approach or individual command control, the tools are designed to streamline your development process and reduce common setup errors.

Key takeaways:

  • Start Simple: Use ps-enterprise for automated setup
  • Understand the Flow: Learn what each step does
  • Use Individual Commands: For fine-grained control
  • Follow Best Practices: Keep environments clean and organized
  • Monitor and Debug: Use logs and exec commands for troubleshooting