---
title: Add per-installation Runtime Configuration
description: Validate global and project JSON with a Configuration Author-owned Standard Schema and use its typed output in Context.
sidebar:
  label: Runtime config
---

Runtime Configuration changes one installation without creating another Vector Configuration. The Vector Configuration owns the Standard Schema that interprets those JSON values.

This guide extends the project-summary example with a configurable audience.

1. **Install a Standard Schema library**

    Add Zod for the schema used in this example. Vector does not install it for the Configuration Package.

    ```sh title="Terminal"
    pnpm add zod
    ```

2. **Declare Runtime Configuration**

    Pass `runtimeConfig` to `createVectorBuilder()` and use that builder for the Vector Configuration and its extensions.

    ```ts title="src/opencode.ts"
    import { createVectorBuilder } from '@evilkiwi/vector';
    import * as z from 'zod';

    const RuntimeConfig = z.object({
      audience: z.string().default('the team'),
    });

    const vector = createVectorBuilder({
      runtimeConfig: {
        slug: 'project-tools',
        schema: RuntimeConfig,
      },
    });

    const projectSummary = vector.defineCommand({
      name: 'project-summary',
      build: (context) => ({
        template: `Summarize ${context.project.canonical} for ${context.runtimeConfig.audience}`,
      }),
    });

    export default vector.defineVector({
      id: 'project-tools',
      build: () => ({ commands: [projectSummary] }),
    });
    ```

        The schema output determines `context.runtimeConfig` for every helper returned by this builder. Extension helpers do not need a Runtime Configuration generic.

3. **Add a project value**

    Create the project-level JSON file for the `project-tools` slug.

    ```json title=".opencode/project-tools.json"
    {
      "audience": "new contributors"
    }
    ```

        Reload OpenCode and invoke `/project-summary`. The assembled prompt ends with `for new contributors`.

If activation names a read, JSON, or schema failure, correct the named file or schema and reload OpenCode. See [Runtime Configuration](/api/runtime-config) for paths, merge behavior, slug constraints, and failure boundaries.

Next, add derived installation data with [Computed context](/build/computed-context).
