Skip to content

Open source website builder and Webflow alternative. Webstudio is an advanced visual builder that connects to any headless CMS, supports all CSS properties, and can be hosted anywhere, including with us.

feat: Rename webstudio-cli to webstudio as we got the shorter namespace (#2443)

Oleg Isonen8e9620721df5
diff --git a/.github/workflows/cli-test.yml b/.github/workflows/cli-test.yml
index 6bd942a2d1..a924b7f9b8 100644
--- a/.github/workflows/cli-test.yml
+++ b/.github/workflows/cli-test.yml
@@ -36,12 +36,12 @@ jobs:
- uses: ./.github/actions/ci-setup
- name: Build cli
- run: pnpm turbo run build --filter='webstudio-cli'
+ run: pnpm turbo run build --filter='webstudio'
# Testing fixtures for vercel template
- name: Test cli --help flag
working-directory: ./fixtures/webstudio-remix-vercel
- run: pnpm webstudio-cli --help
+ run: pnpm webstudio --help
- name: Testing cli link command
run: pnpm --filter='./fixtures/*' --sequential run fixtures:link
diff --git a/apps/builder/app/builder/features/topbar/publish.tsx b/apps/builder/app/builder/features/topbar/publish.tsx
index 24136f5a07..dee13529b8 100644
--- a/apps/builder/app/builder/features/topbar/publish.tsx
+++ b/apps/builder/app/builder/features/topbar/publish.tsx
@@ -509,7 +509,7 @@ const isDeployTargets = (value: string): value is DeployTargets =>
Object.keys(deployTargets).includes(value);
const ExportContent = () => {
- const npxCommand = "npx webstudio-cli";
+ const npxCommand = "npx webstudio";
const [deployTarget, setDeployTarget] = useState<DeployTargets>("vercel");
return (
diff --git a/fixtures/webstudio-custom-template/README.md b/fixtures/webstudio-custom-template/README.md
index e1756bab81..5d52f15d69 100644
--- a/fixtures/webstudio-custom-template/README.md
+++ b/fixtures/webstudio-custom-template/README.md
@@ -1,21 +1,21 @@
-# Fixture to test/play with webstudio-cli
+# Fixture to test/play with webstudio
## How to develop
```bash
# Terminal 1
-cd packages/webstudio-cli
+cd packages/webstudio
pnpm dev
```
```bash
# Terminal 2
-pnpm webstudio-cli link
+pnpm webstudio link
# add following link https://webstudio-builder-git-main-webstudio-is.vercel.app/builder/0d856812-61d8-4014-a20a-82e01c0eb8ee?authToken=d225fafb-4f20-4340-9359-c21df7c49a3f&mode=preview
-pnpm webstudio-cli sync && pnpm prettier --write ./.webstudio/
+pnpm webstudio sync && pnpm prettier --write ./.webstudio/
# data.json generated
-pnpm webstudio-cli build --preview --template ./custom-template && pnpm prettier --write ./app/ ./package.json
+pnpm webstudio build --preview --template ./custom-template && pnpm prettier --write ./app/ ./package.json
# exec `pnpm run dev` to see result
```
diff --git a/fixtures/webstudio-custom-template/package.json b/fixtures/webstudio-custom-template/package.json
index ccc166baf8..2c42b92ebb 100644
--- a/fixtures/webstudio-custom-template/package.json
+++ b/fixtures/webstudio-custom-template/package.json
@@ -7,9 +7,9 @@
"start": "remix-serve build",
"checks": "pnpm typecheck",
"size-test": "rm -rf ./public && remix build && size-limit",
- "fixtures:link": "webstudio-cli link --link 'https://webstudio-builder-git-main-webstudio-is.vercel.app/builder/0d856812-61d8-4014-a20a-82e01c0eb8ee?authToken=d225fafb-4f20-4340-9359-c21df7c49a3f'",
- "fixtures:sync": "webstudio-cli sync && pnpm prettier --write ./.webstudio/",
- "fixtures:build": "webstudio-cli build --template ./custom-template --preview && pnpm prettier --write ./app/ ./package.json"
+ "fixtures:link": "webstudio link --link 'https://webstudio-builder-git-main-webstudio-is.vercel.app/builder/0d856812-61d8-4014-a20a-82e01c0eb8ee?authToken=d225fafb-4f20-4340-9359-c21df7c49a3f'",
+ "fixtures:sync": "webstudio sync && pnpm prettier --write ./.webstudio/",
+ "fixtures:build": "webstudio build --template ./custom-template --preview && pnpm prettier --write ./app/ ./package.json"
},
"private": true,
"sideEffects": false,
@@ -36,7 +36,7 @@
"@types/react": "^18.2.20",
"@types/react-dom": "^18.2.7",
"typescript": "5.2.2",
- "webstudio-cli": "workspace:*"
+ "webstudio": "workspace:*"
},
"engines": {
"node": ">=18.0.0"
diff --git a/fixtures/webstudio-remix-netlify-edge-functions/README.md b/fixtures/webstudio-remix-netlify-edge-functions/README.md
index aa841b8af2..98f5ea7fc4 100644
--- a/fixtures/webstudio-remix-netlify-edge-functions/README.md
+++ b/fixtures/webstudio-remix-netlify-edge-functions/README.md
@@ -1,21 +1,21 @@
-# Fixture to test/play with webstudio-cli
+# Fixture to test/play with webstudio
## How to develop
```bash
# Terminal 1
-cd packages/webstudio-cli
+cd packages/webstudio
pnpm dev
```
```bash
# Terminal 2
-pnpm webstudio-cli link
+pnpm webstudio link
# add following link https://webstudio-builder-git-main-webstudio-is.vercel.app/builder/d845c167-ea07-4875-b08d-83e97c09dcce?authToken=e9d1343f-9298-4fd3-a66e-f89a5af2dd93
-pnpm webstudio-cli sync && pnpm prettier --write ./.webstudio/
+pnpm webstudio sync && pnpm prettier --write ./.webstudio/
# data.json generated
-pnpm webstudio-cli build --preview && pnpm prettier --write ./app/ ./package.json
+pnpm webstudio build --preview && pnpm prettier --write ./app/ ./package.json
# exec `pnpm run dev` to see result
```
diff --git a/fixtures/webstudio-remix-netlify-edge-functions/package.json b/fixtures/webstudio-remix-netlify-edge-functions/package.json
index eef32cbc16..6a0d72d265 100644
--- a/fixtures/webstudio-remix-netlify-edge-functions/package.json
+++ b/fixtures/webstudio-remix-netlify-edge-functions/package.json
@@ -5,9 +5,9 @@
"build": "remix build",
"dev": "remix dev",
"typecheck": "tsc",
- "fixtures:link": "webstudio-cli link --link 'https://webstudio-builder-git-main-webstudio-is.vercel.app/builder/d845c167-ea07-4875-b08d-83e97c09dcce?authToken=e9d1343f-9298-4fd3-a66e-f89a5af2dd93&'",
- "fixtures:sync": "webstudio-cli sync && pnpm prettier --write ./.webstudio/",
- "fixtures:build": "webstudio-cli build --template netlify-edge-functions --preview && pnpm prettier --write ./app/ ./package.json"
+ "fixtures:link": "webstudio link --link 'https://webstudio-builder-git-main-webstudio-is.vercel.app/builder/d845c167-ea07-4875-b08d-83e97c09dcce?authToken=e9d1343f-9298-4fd3-a66e-f89a5af2dd93&'",
+ "fixtures:sync": "webstudio sync && pnpm prettier --write ./.webstudio/",
+ "fixtures:build": "webstudio build --template netlify-edge-functions --preview && pnpm prettier --write ./app/ ./package.json"
},
"dependencies": {
"@netlify/functions": "^1.3.0",
@@ -35,7 +35,7 @@
"@types/react": "^18.2.20",
"@types/react-dom": "^18.2.7",
"typescript": "5.2.2",
- "webstudio-cli": "workspace:*"
+ "webstudio": "workspace:*"
},
"engines": {
"node": ">=18.0.0"
diff --git a/fixtures/webstudio-remix-netlify-functions/README.md b/fixtures/webstudio-remix-netlify-functions/README.md
index aa841b8af2..98f5ea7fc4 100644
--- a/fixtures/webstudio-remix-netlify-functions/README.md
+++ b/fixtures/webstudio-remix-netlify-functions/README.md
@@ -1,21 +1,21 @@
-# Fixture to test/play with webstudio-cli
+# Fixture to test/play with webstudio
## How to develop
```bash
# Terminal 1
-cd packages/webstudio-cli
+cd packages/webstudio
pnpm dev
```
```bash
# Terminal 2
-pnpm webstudio-cli link
+pnpm webstudio link
# add following link https://webstudio-builder-git-main-webstudio-is.vercel.app/builder/d845c167-ea07-4875-b08d-83e97c09dcce?authToken=e9d1343f-9298-4fd3-a66e-f89a5af2dd93
-pnpm webstudio-cli sync && pnpm prettier --write ./.webstudio/
+pnpm webstudio sync && pnpm prettier --write ./.webstudio/
# data.json generated
-pnpm webstudio-cli build --preview && pnpm prettier --write ./app/ ./package.json
+pnpm webstudio build --preview && pnpm prettier --write ./app/ ./package.json
# exec `pnpm run dev` to see result
```
diff --git a/fixtures/webstudio-remix-netlify-functions/package.json b/fixtures/webstudio-remix-netlify-functions/package.json
index 7d270c1644..b1775ce558 100644
--- a/fixtures/webstudio-remix-netlify-functions/package.json
+++ b/fixtures/webstudio-remix-netlify-functions/package.json
@@ -5,9 +5,9 @@
"build": "remix build",
"dev": "remix dev",
"typecheck": "tsc",
- "fixtures:link": "webstudio-cli link --link 'https://webstudio-builder-git-main-webstudio-is.vercel.app/builder/d845c167-ea07-4875-b08d-83e97c09dcce?authToken=e9d1343f-9298-4fd3-a66e-f89a5af2dd93'",
- "fixtures:sync": "webstudio-cli sync && pnpm prettier --write ./.webstudio/",
- "fixtures:build": "webstudio-cli build --template netlify-functions --preview && pnpm prettier --write ./app/ ./package.json"
+ "fixtures:link": "webstudio link --link 'https://webstudio-builder-git-main-webstudio-is.vercel.app/builder/d845c167-ea07-4875-b08d-83e97c09dcce?authToken=e9d1343f-9298-4fd3-a66e-f89a5af2dd93'",
+ "fixtures:sync": "webstudio sync && pnpm prettier --write ./.webstudio/",
+ "fixtures:build": "webstudio build --template netlify-functions --preview && pnpm prettier --write ./app/ ./package.json"
},
"dependencies": {
"@netlify/functions": "^1.3.0",
@@ -34,7 +34,7 @@
"@types/react": "^18.2.20",
"@types/react-dom": "^18.2.7",
"typescript": "5.2.2",
- "webstudio-cli": "workspace:*"
+ "webstudio": "workspace:*"
},
"engines": {
"node": ">=18.0.0"
diff --git a/fixtures/webstudio-remix-vercel/package.json b/fixtures/webstudio-remix-vercel/package.json
index 95a87dc6b2..9f269d5b8a 100644
--- a/fixtures/webstudio-remix-vercel/package.json
+++ b/fixtures/webstudio-remix-vercel/package.json
@@ -4,9 +4,9 @@
"build": "remix build",
"dev": "remix dev",
"typecheck": "tsc",
- "fixtures:link": "webstudio-cli link --link 'https://webstudio-builder-git-main-webstudio-is.vercel.app/builder/cddc1d44-af37-4cb6-a430-d300cf6f932d?authToken=1cdc6026-dd5b-4624-b89b-9bd45e9bcc3d&mode=preview'",
- "fixtures:sync": "webstudio-cli sync && pnpm prettier --write ./.webstudio/",
- "fixtures:build": "webstudio-cli build --preview && pnpm prettier --write ./app/ ./package.json"
+ "fixtures:link": "webstudio link --link 'https://webstudio-builder-git-main-webstudio-is.vercel.app/builder/cddc1d44-af37-4cb6-a430-d300cf6f932d?authToken=1cdc6026-dd5b-4624-b89b-9bd45e9bcc3d&mode=preview'",
+ "fixtures:sync": "webstudio sync && pnpm prettier --write ./.webstudio/",
+ "fixtures:build": "webstudio build --preview && pnpm prettier --write ./app/ ./package.json"
},
"private": true,
"sideEffects": false,
@@ -31,7 +31,7 @@
"@types/react": "^18.2.20",
"@types/react-dom": "^18.2.7",
"typescript": "5.2.2",
- "webstudio-cli": "workspace:*"
+ "webstudio": "workspace:*"
},
"engines": {
"node": ">=18.0.0"
diff --git a/packages/cli/README.md b/packages/cli/README.md
index dc8bd63e52..a96afcbc9a 100644
--- a/packages/cli/README.md
+++ b/packages/cli/README.md
@@ -35,13 +35,13 @@ To get started with the Webstudio CLI:
1. Download and install the CLI using the following command:
```bash
- npm install -g webstudio-cli
+ npm install -g webstudio
```
1. Confirm the installation by checking the CLI version:
```bash
- webstudio-cli --version
+ webstudio --version
```
1. To keep your CLI updated, use the same command used for installation whenever a new release is available.
@@ -51,7 +51,7 @@ To get started with the Webstudio CLI:
Now, you can run a Webstudio project on your local machine using this command:
```bash
-webstudio-cli
+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.
@@ -73,7 +73,7 @@ The **`link`** command syncs your local Webstudio project with the project from
You can link a project from Webstudio Cloud with the following command:
```bash
-webstudio-cli link
+webstudio link
```
This command will prompt you to paste a link which you can create using the _Share_ option in your project.
@@ -85,7 +85,7 @@ Make sure to provide _Build_ access when generating the link in Webstudio Cloud.
Once the project is linked, use the **`sync`** command to sync it with the cloud:
```bash
-webstudio-cli sync
+webstudio sync
```
Make sure to publish the project in Webstudio Cloud before running the **`sync`** command in your local Webstudio project.
@@ -95,7 +95,7 @@ Make sure to publish the project in Webstudio Cloud before running the **`sync`*
Now, you can build your project with the **`build`** command:
```bash
-webstudio-cli build
+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.
@@ -129,13 +129,13 @@ You can configure the project to support netlify serverless/edge-functions respe
You can manually change it using the `build` command. For serverless functions:
```bash
-webstudio-cli build --template netlify-functions
+webstudio build --template netlify-functions
```
and for edge functions:
```bash
-webstudio-cli build --template netlify-edge-functions
+webstudio build --template netlify-edge-functions
```
## Important Notes
diff --git a/packages/cli/package.json b/packages/cli/package.json
index b967cba91a..b912e71c3a 100644
--- a/packages/cli/package.json
+++ b/packages/cli/package.json
@@ -1,12 +1,13 @@
{
- "name": "webstudio-cli",
+ "name": "webstudio",
"version": "0.105.0",
"description": "Webstudio CLI",
"author": "Webstudio <[email protected]>",
"homepage": "https://webstudio.is",
"type": "module",
"bin": {
- "webstudio-cli": "./bin.js"
+ "webstudio-cli": "./bin.js",
+ "webstudio": "./bin.js"
},
"files": [
"lib/*",
diff --git a/packages/cli/src/cli.ts b/packages/cli/src/cli.ts
index f197110fb2..45c879423c 100644
--- a/packages/cli/src/cli.ts
+++ b/packages/cli/src/cli.ts
@@ -38,7 +38,7 @@ export const main = async () => {
alias: "help",
type: "boolean",
})
- .scriptName("webstudio-cli")
+ .scriptName("webstudio")
.usage(
`Webstudio CLI (${packageJson.version}) allows you to setup, sync, build and preview your project.`
);
diff --git a/packages/cli/src/commands/sync.ts b/packages/cli/src/commands/sync.ts
index b255f96dbb..1fb073aa12 100644
--- a/packages/cli/src/commands/sync.ts
+++ b/packages/cli/src/commands/sync.ts
@@ -96,9 +96,7 @@ export const sync = async (
if (projectConfig === undefined) {
spinner.fail(
- `Project config is not found, please run ${pc.dim(
- "webstudio-cli link"
- )}`
+ `Project config is not found, please run ${pc.dim("webstudio link")}`
);
return;
}
diff --git a/packages/cli/src/prebuild.ts b/packages/cli/src/prebuild.ts
index 77b52d26d8..13b0e8dbb7 100644
--- a/packages/cli/src/prebuild.ts
+++ b/packages/cli/src/prebuild.ts
@@ -204,7 +204,7 @@ export const prebuild = async (options: {
options.template.startsWith(".") === false
) {
throw Error(
- `\n Template ${options.template} is not available \n Please check webstudio-cli --help for more details`
+ `\n Template ${options.template} is not available \n Please check webstudio --help for more details`
);
}
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index b6c44adbf8..fce2adb1cc 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -465,7 +465,7 @@ importers:
typescript:
specifier: 5.2.2
version: 5.2.2
- webstudio-cli:
+ webstudio:
specifier: workspace:*
version: link:../../packages/cli
@@ -535,7 +535,7 @@ importers:
typescript:
specifier: 5.2.2
version: 5.2.2
- webstudio-cli:
+ webstudio:
specifier: workspace:*
version: link:../../packages/cli
@@ -602,7 +602,7 @@ importers:
typescript:
specifier: 5.2.2
version: 5.2.2
- webstudio-cli:
+ webstudio:
specifier: workspace:*
version: link:../../packages/cli
@@ -663,7 +663,7 @@ importers:
typescript:
specifier: 5.2.2
version: 5.2.2
- webstudio-cli:
+ webstudio:
specifier: workspace:*
version: link:../../packages/cli