Skip to content
Product Documentation

Helpful Commands

Here is a list of helpful commands you can run from your terminal while developing with PageBuilder Engine, mostly provided by the PageBuilder Engine CLI.

All of these commands should be run from the root directory of your Feature Pack repo.

Creating a new repo

Terminal window
# First we need to create a directory for our Feature Pack to exist in. We'll call this one My-Fusion-Repo
$ mkdir My-Fusion-Repo
$ cd My-Fusion-Repo
Terminal window
# You need to decide whether to install the @arc-fusion/cli package locally (recommended) or globally. # Only perform ONE of the following sets of commands:LOCALLY INSTALLED
$ npx @arc-fusion/cli init
# Downloads and runs the `@arc-fusion/cli` script to init a new repo and install `@arc-fusion/cli` as a devDependency.
# GLOBALLY INSTALLED
$ npm i -g @arc-fusion/cli
# Installs the `@arc-fusion/cli` package as a global binary under the namespace `fusion`
$ fusion init
# Invokes the `fusion init` command to init a new repo

For the rest of the commands below, we will expect that you’ve installed the PageBuilder Engine CLI locally, so we’ll execute the commands via npx. However, if you installed globally, simply run the commands below without the npx prefix (for example, fusion start instead of npx fusion start) for the same result.

Starting and stopping Docker

Terminal window
$ npx fusion start
# Builds and starts all containers. You can add the `--no-admin` flag to run the command without the PageBuilder Admin
$ npx fusion daemon
# Runs the application in daemon mode (i.e. in the background)
$ npx fusion stop
# Stops running containers without removing them
$ npx fusion down
# Stops and removes all running containers

Developing

Terminal window
$ npx fusion rebuild
# Manually rebuilds the webpack bundle (good to run when code changes aren't reflected)
$ npx fusion verify
# This will run Webpack on your source code to see if there are any errors in the build.

Keeping up to date

Terminal window
$ docker-compose pull
# Pulls the latest Docker images running PageBuilder Engine.
# This command gets run whenever you invoke the `start` command, but you can also run it manually
$ npx fusion version
# This will tell you the version of the PageBuilder Engine CLI you are using. This is *NOT* the same thing as the PageBuilder Engine version you are running!
# For that info, go to `http://localhost/release` while running PageBuilder Engine.

Cleaning up Docker artifacts

Terminal window
$ npx fusion cleanContainers
# Removes all exited containers
$ npx fusion cleanImages
# Removes all unused images
$ npx fusion cleanNetworks
# Prunes all unused networks
$ npx fusion cleanVolumes
# Removes docker volumes
$ npx fusion nuke
# Runs all of the 'clean' commands above to ensure no Docker artifacts remain

Exporting data

Terminal window
$ npx fusion dump
# Creates a timestamped DB export in .tar.gz format in the ./data/dumps directory.
# Docker must be running.
$ npx fusion zip
# Creates a timestamped zip of the Feature Pack (without node_modules) inside the ./dist directory