config - Configuration

Configure your local development environment settings for PrestaShop Enterprise development.

Purpose

The config command sets up your local development environment configuration, including project selection, environment targeting, tunnel settings, and debug configurations.

When to Use

  • After initial authentication: Set up your development environment for the first time
  • Project switching: When switching between different PrestaShop Enterprise projects
  • Environment changes: When targeting a different environment (dev, staging, production)
  • Settings updates: When updating tunnel, debug, or other settings

Prerequisites

Before running the config command:

  1. Authentication: Must be authenticated with ps-enterprise auth

Usage

Interactive Configuration

ps-enterprise config

Force Reconfiguration

# Force reconfiguration even if settings exist
ps-enterprise config --force

Options

Flag Short Description Required
--force -f Force reconfiguration of existing settings No
--help -h Show command help No

Process

The config command guides you through an interactive setup process:

1. Agency Selection

  • Available Agencies: Lists all Enterprise agencies you have access to
  • Selection: Choose the agency you want to work with locally

2. Project Selection

  • Available Projects: Lists all Enterprise projects you have access to
  • Project Details: Shows project name and last update date
  • Selection: Choose the project you want to work with locally

3. Environment Selection

  • Environment List: Displays available environments for the selected project
  • Environment Types: Common environments include:
    • dev - Development environment
    • staging - Pre-production testing environment
    • prod - Live production environment
  • Target Selection: Choose which environment to sync from and deploy to

4. Shop file path

  • Shop File Path: Specify the local path where your local shop files will be saved
  • Default Path: The tool suggests a recommended default path
  • Custom Path: You can enter a custom path if your shop files are located elsewhere

5. Debug Settings

  • Debug Mode: Enable/disable debug mode for local development
  • Error Reporting: Configure error reporting levels
  • Development Tools: Enable additional development and debugging features

7. User Configuration

  • User id/group: Specify the computer user and group used to run the containers and access the files
  • Permissions: Select user/group with right docker usage permission and local file permissions
  • Custom id: If specified user/id is not correct, configure a custom user id and group id

8. XDebug Configuration

  • Debug Mode: Enable or disable XDebug for PHP debugging
  • Protected modules: Removes ioncube protected modules to allow debugging

9. Tunnel Configuration (ngrok)

  • Public Domain Setup: Configure ngrok for external access to your local environment
  • Tunnel Settings: Set up secure tunnels for webhook testing and external integrations
  • Domain Options: Choose between free random domains or static ngrok domains

10. SSH Configuration

  • Custom Command: Configure a custom SSH command for git operations

Examples

First-Time Configuration

# Run interactive configuration
ps-enterprise config

# Follow the prompts to:
# 1. Select your agency
# 2. Select your project
# 3. Choose target environment
# 4. Configure settings

Reconfigure Existing Setup

# Force reconfiguration (overwrites existing settings)
ps-enterprise config --force

# Useful when:
# - Switching to a different project
# - Changing target environment
# - Updating ngrok settings

Troubleshooting

Project Access Denied

❌ Access denied to project 'myproject'

Solution: Contact your administrator to grant access to the project.

Integration with Other Commands

The config command sets up the foundation for all other CLI operations:

  • Authentication: Requires valid authentication before configuration
  • Clone: Uses project/environment settings to determine what to clone
  • Remote-dump: Uses environment settings to connect to the correct database
  • Start/Stop: Uses configuration to set up the correct local environment
  • auth - Required before configuration
  • clone - Uses project configuration to clone correct repository
  • remote-dump - Uses environment configuration for database access
  • clean - Removes configuration files

Pro Tip: Use --force flag when switching between projects to ensure clean configuration setup.
Team Setup: For team projects, establish common ngrok domain patterns and document them for consistency across developers.