Getting Started

Using Vexilla is a fairly easy process. There are a few steps to take care of before you are up and running, though.

You will need to use the App to set up your flags. You will also be responsible for hosting the JSON file anywhere that your application can access it. This means you can have it on any public file server, a CDN, or even privately hosted in a VPC.

Head over to the application and start creating your Flag Groups, Environments, and Flags. For more information about how to use the app, see the guide.

LanguageSourceRepository
ElixirGitHubhex.pm
JS/TSGitHubnpmjs.com
RustGitHubcrates.io

We are working on publishing more SDKs for the languages you use. If you want to suggest one that we don't have yet, please feel free to chime in over on this issue.

The first step is to install an SDK into your application. Vexilla supports many languages as first-party solutions. Just copy and paste this install command into your terminal and run it.

npm install @vexilla/client
// or
yarn add @vexilla/client
// or
pnpm add @vexilla/client

Vexilla is also open to third-party integrations. If you would like help in creating one, please check the documentation on GitHub. [TODO]

No third-party integrations found, yet.

Once your SDK is installed, you can begin using the client in your app.

const client = new VexillaClient({
  // The base URL can be anywhere you host the JSON files, even an internal network
  baseUrl: "https://BUCKET_NAME.s3-website-AWS_REGION.amazonaws.com",
  environment: "YOUR_ENVIRONMENT",
  customInstanceHash: "YOUR_USERS_ID",
});

// Sync the manifest so the client can fetch flags
await client.syncManifest((url) => {
  return fetch(url).then((response) => response.json());
});

// Sync the flags into the client's cache
await client.syncFlags("FLAG_GROUP_NAME_OR_ID", (url) => {
  return fetch(url).then((response) => response.json());
});

After the client is set up, you can start using it in your application logic.

if (client.should("GROUP_NAME_OR_ID", "FLAG_NAME_OR_ID")) {
  // do something
}

Take a look through the guides provided.