> To build or manage a Wix site with an AI agent, follow https://www.wix.com/headless/skill.md
> It builds a new Wix site or puts your own site online, from a prompt, and keeps changing it afterwards. The pages are code in any web technology, and Wix runs the backend.
> It works through the Wix plugin (the Wix MCP and the Wix skills), the Wix CLI or no Wix login, and puts the site live on Wix hosting or on another host.
> Business features include a store, bookings, events and tickets, a restaurant, a blog, forms, members and many more.
> Read the Wix skills online at https://www.wix.com/skills
> 
> Portal Navigation:
> 
> - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version.
> - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages).
> - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`).
> - If a reference page seems to be missing its schema (parameters, return types, or type definitions), append `?schema=true` to its `.md` URL (e.g. `https://dev.wix.com/docs/contexts/contexts/stores/category-info/use-category-info-context.md?schema=true`).
> - Top-level index of all portals: https://dev.wix.com/docs/llms.txt
> - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt

## Resource: Create an App with the Wix CLI

## Article: Quick Start a Wix CLI App

## Article Link: https://dev.wix.com/docs/build-apps/get-started/quick-start/create-an-app-with-the-wix-cli.md

## Article Content:

# Quick Start with the Wix CLI for Apps

This guide explains the minimum steps required to get a CLI app up and running using the Wix CLI.

By following this guide, you'll learn how to:

