Frontastic CLI commands

Here, you'll find all the commands you need to work with the Frontastic CLIFrontastic CLI - Our Commandline Interface (CLI) that you can use for frontend development.. We've listed them in the order you'll need them, followed by any other commands that may be helpful. We've also explained what each of them does.

See the Frontastic CLI article for full steps on how to work with the Frontastic CLIFrontastic CLI - Our Commandline Interface (CLI) that you can use for frontend development..

Install

brew tap frontasticgmbh/tap && brew install frontastic-cli

📘

For macOS and Linux only, see the Frontastic CLI article for Windows installation instructions.

We use Homebrew to install the Frontastic CLIFrontastic CLI - Our Commandline Interface (CLI) that you can use for frontend development. so this command asks Homebrew to do that.

Create config

frontastic init

Once you've run this command, you'll be asked a series of questions about how you'll be developing with Frontastic. The answers give the CLI a config which it outputs as a TOML file in your project folder called frontastic.toml.

If you want to change your configuration at any time, you can run this command again.

If you're using a Frontastic sandbox, you can use the below flag to skip some of the questions as they'll automatically be done for you:

frontastic init --sandbox <your-sandbox-name>

Start CLI

frontastic run

When you use this command, the CLI starts all the necessary processes for development in your project.

It may ask you for your sudo password, this is needed as the CLI updates your /etc/hosts file and that needs superuser rights.

This will start a dashboard and give you the necessary information you need. See the Frontastic run dashboard section for more information.

Update version

brew upgrade frontastic-cli

If that doesn't work for any reason, you can use the below command instead

brew tap frontasticgmbh/tap && brew upgrade frontastic-cli

📘

For macOS and Linux only, see the Frontastic CLI article for Windows update instructions.

You can run this command at any time to make sure you're running the latest version of the Frontastic CLIFrontastic CLI - Our Commandline Interface (CLI) that you can use for frontend development.. We're always making improvements so we recommend you run this command at least once a week. You can also visit our Frontastic CLI changelog to see the latest updates.

Other commands

frontastic ssh

You can SSH into the Frontastic sandbox you're using with this command.

frontastic generate

The generate command creates the main files needed when building Frontastic componentsFrontastic components - A customizable building block that's used together with other components to create a commerce site. Known as `tastic` for short in code.. See the Frontastic CLI generate command article for steps on how to use it.

frontastic help

The help command gives you the list of the commands in this article.

frontastic xdebug

If you're using a Frontastic sandboxFrontastic sandbox - A virtual machine hosted in the cloud that you can use for backend and some frontend development. They're provisioned from the developer area of the Frontastic studio. for your development, the xdebug command can be used to open an SSH tunnel to the machine and you can then use it with Xdebug.

Flags

frontastic --version

The version flag outputs the version number of the Frontastic CLIFrontastic CLI - Our Commandline Interface (CLI) that you can use for frontend development. that you're using.

frontastic [command] --help

Use the help flag on any command to get information on what that command does, it's the same as what's in this article.

Frontastic run dashboard

When you run frontastic run, you'll see our dashboard.

Here, you can see the current status of the processes it's running as you're using the CLI, so you can easily see when a process stops working or a connection is lost.

The error section will highlight the number of unread errors within the webpack, SSR compiler, and SSR server. To see the error, you can use the hotkeys to go to the window where the error is occurring to find out more information. When you go back to the dashboard, the unread errors will be reset.

The Startup checks section shows you the initial setup of the CLI processes.

The Test URL is where you can see the site you're working on.

Hotkeys
When you're on the dashboard, you can use the below hotkeys:
d – dashboard
t – opens your test URL in a browser
w – webpack log
c – SSR compiler log
s – SSR server log
f – filesync issue log
ctrl-c – Exits the CLI (if using Windows, you many need to type exit instead)

When you're in the logs, you can use the below hotkeys to navigate through the logs:
h or left arrow – move left
l or right arrow – move right
j or down arrow – move down
k or up arrow – move up
g or home – moves to the top of the page
G or end – moves to the bottom of the page
ctrl-f or page down – moves down 1 page
ctrl-b or page up – moves up 1 page
ctrl-l – saves the current log window to CSV file


Did this page help you?