Simulator Management

Plato Hub provides powerful commands for managing simulators throughout their lifecycle - from creation to deployment.

Creating New Simulators

Initialize a New Simulator

Create a brand new simulator with repository setup:
plato hub init <simulator-name> [options]
simulator-name
string
required
Name of the new simulator (e.g., myapp, crm-system)
--description
string
Description for the new simulator
--sim-type
string
default:"docker_app"
Type of simulator to create
--directory
string
Directory to create and clone into (defaults to simulator name)
Example:
plato hub init custom-sim --description "Custom CRM simulator" --directory ./my-crm-app
This command:
  1. Creates a new simulator in the Plato registry
  2. Sets up a Git repository for the simulator
  3. Clones the repository to your local machine
  4. Configures the local directory for development

Working with Existing Simulators

Clone an Existing Simulator

Download and set up a local copy of an existing simulator:
plato hub clone <simulator-name> [--directory <path>]
Example:
plato hub clone custom-sim
cd custom-sim
Link an existing directory to a simulator (useful for monorepos):
plato hub link <simulator-name> [directory]
This creates a .plato-hub.json configuration without cloning - perfect for integrating simulators into existing codebases.

Git Operations

Plato Hub provides enhanced git commands that understand simulator repositories:

Authenticate with Hub

Set up authentication for git operations:
plato hub login
This caches your credentials securely for seamless git operations.

Push Changes

Push your local changes to the simulator repository:
plato hub git push [branch-name]
Hub git commands work in “isolation” - they sync only the simulator files without affecting your monorepo structure.

Pull Updates

Pull updates from the simulator repository:
plato hub git pull

Check Status

See the difference between your local simulator and the remote:
plato hub git status
plato hub git diff

Listing Simulators

Available Simulators

See all simulators you have access to:
plato list-simulators
This shows:
  • Simulator names and descriptions
  • Enabled/disabled status
  • Access permissions

Configuration Management

Default Configuration

When you clone or create a simulator, Plato automatically creates a plato-config.yml file:
compute:
  cpus: 1
  memory: 2048
  disk: 10240
  app_port: 8080
  plato_messaging_port: 7000

datasets:
  base:
    entrypoint:
      type: "docker"
      file: "datasets/base/docker-compose.yml"
      healthy_wait_timeout: 300
      required_services: ["*"]
    mutation_listeners:
      container-1:
        type: "db"
        db_type: "postgresql" 
        db_host: "localhost"
        db_port: 5432
        db_user: "app_user"
        db_password: "${DB_PASSWORD}"
        db_database: "app_db"

Configuration Options

Compute Resources

Configure CPU, memory, and disk for your VM

Datasets

Define different environments (base, test, prod-copy)

Entrypoints

Specify how your simulator services start up

Mutation Listeners

Monitor database changes for state tracking

Best Practices

Monorepo Integration: Use plato hub link instead of clone when working with monorepos to avoid nested git repositories.
Branch Strategy: Use feature branches for development, push to main for production snapshots.
Always run plato hub login before git operations to ensure proper authentication.

Next Steps

Now that you understand simulator management, learn about: