Skip to content

racletteJS CLI ​

The racletteJS CLI provides commands for local development, container lifecycle, dependency updates, and production build workflows.


πŸ“¦ Installation ​

Once raclette is installed and configured in your project, you can run CLI commands using:

bash
yarn <command>

πŸ”§ Available Commands ​

yarn dev ​

Starts the local development environment using Docker Compose.

Options:

  • -d, --direct
    Run services directly (not in containers).
  • -q, --quiet
    Run Docker Compose in detached mode without following logs.
  • --filter <services>
    Filter logs to specific services (comma-separated). Default: frontend,backend.
  • --force-rebuild
    Force rebuild of Docker images, even if no files changed.

Example:

bash
yarn dev --filter frontend

yarn down ​

Stops running Docker Compose services.

Options:

  • --keep-shared
    Stops only project-specific services, keeping shared services (like MongoDB or Redis) running.

Example:

bash
yarn down --keep-shared

yarn restart [services...] ​

Restarts one or more specific Docker services by name.

Example:

bash
yarn restart frontend backend

yarn update [target] ​

Updates project dependencies by running internal package update scripts inside containers.

Arguments:

  • target: One of frontend, backend, or both.
    Default: both.

Example:

bash
yarn update backend

yarn add-package <target> <package...> ​

Adds one or more npm packages to a specific project target.

Arguments:

  • target: One of frontend, backend, or both.
  • package: One or more package names to install.

Options:

  • --dev
    Install as a development dependency.
  • --no-update
    Skip automatic dependency update after adding the package(s).

Examples:

bash
yarn add-package frontend lodash
yarn add-package both eslint --dev

yarn rebuild [services...] ​

Rebuilds Docker images for specified services. If no services are passed, raclette detects file changes and rebuilds affected services automatically.

Example:

bash
yarn rebuild frontend

yarn build ​

Builds the racletteJS project for production.

This generates a production-specific docker-compose file and a production tsconfig.json.

Example:

bash
yarn build

🧠 Tips ​

  • If you add new packages, consider running yarn update or restarting services with yarn restart frontend backend to apply changes.
  • Full rebuilds are usually not required. They are mainly needed when container image layers must change (for example, when adding OS packages via services.*.installPackages in config). See raclette Config reference.
  • For a complete rebuild, use:
    bash
    yarn dev --force-rebuild