0.151.0 • Published 3 days ago

webstudio v0.151.0

Weekly downloads
-
License
AGPL-3.0-or-later
Repository
-
Last release
3 days ago

Webstudio CLI

The Webstudio CLI helps you to link, sync and build projects from Webstudio Cloud. This README will guide you through the process of setting up a Webstudio project on your local machine and continually sync it with the cloud.

Prerequisites: Installing Node.js

You need Node.js to use the Webstudio CLI. If Node.js is already installed in your system, you can skip ahead to the section on installing the Webstudio CLI.

To install Node.js using NVM, first install NVM by running:

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.5/install.sh | bash

Once NVM is installed, you can install Node.js version 18 by running:

nvm install 18

Verify your Node.js installation by checking its version:

node --version

Installing the Webstudio CLI

To get started with the Webstudio CLI:

  1. Download and install the CLI using the following command:

    npm install -g webstudio
  2. Confirm the installation by checking the CLI version:

    webstudio --version
  3. To keep your CLI updated, use the same command used for installation whenever a new release is available.

Initiating a Webstudio Project

Now, you can run a Webstudio project on your local machine using this command:

webstudio

This will initiate the flow to connect your Webstudio Cloud project and build it in your local computer. The default flow will guide you through the steps. You can also perform all the operations individually using independent commands.

Commands

Here is the list of independent commands:

  • version
  • help
  • link
  • sync
  • build

link

The link command syncs your local Webstudio project with the project from the cloud. This means that any changes made in the cloud can be synced to the local project, once they are published.

You can link a project from Webstudio Cloud with the following command:

webstudio link

This command will prompt you to paste a link which you can create using the Share option in your project.

Make sure to provide Build access when generating the link in Webstudio Cloud.

sync

Once the project is linked, use the sync command to sync it with the cloud:

webstudio sync

Make sure to publish the project in Webstudio Cloud before running the sync command in your local Webstudio project.

build

Now, you can build your project with the build command:

webstudio build

During this phase, the CLI establishes the necessary routes and pages, scaffolding the entire application using the default Remix template. Additionally, all assets, such as images and fonts are downloaded to the assets folder inside the public directory.

Once the project is scaffolded, you can run npm install and then npm run dev to run your app in development mode.

If you want to build a production version of the app, you can run npm run build.

Deployment

Vercel

Once you've built the project locally, you can use the Vercel CLI to deploy your project directly to Vercel:

vercel deploy

Follow the instructions here to install the vercel CLI. We plan to add more deployment targets in future.

Netlify

If you want to deploy to netlify, you can use Netlify CLI to deploy your project directly to Netlify:

netlify deploy

You can configure the project to support netlify serverless/edge-functions respectively, as deployment target at the time of initially setting up your project. Please check the initiating-a-webstudio-project section.

You can manually change it using the build command. For serverless functions:

webstudio build --template netlify-functions

and for edge functions:

webstudio build --template netlify-edge-functions

Important Notes

If you use vercel build before vercel deploy, make sure to clean your app folder in the project afterward.

Vercel injects a few files to support and deploy Remix using their CLI, but these files are not necessary for your project when you use it locally.

0.151.0

3 days ago

0.145.0

19 days ago

0.143.1

1 month ago

0.144.0

1 month ago

0.143.0

1 month ago

0.142.0

2 months ago

0.141.0

2 months ago

0.140.0

2 months ago

0.139.0

2 months ago

0.138.0

2 months ago

0.137.0

2 months ago

0.136.0

2 months ago

0.135.0

2 months ago

0.134.0

2 months ago

0.133.0

3 months ago

0.131.0

3 months ago

0.130.0

3 months ago

0.132.0

3 months ago

0.129.0

3 months ago

0.128.0

3 months ago

0.127.0

4 months ago

0.126.0

4 months ago

0.125.0

4 months ago

0.124.0

4 months ago

0.123.0

5 months ago

0.122.0

5 months ago

0.111.1-1b465d6.0

6 months ago

0.111.1-3138155.0

6 months ago

0.111.1-0d68965.0

6 months ago

0.118.0

6 months ago

0.119.0

6 months ago

0.108.0

7 months ago

0.109.0

7 months ago

0.114.0

6 months ago

0.115.0

6 months ago

0.116.0

6 months ago

0.117.0

6 months ago

0.110.0

7 months ago

0.111.0

7 months ago

0.112.0

6 months ago

0.113.0

6 months ago

0.121.0

6 months ago

0.120.0

6 months ago

0.107.0

7 months ago

0.106.0

7 months ago

0.105.0

7 months ago