Step 2: Applying the Resources in Configuration as Code

Plugins can be configured on an account using the Yext CLI. More information about how to use the Yext CLI can be found in the Getting Started with the CLI guide.

Let’s look at a specific example. If you want to make a Plugin resource with a function to convert a string to uppercase, you can accomplish this by defining the following files:


    "$id": "UppercasePlugin",
    "$schema": ""


export function fn(a: string) {
    return `${a.toUpperCase()}`;

Once these resources are defined, you can run the following apply command:

yext resources apply ~/path/to/directory

Once you apply this new resource, a Plugin will be instantiated with the provided ID.