> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://developers.webflow.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://developers.webflow.com/_mcp/server.

# Getting started with DevLink

> Build and deploy a Webflow Cloud app with DevLink

In this guide, you'll use the Webflow CLI to create an Astro or Next.js app, sync a Webflow site's design system with [DevLink](/devlink/reference/overview), and deploy the app to Webflow Cloud.
Use this workflow when you want to scaffold locally and work with exported Webflow styles, variables, and components.
If you already have a Next.js or Astro app, see [Bring your own app](/webflow-cloud/bring-your-own-app).

**Time Estimate:** 30 minutes

**Prerequisites:**

* A Webflow account
* A GitHub account and basic familiarity with GitHub
* Node.js 22.0.0 or higher and `npm` installed

## Getting started with DevLink

### 1. Install the Webflow CLI

In your terminal, run the following command to install the CLI globally:

```bash
npm install -g @webflow/webflow-cli
```

You can run the command `webflow --version` to verify that the CLI installed successfully.

### 2. Create a Webflow site

Create a Webflow site by cloning the [Astral Fund template](https://webflow.com/made-in-webflow/website/astralfund-919afdc1091df68b8dc1347f952a).
This site is pre-configured with styles, variables, and components optimized for Webflow Cloud and DevLink.

1. Open the [Astral Fund template](https://webflow.com/made-in-webflow/website/astralfund-919afdc1091df68b8dc1347f952a).
2. Click **Clone in Webflow** and in the next window click **Create site**.
3. Give the site a name and specify who should have access to it.
   Remember the site's name because you'll need it to connect the Webflow Cloud application to it.
   The new site opens in Webflow.
4. Optionally, review the [styles](https://help.webflow.com/hc/en-us/articles/33961362040723-Style-panel-overview), [variables](https://help.webflow.com/hc/en-us/articles/33961268146323-Variables), and [components](https://help.webflow.com/hc/en-us/articles/33961303934611-Components-overview) included in the site.
   You will export these styles and components to your new app in the following steps.

The template site looks like this:

<img src="https://fdr-prod-docs-files-public.s3.us-east-1.amazonaws.com/https%3A//webflow.docs.buildwithfern.com/91708b33e8f975a03d72eafa153c7ec0caf1804aec693b43e86944b652f97e02/products/webflow-cloud/pages/introduction/assets/astralfund.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=AKIA6KXJSKKNFOCF7G4B%2F20260727%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20260727T005859Z&X-Amz-Expires=604800&X-Amz-Signature=c8b869097dfe7411cb5515cd09ef9ea8c68dfb23571cef4728d45ff06c0cab74&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject" alt="Webflow site" />

### 3. Create an app

In these steps, you use the Webflow CLI to create an Astro or Next.js application.
The CLI generates an app scaffold that's synced with your Webflow site's design system through [DevLink](/devlink/reference/overview).

The following steps walk you through this CLI setup:

<img src="https://fdr-prod-docs-files-public.s3.us-east-1.amazonaws.com/https%3A//webflow.docs.buildwithfern.com/0303fa14075c25c3a2fa083cbb2de654fb6f9d09d646311cf9b2cd73b2b9bdd6/products/webflow-cloud/pages/introduction/assets/webflow-cli.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=AKIA6KXJSKKNFOCF7G4B%2F20260727%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20260727T005859Z&X-Amz-Expires=604800&X-Amz-Signature=b76e817289fdbd4778ac3771b0937a540f251a31c96a7edfe2dec022406c56bb&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject" alt="Webflow CLI" />

1. Start creating the app by running this command:

   ```bash
   webflow cloud init
   ```

2. At the **Where do you want to deploy this app?** prompt, select **Existing site**.

   The default option is **New domain**, which creates a standalone app that is not attached to any Webflow site. For this guide, choose **Existing site** so the app can use components from the site you cloned in the previous step.

3. At the **Which framework would you like to use?** prompt, select **astro** or **nextjs**.

4. At the **What would you like to name your app?** prompt, enter a name such as `my-webflow-cloud-app`.

5. At the **What path do you want to use locally?** prompt, enter the mount path for the application (default: `/app`).
   For example, if you specify the mount path `/app`, Webflow Cloud hosts the application at `mysite.webflow.io/app`, where `mysite.webflow.io` is the URL of the Webflow site.

6. If you are not already authenticated, the CLI opens a browser window for you to log in to Webflow. After you grant access, return to your terminal.

7. At the **Search for a Webflow site:** prompt, search for and select the template site that you cloned in the previous section.
   The CLI then scaffolds the app and syncs the site's components into it via DevLink.

   If your workspace has only one Webflow site, the CLI skips this prompt and uses that site automatically.

8. Push the app to a GitHub repository.
   For more information, see [Adding locally hosted code to GitHub](https://docs.github.com/en/migrations/importing-source-code/using-the-command-line-to-import-source-code/adding-locally-hosted-code-to-github).

#### Run this step non-interactively (for CI/CD)

You can skip all prompts by passing the required flags up front. See the [`webflow cloud init` reference](/cli/command-reference#cloud-init) for the full list of options.

```bash
webflow cloud init \
  --no-input \
  -n my-webflow-cloud-app \
  -f astro \
  -m /app \
  -s <YOUR_SITE_ID>
```

In the next section, you add the application as a Webflow Cloud app as part of the site.

### 4. Create a Webflow Cloud app and environment

Webflow Cloud apps can be part of a site or independent apps in your Workspace.
Because this application contains components from the site you created, these steps cover creating an app as part of the site.
Then, you configure the app to deploy updates automatically.

<img src="https://fdr-prod-docs-files-public.s3.us-east-1.amazonaws.com/https%3A//webflow.docs.buildwithfern.com/f349396b97fbcd8de4691b6350fea896df1fef56a3c8dc7e0307119b9f38bf63/products/webflow-cloud/pages/introduction/assets/app-setup.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=AKIA6KXJSKKNFOCF7G4B%2F20260727%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20260727T005859Z&X-Amz-Expires=604800&X-Amz-Signature=670c5361d7e275886b38c9ed097848311992f11c9a1fe8689cfd6c4f5a4a9b47&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject" alt="Webflow Cloud app creation" />

1. In Webflow, navigate to your site's settings and select **Webflow Cloud** from the sidebar.

2. If Webflow is not yet connected to your GitHub account, click **Login to GitHub** to connect your GitHub account and then click **Install GitHub app**.
   Follow the instructions to enable Webflow Cloud to access your GitHub repositories.

3. Click **New project > Create app**.

4. Expand **Import a GitHub repository** and select your GitHub organization and repository.

5. Specify a name for the Webflow Cloud app, the branch to deploy, and the path to deploy the application to.
   You can deploy other branches to other paths later, such as if you want to have separate staging and production environments.

6. Click **Deploy** and wait for Webflow to import the repository and set up the Webflow Cloud app.

   The new app appears in the **Webflow Cloud** section of the site's settings, as in this example:

   <img src="https://fdr-prod-docs-files-public.s3.us-east-1.amazonaws.com/https%3A//webflow.docs.buildwithfern.com/0dac40169a599cbe26aa491c191f74128bdd675b63d3dfe3f772cfe056c4960b/products/webflow-cloud/pages/introduction/assets/getting-started-app.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=AKIA6KXJSKKNFOCF7G4B%2F20260727%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20260727T005859Z&X-Amz-Expires=604800&X-Amz-Signature=97719ba5999c889d263e7b8622f14b0204b2aa439715346bbe8932d001cc288d&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject" alt="The new app in the site's Webflow Cloud settings" />

   The app also has an environment that is based on the branch and path that you specified when you created the app.
   To see it, click the app's name in the **Name** column.
   The environment looks like this, showing the name of the environment and the history of builds and deployments:

   <img src="https://fdr-prod-docs-files-public.s3.us-east-1.amazonaws.com/https%3A//webflow.docs.buildwithfern.com/8d9bd42c9f2a30cee70acfa49271584b4fb78ec6b26a52e5f9ed6035d8746690/products/webflow-cloud/pages/introduction/assets/getting-started-environment.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=AKIA6KXJSKKNFOCF7G4B%2F20260727%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20260727T005859Z&X-Amz-Expires=604800&X-Amz-Signature=a7367f521def9f8acfad620b9fb79b935ee196b97d4a6fba6d337ba253a2ccbc&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject" alt="The new environment" />

7. If you have not published the site yet, publish it now by going to the **General** settings page and clicking **Publish**.

8. View the deployed app by opening its environment in the Webflow Cloud settings and clicking its link under **Environment URL**.
   Note that the URL includes the deployment path.

Now the application is deployed and updates automatically when you update the repository.

Deployments may take up to 2 minutes to complete.
You can view the status of deployments and build logs on the environment page.

### 5. Add your Webflow design system to your Webflow Cloud app

The `webflow cloud init` command added several things to the application in the `/webflow` folder via DevLink, including:

* The site's global styles
* Assets synced from the site
* Foundational React components that Webflow sites use

For more information on what DevLink exports from sites into applications, see [What's exported](/devlink/docs/component-export/whats-exported).

To use these exported styles and components, you must import them in the app by adding the [`DevLinkProvider`](/devlink/docs/component-export/whats-exported#devlinkprovider) component to manage Webflow interactions in your app's layout files.
The `webflow cloud init` command automatically added this component to the application, as in these examples:

#### Next.js

If you created a Next.js app, the `src/app/layout.tsx` file wraps the content of the application in the `DevLinkProvider` component, as in this example:

```tsx
import type { Metadata } from "next";
import { Geist, Geist_Mono, Inter } from "next/font/google";
import "./globals.css";
import { DevLinkProvider } from "../../../../webflow/DevLinkProvider";

const inter = Inter({
  subsets: ["latin"],
  variable: "--font-inter",
});

const geistSans = Geist({
  variable: "--font-geist-sans",
  subsets: ["latin"],
});

const geistMono = Geist_Mono({
  variable: "--font-geist-mono",
  subsets: ["latin"],
});

export const metadata: Metadata = {
  title: "Create Next App",
  description: "Generated by create next app",
};

export default function RootLayout({
  children,
}: Readonly<{
  children: React.ReactNode;
}>) {
  return (
    <html lang="en">
      <body
        className={`${geistSans.variable} ${geistMono.variable} ${inter.variable} antialiased`}
      >
        <DevLinkProvider>
          {/* Add here any Navbar or Header you want to be present on all pages */}
          {children}
          {/* Add here any Footer you want to be present on all pages */}
        </DevLinkProvider>
      </body>
    </html>
  );
}
```

#### Astro

If you created an Astro app, the `src/layouts/Layout.astro` file wraps the content of the application in the `DevLinkProvider` component, as in this example:

```astro title="src/layouts/Layout.astro"
---
import { DevLinkProvider } from '../../webflow/DevLinkProvider.js';
import "../../webflow/css/global.css"; // Webflow Styles
---

<!doctype html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width" />
    <link rel="icon" type="image/svg+xml" href={`${import.meta.env.BASE_URL}/favicon.svg`} />
    <link rel="preconnect" href="https://fonts.googleapis.com">
    <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
    <link href="https://fonts.googleapis.com/css2?family=Inter:wght@100..900&display=swap" rel="stylesheet">
    <meta name="generator" content={Astro.generator} />
    <title>Webflow Cloud - Astro Starter</title>
  </head>
  <body>
    <DevLinkProvider client:load>
      <slot />
    </DevLinkProvider>
  </body>
</html>

<style>
  html,
  body {
    margin: 0;
    width: 100%;
    height: 100%;
  }
</style>
```

Follow the steps for your application platform:

#### Astro

#### Install dependencies and run your app locally

Run the following commands in your terminal:

```bash
npm install
npm run dev
```

Currently, Webflow Cloud only supports using the `npm` package manager.

#### Add Webflow components to your Astro app

In the `pages` directory, update `index.astro` to include the `Navbar` and `Footer` components from the `webflow` folder in the root of your app.
This example imports the components and includes them within the page structure:

```typescript title="index.astro" maxLines={15}
---
import Layout from '../layouts/Layout.astro';
import { Navbar } from '@webflow/Navbar'; // Import the Navbar component
import { Footer } from '@webflow/Footer'; // Import the Footer component
---

<Layout>
  <Navbar
      navbarLinkFeatures="Hello"
      navbarLinkProducts="Webflow"
      navbarLinkResources="Cloud"
      navbarLinkContact=""
  client:load />
  <Section
    client:load
    tag="section"
    className="margin-bottom-24px"
    style={{
      minHeight: '100vh',
      display: 'flex',
      alignItems: 'center',
      justifyContent: 'center'
    }}
  >
    <Container>
      <Block
        tag="div"
        className="hero-split"
        style={{
          textAlign: 'center',
          maxWidth: '600px',
          margin: '0 auto'
        }}
      >
        <h1 class="margin-bottom-24px">Welcome to Webflow Cloud</h1>
        <p class="margin-bottom-24px">This is a simple test using Basic components with enhanced styling.</p>
        <div>
          <Link
            button={true}
            options={{
              href: "#"
            }}
            className="button-primary"
          >
            Get Started
          </Link>
        </div>
      </Block>
    </Container>
  </Section>
  <Footer client:load /> 
</Layout>

<style>
  h1 {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(83.21deg, #3245ff 0%, #bc52ee 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
  }
</style>
```

You may need to add the `@webflow` alias to the `tsconfig.json` file as in this example:

```json
{
  "extends": "astro/tsconfigs/strict",
  "include": [
    ".astro/types.d.ts",
    "**/*"
  ],
  "exclude": [
    "dist"
  ],
  "compilerOptions": {
    "types": [
      "@cloudflare/workers-types/2023-07-01"
    ],
    "jsx": "react-jsx",
    "jsxImportSource": "react",
    "baseUrl": ".",
    "paths": {
      "@webflow/*": ["webflow/*"]
    }
  }
}
```

Then, add the alias to the `astro.config.mjs` file as in this example:

```typescript
import { defineConfig } from "astro/config";
import { fileURLToPath } from "node:url";

import cloudflare from "@astrojs/cloudflare";

import react from '@astrojs/react';

const webflowAlias = {
  "@webflow": fileURLToPath(new URL("./webflow", import.meta.url)),
};

// https://astro.build/config
export default defineConfig({
  base: "/app",
  output: "server",
  adapter: cloudflare({
    platformProxy: {
      enabled: true
    }
  }),

  integrations: [react()],
  vite: {
    resolve: {
      // Use react-dom/server.edge instead of react-dom/server.browser for React 19.
      // Without this, MessageChannel from node:worker_threads needs to be polyfilled.
      alias: import.meta.env.PROD
        ? { ...webflowAlias, "react-dom/server": "react-dom/server.edge" }
        : webflowAlias,
    },
}
});
```

Add the `client:load` directive to each component to indicate that Astro should load this component on the page.

#### Test your changes in a local preview environment

In your terminal, run the following command to start your app in a local preview environment that mimics your Webflow Cloud environment:

```bash
npm run preview
```

#### Next.js

#### Install dependencies and run your app locally

Run the following commands in your terminal:

```bash
npm install
npm run dev
```

Currently, Webflow Cloud only supports using the `npm` package manager.

#### Add Webflow components to your Next.js app

Update `/src/page.tsx` to include the `Navbar` and `Footer` components from the `/webflow` folder.
This example imports the components and includes them within the page structure:

```typescript title="page.tsx" maxLines={15}
"use client";

import "./page.css";

import { Navbar } from "../../../../webflow/Navbar"; // Import the Navbar component
import { Footer } from "../../../../webflow/Footer"; // Import the Footer component

export default function Home() {
  return (
    <>
      <Navbar
        navbarLinkFeatures="Hello"
        navbarLinkProducts="Webflow"
        navbarLinkResources="Cloud"
        navbarLinkContact=""
      />
      <main className="hero-section">
        <div className="hero-content">
          <h1 className="hero-title">Welcome to Webflow Cloud</h1>
          <p className="hero-description">
            Your Next.js app is ready. Start building and sync your Webflow
            components and design system.
          </p>
          <div className="hero-cta">
            <a
              href="https://developers.webflow.com/data-clients/docs/getting-started"
              className="button-primary"
            >
              Get Started
            </a>
          </div>
        </div>
      </main>
      <Footer />
    </>
  );
}
```

#### Test your changes in a local preview environment

In your terminal, run the following command to start your app in a local preview environment that mimics your Webflow Cloud environment:

```bash
npm run preview
```

Now you can create components in the Webflow site, export them, and use them in the application.

## Next steps

Now that you've successfully created and deployed a Webflow Cloud app, here's what you can do next.

#### [Bring your app to Webflow Cloud](/webflow-cloud/bring-your-own-app)

Learn about configuration options to work seamlessly with Webflow Cloud, and add advanced functionality to your new app.

#### [Optimize your workflow](/webflow-cloud/environments)

Learn how to manage environments for different stages of development.

#### [Manage deployments](/webflow-cloud/deployments)

Explore deployment options and Webflow Cloud's CI/CD integration with GitHub to streamline your release process.

#### [Add a SQLite database to your app](/webflow-cloud/add-sqlite)

Add a SQLite database to your app to store and retrieve user data.

## Troubleshooting

#### My build failed

If you're not sure why your build failed, or why there is an error in the CLI, see the log for detailed resolution information.
Some common failure points include:

* Authentication timeout: Run the deployment again
* Build failures: Try building the app locally and checking and sanitizing symbols in app names and files
* Component visibility: Check and resolve import paths

#### I'm seeing a 404 error when I try to access my app

If you have never published your site before, publish it now.
If you don't see the app, check your mount path, confirm that the environment exists, and verify that the latest deployment succeeded.

#### A deployment doesn't start when I push to my GitHub repo

The [Webflow Cloud GitHub App](https://github.com/apps/webflow-cloud/installations/select_target) may not have access to your repository.
To check, go to the **Webflow Cloud** tab in your Webflow site settings and click **Install GitHub app**.
Follow the prompts on GitHub to make sure Webflow has access to read from your repository.
After you grant access, try committing to the branch that Webflow Cloud should be monitoring for deployments in your app.

#### I can't see assets in my app

If the app references assets, you must reference the mount path of your app (such as `/app` → `mysite.webflow.io/app`) to serve them correctly.

#### I need to change my export folder

You can change the directory that components are exported into with the `rootDir` option in `webflow.json`.
For other configuration options, see [Configuration options](/cli/configuration#configuration-options).