1. [Create a new app project](#step-1--create-a-new-app-project) with the Wix CLI.
1. [Set up the development environment](#step-2--set-up-the-development-environment) and install your app on a development site.
1. [Test the app](#step-3--test-the-app) by changing its code and seeing the change in the browser.
1. [Call a Wix API](#step-4--optional-call-a-wix-api) from your app's dashboard page.

> **Note:** To develop with AI assistance, install the [Wix Plugin](https://dev.wix.com/docs/api-reference/articles/ai-tools/about-the-wix-plugin.md) for your IDE. It adds [Wix Skills](https://dev.wix.com/docs/api-reference/articles/ai-tools/about-wix-skills.md) and the [Wix MCP](https://dev.wix.com/docs/sdk/articles/use-the-wix-mcp/about-the-wix-mcp.md), giving your AI client the context it needs to help you build CLI projects.

## Before you begin

Make sure you have:

+ [Node.js](https://nodejs.org/en/) (v24.22.1 or higher).
+ Git, installed and [configured](https://git-scm.com/docs/git-config).
+ A Wix account. If you don't have one, [sign up for a Wix account](https://manage.wix.com/account/custom-apps).
+ The Wix CLI, installed globally, so you can run this guide's `wix` commands. To install or update it, run `npm install -g @wix/cli@latest`.

    > **Note:** Without a global install, you can run each command with `npx`. For example, `npx wix app dev`.

## Step 1 | Create a new app project

1. Run the following command to create a new app project:

    ```bash
    npm create @wix/new@latest app
    ```

2. When asked what you would like to do, select **Create a new Wix app**.

3. When asked how you would like to create your new app, select **Create a basic app**.

4. Enter a **name for your app**.

    The app name is the name that appears in your [app's dashboard](https://manage.wix.com/account/custom-apps).

5. Enter a **folder name** for your project, or press `Enter` to accept the suggestion based on your app name.

6. When asked whether to configure the [Wix MCP](https://dev.wix.com/docs/sdk/articles/use-the-wix-mcp/about-the-wix-mcp.md) for your IDE, select your IDE, or select **No** to skip this step.

    The CLI registers your app in your Wix account.

7. Enter a **namespace** for your app, or press `Enter` to accept the suggestion. You can't change the namespace later.

    Some extensions, such as data collections, use the namespace.

8. Enter a **code identifier** for your app, or press `Enter` to accept the suggestion. You can't change the code identifier later.

    The CLI uses the code identifier in the type names of the site components it generates.

Your app is ready to work with. Its [files](https://dev.wix.com/docs/wix-cli/cli-for-apps/project-structure/about-the-app-project-structure.md) are in the folder you chose, and the app appears in your [Wix app dashboard](https://manage.wix.com/account/custom-apps). It isn't installed on a site yet. In the next steps, you run the app on a development site, see your code changes in the browser, and call a Wix API.

## Step 2 | Set up the development environment

1. Open your project folder in your IDE.

2. Open a terminal in your project folder, for example your IDE's built-in terminal.

3. Run the [`dev`](https://dev.wix.com/docs/wix-cli/cli-for-apps/command-reference/project-commands/dev.md) command to start the local development environment:

    ```bash
    wix app dev
    ```

    Your app needs a [development site](https://dev.wix.com/docs/build-apps/develop-your-app/development-sites/about-development-sites.md) to run on. The first time you run `wix app dev`, the CLI tells you that you don't have a development site.

    > **Note:** In a non-interactive environment, set a development site before you run `wix app dev`. Run [`wix app dev-site select <site-id>`](https://dev.wix.com/docs/wix-cli/cli-for-apps/command-reference/project-commands/dev-site.md) or `wix app dev-site create --select`. Each command prints an install URL and waits up to 2 minutes for you to install the app in a browser.

4. Press `Enter` to open the app installation page in your browser.

5. In your browser, select one of your development sites. To create a new one, click **Create Dev Site** and follow the steps in the **Create a development site** window.

6. Click **Test App** to install the app on the site.

    The CLI saves the site as your app's development site and prints links to view your app on the site, in the editor, and in the dashboard. To switch to a different development site later, press `C` while `wix app dev` is running.

## Step 3 | Test the app

While `wix app dev` is running, you can see your code changes in the browser. For example, change your page's title:

1. In the terminal where `wix app dev` is running, click the **Dashboard** link. Your development site's dashboard opens in your browser.

2. In the dashboard's sidebar, hover over **Apps** and click **My Page**. Your app's dashboard page opens.

    ![Select app page](https://wixmp-833713b177cebf373f611808.wixmp.com/images/f9783416870ccb08e4f1f2410d299195.png)

3. In your IDE, open `src/extensions/dashboard/pages/my-page/my-page.tsx`, change the `title` prop in `<Page.Header>` to any value you like, and save the file.

4. In your browser, check that the title at the top of the page shows the value you set.

## Step 4 | (Optional) Call a Wix API

Call the [List Locations](https://dev.wix.com/docs/api-reference/business-management/locations/list-locations?apiView=SDK.md) method from your app's dashboard page to show the site's business locations.

1. Add the **Read Locations** [permission](https://dev.wix.com/docs/build-apps/develop-your-app/auth/permissions/configure-permissions-for-your-app.md) to your app:

    1. In your app dashboard, go to the [**Permissions**](https://manage.wix.com/app-selector?title=Select+an+App&primaryButtonText=Select+Site&actionUrl=https%3A%2F%2Fdev.wix.com%2Fapps%2F%7BappId%7D%2Fdev-center-permissions) page and click **Add Permissions**.
    2. Search for the Read Locations scope ID, `SCOPE.DC-MULTILOCATION.READ-LOCATIONS`. Select it, and click **Save**.

    > **Note:** After you save permission changes in the app dashboard, they apply automatically to a development site. You don't need to build or release a new app version, but it may take a few minutes for the updated permissions to take effect.

2. Open a second terminal in your project folder, for example by splitting your IDE's terminal. Keep `wix app dev` running in the first terminal.

3. In the second terminal, install the `@wix/business-tools` package so you can work with the [Locations API](https://dev.wix.com/docs/api-reference/business-management/locations/introduction?apiView=SDK.md):

    ```bash
    npm install @wix/business-tools
    ```

4. Replace the code in `src/extensions/dashboard/pages/my-page/my-page.tsx` with the following, and save the file:

    ```tsx
    import type { FC } from 'react';
    import { useState, useEffect } from 'react';
    import { EmptyState, Page, WixDesignSystemProvider } from '@wix/design-system';
    import '@wix/design-system/styles.global.css';
    import { locations } from '@wix/business-tools';

    const DashboardPage: FC = () => {
        const { listLocations } = locations;
        const [locationNames, setLocationNames] = useState('');

        useEffect(() => {
        listLocations().then(response => {
            if (response.locations) {
            const names = response.locations.map(location => location.name).join('\n');
            setLocationNames(names);
            }
        }).catch(() => {
            setLocationNames("Couldn't load the locations. If you just added the permission, wait a few minutes and reload the page.");
        });
        }, []);

        return (
        <WixDesignSystemProvider features={{ newColorsBranding: true }}>
            <Page>
            <Page.Header
                title="Page"
                subtitle="This is a subtitle for your page"
            />
            <Page.Content>
                <EmptyState
                title="Locations List"
                subtitle={locationNames || "Loading locations..."}
                skin="page"
                />
            </Page.Content>
            </Page>
        </WixDesignSystemProvider>
        );
    };

    export default DashboardPage;
    ```

    <!-- > **Note:** Some API calls may require [elevated permissions](https://dev.wix.com/docs/overview/auth-permissions/elevation.md). -->

5. In your browser, check that your app's page lists the site's business locations.

    ![Locations app page](https://wixmp-833713b177cebf373f611808.wixmp.com/images/055ebb8ea69b636a47e87d9e50a2b5af.png)

## Next steps

You now have a Wix app running on a development site. Next, you can:

+ [Add extensions to your app](https://dev.wix.com/docs/build-apps/develop-your-app/develop-an-app-with-the-cli/supported-extensions/about-extensions-in-the-wix-cli.md)
+ [Build and release your app](https://dev.wix.com/docs/build-apps/develop-your-app/develop-an-app-with-the-cli/project-development/build-and-deploy.md)
+ [Follow a tutorial](https://dev.wix.com/docs/build-apps/get-started/tutorials/index-of-tutorials.md) that builds a complete app with the CLI
+ [Learn more about the Wix CLI for Apps](https://dev.wix.com/docs/wix-cli/cli-for-apps/about-the-wix-cli-for-apps.md)
+ [Install the Wix Plugin](https://dev.wix.com/docs/api-reference/articles/ai-tools/about-the-wix-plugin.md) so your IDE's AI assistant can help you build Wix apps