Skip to content

defineConfig ​

Function, in @jr2/orchestrator/src/config.ts. It is an export of @jr2/orchestrator, on the Authoring surface page, in Config.

ts
function defineConfig(c: JR2Config): JR2Config

Declare the config of an Instance: the default export of jr2.config.ts. It gives back the object that you pass. Its only work is to check that object against JR2Config where you write it, at every depth, a misspelled key included. jr2 up typechecks the file before it converges.

Parameters

  • c: The Instance's config. See JR2Config for every field.

Returns: The same object.

Example

ts
import { defineConfig } from "@jr2/orchestrator";

export default defineConfig({
  name: "my-instance",
  secrets: [{ name: "ANTHROPIC_API_KEY", value: process.env.ANTHROPIC_API_KEY }],
  git: { credentials: [{ match: "github.com/you/", token: "GITHUB_TOKEN" }] },
});

See also

The docs of Kit version 0.5.1. Each page is also at its .md URL.