Skip to content
Docs
 

Using Global Config with DevCycle

This guide will help you get started with using Vercel's DevCycle integration with Global Config. This integration allows you to use Global Config as a configuration source for your DevCycle feature flags.

The DevCycle Global Config integration is available in Beta on all plans

DevCycle is a feature management platform designed for developers. DevCycle allows you to work with feature flags more naturally, where you write code, so you can deliver better features, faster.

With DevCycle and Vercel Global Config the decision logic for your features lives with your hosted site, so you can run your feature rollouts or experiments with ultra-low latency.

Before using this integration, you should have:

  1. The latest version of Vercel CLI. To check your version, use vercel --version. To install or update Vercel CLI, use:
    Terminal
    pnpm i -g vercel@latest
    Terminal
    yarn global add vercel@latest
    Terminal
    npm i -g vercel@latest
    Terminal
    bun add -g vercel@latest
  2. A project. If you don't have one, you can run the following terminal commands to create a Next.js project:
Terminal
pnpm create next-app@latest 
Terminal
yarn create next-app@latest 
Terminal
npx create-next-app@latest 
Terminal
bunx create-next-app@latest 
  1. A Vercel project. If you don't have one, see Creating a Project
  2. A Global Config. If you don't have one, follow the Global Config quickstart
  3. The Global Config SDK:
    Terminal
    pnpm i @vercel/global-config
    Terminal
    yarn add @vercel/global-config
    Terminal
    npm i @vercel/global-config
    Terminal
    bun add @vercel/global-config
  1. Visit the DevCycle page in the Integration Marketplace and select the Add Integration button. From the modal that opens:

    1. Select your Vercel team and project.
    2. Continue and log into DevCycle.
    3. Select the DevCycle Organization and Project you want to use with Vercel Global Config.
    4. Connect your DevCycle project to an existing or new Global Config store.
    5. Click Finish Setup.
  2. Terminal
    pnpm i @devcycle/vercel-edge-config @vercel/global-config
    Terminal
    yarn add @devcycle/vercel-edge-config @vercel/global-config
    Terminal
    npm i @devcycle/vercel-edge-config @vercel/global-config
    Terminal
    bun add @devcycle/vercel-edge-config @vercel/global-config
  3. For more information on DevCycle Next.js SDK usage, see the DevCycle docs.

    app/index.tsx
    import { createClient } from '@vercel/global-config';
    import { EdgeConfigSource } from '@devcycle/vercel-edge-config';
    import { setupDevCycle } from '@devcycle/nextjs-sdk/server';
     
    const edgeClient = createClient(process.env.GLOBAL_CONFIG ?? '');
    const edgeConfigSource = new EdgeConfigSource(edgeClient);
     
    export const { getVariableValue, getClientContext } = setupDevCycle({
      serverSDKKey: process.env.DEVCYCLE_SERVER_SDK_KEY ?? '',
      clientSDKKey: process.env.NEXT_PUBLIC_DEVCYCLE_CLIENT_SDK_KEY ?? '',
      userGetter: () => ({ user_id: 'test_user' }),
      options: {
        // pass the configSource option with the instance of EdgeConfigSource
        configSource: edgeConfigSource,
      },
    });
    app/index.jsx
    import { createClient } from '@vercel/global-config';
    import { EdgeConfigSource } from '@devcycle/vercel-edge-config';
    import { setupDevCycle } from '@devcycle/nextjs-sdk/server';
     
    const edgeClient = createClient(process.env.GLOBAL_CONFIG ?? '');
    const edgeConfigSource = new EdgeConfigSource(edgeClient);
     
    export const { getVariableValue, getClientContext } = setupDevCycle({
      serverSDKKey: process.env.DEVCYCLE_SERVER_SDK_KEY ?? '',
      clientSDKKey: process.env.NEXT_PUBLIC_DEVCYCLE_CLIENT_SDK_KEY ?? '',
      userGetter: () => ({ user_id: 'test_user' }),
      options: {
        // pass the configSource option with the instance of EdgeConfigSource
        configSource: edgeConfigSource,
      },
    });
    pages/index.tsx
    import type { GetServerSideProps } from 'next';
    import { createClient } from '@vercel/global-config';
    import { EdgeConfigSource } from '@devcycle/vercel-edge-config';
    import { getServerSideDevCycle } from '@devcycle/nextjs-sdk/pages';
     
    const edgeClient = createClient(process.env.GLOBAL_CONFIG ?? '');
    const edgeConfigSource = new EdgeConfigSource(edgeClient);
     
    export const getServerSideProps: GetServerSideProps = async (context) => {
      const user = {
        user_id: 'server-user',
      };
     
      return {
        props: {
          ...(await getServerSideDevCycle({
            serverSDKKey: process.env.DEVCYCLE_SERVER_SDK_KEY ?? '',
            clientSDKKey: process.env.NEXT_PUBLIC_DEVCYCLE_CLIENT_SDK_KEY ?? '',
            user,
            context,
            options: {
              // pass the configSource option with the instance of EdgeConfigSource
              configSource: edgeConfigSource,
            },
          })),
        },
      };
    };
    pages/index.jsx
    import { createClient } from '@vercel/global-config';
    import { EdgeConfigSource } from '@devcycle/vercel-edge-config';
    import { getServerSideDevCycle } from '@devcycle/nextjs-sdk/pages';
     
    const edgeClient = createClient(process.env.GLOBAL_CONFIG ?? '');
    const edgeConfigSource = new EdgeConfigSource(edgeClient);
     
    export const getServerSideProps = async (context) => {
      const user = {
        user_id: 'server-user',
      };
     
      return {
        props: {
          ...(await getServerSideDevCycle({
            serverSDKKey: process.env.DEVCYCLE_SERVER_SDK_KEY ?? '',
            clientSDKKey: process.env.NEXT_PUBLIC_DEVCYCLE_CLIENT_SDK_KEY ?? '',
            user,
            context,
            options: {
              // pass the configSource option with the instance of EdgeConfigSource
              configSource: edgeConfigSource,
            },
          })),
        },
      };
    };
    index.tsx
    import { createClient } from '@vercel/global-config';
    import { EdgeConfigSource } from '@devcycle/vercel-edge-config';
    import { initializeDevCycle } from '@devcycle/nodejs-server-sdk';
     
    // the GLOBAL_CONFIG environment variable contains a connection string for a particular global config. It is set automatically
    // when you connect a global config to a project in Vercel.
    const edgeClient = createClient(process.env.GLOBAL_CONFIG);
    const edgeConfigSource = new EdgeConfigSource(edgeClient);
     
    const devcycleClient = initializeDevCycle(
      process.env.DEVCYCLE_SERVER_SDK_KEY,
      // pass the edgeConfigSource as the "configSource" option during SDK intialization to tell the SDK to use Global Config
      // for retrieving its configuration
      { configSource: edgeConfigSource },
    );
    index.jsx
    import { createClient } from '@vercel/global-config';
    import { EdgeConfigSource } from '@devcycle/vercel-edge-config';
    import { initializeDevCycle } from '@devcycle/nodejs-server-sdk';
     
    // the GLOBAL_CONFIG environment variable contains a connection string for a particular global config. It is set automatically
    // when you connect a global config to a project in Vercel.
    const edgeClient = createClient(process.env.GLOBAL_CONFIG);
    const edgeConfigSource = new EdgeConfigSource(edgeClient);
     
    const devcycleClient = initializeDevCycle(
      process.env.DEVCYCLE_SERVER_SDK_KEY,
      // pass the edgeConfigSource as the "configSource" option during SDK intialization to tell the SDK to use Global Config
      // for retrieving its configuration
      { configSource: edgeConfigSource },
    );

Now that you have the DevCycle Global Config integration set up, you can explore the following topics to learn more:

Last updated August 11, 2026

Was this helpful?

supported.