> For AI agents: the complete documentation index is available at /next/llms.txt, the full documentation bundle is available at /next/llms-full.txt.

# Interface: CreateRspeedyOptions

The options of `createRspeedy` method.

## Properties

### callerName?

> `optional` **callerName?**: `string`

The name of the framework or tool that is currently invoking Rsbuild.
This allows plugins to tailor their behavior based on the calling context.

#### Example

Rsbuild plugins can access this value via `api.context.callerName`.

```js
export function myPlugin() {
  return {
    name: 'my-plugin',
    setup(api) {
      // Log the name of the tool invoking Rsbuild
      console.log(`Called by: ${api.context.callerName}`);

      // Conditionally apply plugin logic based on caller
      if (api.context.callerName === 'rspeedy') {
        api.modifyRsbuildConfig((config) => {
          // Apply rspeedy-specific config changes
          return config;
        });
      } else if (api.context.callerName === 'rslib') {
        api.modifyRsbuildConfig((config) => {
          // Apply rslib-specific config changes
          return config;
        });
      }
    }
  };
}
```

#### Default Value

```ts
'rspeedy'
```

***

### cwd?

> `optional` **cwd?**: `string`

The root path of the current build.

***

### environment?

> `optional` **environment?**: `string`\[]

Only build specified environments.
For example, passing `['lynx']` will only build the `lynx` environment.
If not specified or passing an empty array, all environments will be built.

#### See

[https://rsbuild.rs/guide/advanced/environments#build-specified-environment](https://rsbuild.rs/guide/advanced/environments#build-specified-environment)

#### Default Value

```ts
[]
```

***

### loadEnv?

> `optional` **loadEnv?**: `boolean` | `LoadEnvOptions`

Rspeedy automatically loads the .env file by default, utilizing the [Rsbuild API](https://rsbuild.rs/api/javascript-api/core#load-env-variables).
You can use the environment variables defined in the .env file within your code by accessing them via `import.meta.env.FOO` or `process.env.Foo`.

#### See

[https://rsbuild.rs/guide/advanced/env-vars#env-file](https://rsbuild.rs/guide/advanced/env-vars#env-file)

#### Default Value

```ts
true
```

***

### rspeedyConfig?

> `optional` **rspeedyConfig?**: [`Config`](/next/api/packages/rspeedy/interfaces/Config.md)

The config of Rspeedy.
