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:
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:
yarn dev --filter frontendyarn down β
Stops running Docker Compose services.
Options:
--keep-shared
Stops only project-specific services, keeping shared services (like MongoDB or Redis) running.
Example:
yarn down --keep-sharedyarn restart [services...] β
Restarts one or more specific Docker services by name.
Example:
yarn restart frontend backendyarn update [target] β
Updates project dependencies by running internal package update scripts inside containers.
Arguments:
target: One offrontend,backend, orboth.
Default:both.
Example:
yarn update backendyarn add-package <target> <package...> β
Adds one or more npm packages to a specific project target.
Arguments:
target: One offrontend,backend, orboth.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:
yarn add-package frontend lodash
yarn add-package both eslint --devyarn rebuild [services...] β
Rebuilds Docker images for specified services. If no services are passed, raclette detects file changes and rebuilds affected services automatically.
Example:
yarn rebuild frontendyarn build β
Builds the racletteJS project for production.
This generates a production-specific docker-compose file and a production tsconfig.json.
Example:
yarn buildπ§ Tips β
- If you add new packages, consider running
yarn updateor restarting services withyarn restart frontend backendto 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.*.installPackagesin config). See raclette Config reference. - For a complete rebuild, use:bash
yarn dev --force-rebuild