Skip to main content

Initialize a new project

You can start a new project from anywhere on your machine. Once you cd into the right folder, run instant init <your-project> <template> to get on building.

Currently the only supported template is ts-tailwind: Typescript with Tailwind CSS.

Terminal
instant init my-instant-project ts-tailwind

cd my-instant-project

Installing Dependencies

After initializing, you need to install certain dependencies before you can run a local instance.

Terminal
npm install

Start Instant ⚡

Instant comes with a built-in development server that has everything you need for project development. The instant dev command will start the local development server so that you can see your new blocks & components in action for the very first time.

Every starter template comes with a pre-configured script that will run instant dev for you. Use your favorite package manager to run this command and start the Instant development server.

Terminal
npm run dev

If all goes well, Instant should now be serving your project on http://localhost:3000

The Instant CLI will listen for live file changes in your src/ directory, so you will not need to restart the server as you make changes during development.

If you aren’t able to open your project in the browser, go back to the terminal where you ran the dev command and look to see if an error occurred, or if your project is being served at a different URL than the one linked to above.

Sandbox environment

Instant CLI comes out of the box with a sandbox environment. Read sandbox guide


Next Steps

Great success! You are now ready to start building with the Instant CLI! 🥳

Here are a few topics that we recommend exploring next. You can read them in any order. You can even leave our documentation for a bit and go play in your new Instant project codebase, coming back here whenever you run into trouble or have a question.

🧑‍🚀  Publish your Blocks — Learn how to build & deploy an Instant project to your store.

📚  Understand the codebase — Learn more about the Instant project structure.