If you’re setting up your project for the first time, we recommend using the CLI by following the Quickstart guide.

init Command

The init command incorporates into your project. It performs the following functions:

  • Adds to the project.

  • Creates a new route.

  • Generates an example file.

    During execution, this command requires some configuration parameters. Detailed information on these parameters can be found in the next section.

Your first Job

Run this init command in a terminal window to setup your project with

npx init

CLI steps explained

dev Command

Once you’re running your project locally, you can then execute the dev CLI command to run locally. You should run this command every time you want to use locally.

Your first Job

Make sure your site is running locally before continuing. You must also leave this dev terminal command running while you develop.

In a new terminal window or tab run:

npx dev

You can optionally pass the port if you’re not running on 3000 by adding --port 3001 to the end

You can optionally pass the hostname if you’re not running on localhost by adding --hostname <host>. For example, in case your app is running on --hostname

update Command

The update command will update all packages to the latest version.

npx update

whoami Command

The whoami command will print out information about your current project and environment, based on the API key found in your .env or .env.local file

npx whoami

send-event Command

The send-event command will send an event to your project. This is useful for testing your project locally.

npx send-event -n "" -p "{ \"key\": \"value\" }"