---
title: CLI automation API
description: Generated public TypeScript reference for @relkit/cli.
search:
  exclude: true
sidebar:
  icon: braces
---

{/* Generated by apps/docs/scripts/generate.ts. Do not edit. */}

For configuration and examples, read [automation](/docs/modules/cli/automation).

## Public imports

- `@relkit/cli` — 37 exports
- `@relkit/cli/help` — 6 exports
- `@relkit/cli/editor` — 1 exports
- `@relkit/cli/scaffolding` — 156 exports

## All exported APIs

Names link to their complete contracts. Re-exports share their original contract; legacy exports keep their separate identity. Examples link to the API's inline sample, a maintained repository usage, or the shared module walkthrough.

| API                                                                                            | Kind  | Import from                       | Example                                                                                                                                    |
| ---------------------------------------------------------------------------------------------- | ----- | --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
| [acquireDevSessionEffect](/docs/api/cli-api#acquiredevsessioneffect)                           | Value | `@relkit/cli`                     | [Module example](/docs/modules/cli/automation)                                                                                             |
| [ADD_FAILURE_CODES](/docs/api/create-relkit#add_failure_codes)                                 | Value | `@relkit/cli/scaffolding`         | [Source example](https://github.com/rel-kit/relkit/blob/main/packages/cli/tests/scaffolding/dependency-patches-asset.cases.ts#L67)         |
| [ADD_KINDS](/docs/api/create-relkit#add_kinds)                                                 | Value | `@relkit/cli/scaffolding`         | [Module example](/docs/modules/cli/automation)                                                                                             |
| [AddCommandResult](/docs/api/cli-api#addcommandresult-interface)                               | Type  | `@relkit/cli/scaffolding`         | [Module example](/docs/modules/cli/automation)                                                                                             |
| [addFactoryObjectMember](/docs/api/cli-api#addfactoryobjectmember)                             | Value | `@relkit/cli/scaffolding`         | [Source example](https://github.com/rel-kit/relkit/blob/main/tests/generator/project-discovery.edits.cases.ts#L12)                         |
| [AddFailureCode](/docs/api/create-relkit#addfailurecode-type-alias)                            | Type  | `@relkit/cli/scaffolding`         | [Module example](/docs/modules/cli/automation)                                                                                             |
| [AddKind](/docs/api/create-relkit#addkind-type-alias)                                          | Type  | `@relkit/cli/scaffolding`         | [Module example](/docs/modules/cli/automation)                                                                                             |
| [AddRequest](/docs/api/create-relkit#addrequest-type-alias)                                    | Type  | `@relkit/cli/scaffolding`         | [Module example](/docs/modules/cli/automation)                                                                                             |
| [AddRequestBase](/docs/api/create-relkit#addrequestbase-interface)                             | Type  | `@relkit/cli/scaffolding`         | [Module example](/docs/modules/cli/automation)                                                                                             |
| [AddResolution](/docs/api/cli-api#addresolution-class)                                         | Value | `@relkit/cli/scaffolding`         | [Module example](/docs/modules/cli/automation)                                                                                             |
| [addResolutionLive](/docs/api/cli-api#addresolutionlive)                                       | Value | `@relkit/cli/scaffolding`         | [Module example](/docs/modules/cli/automation)                                                                                             |
| [AddResult](/docs/api/create-relkit#addresult-interface)                                       | Type  | `@relkit/cli/scaffolding`         | [Module example](/docs/modules/cli/automation)                                                                                             |
| [AddScaffoldError](/docs/api/create-relkit#addscaffolderror-class)                             | Value | `@relkit/cli/scaffolding`         | [Source example](https://github.com/rel-kit/relkit/blob/main/packages/cli/tests/scaffolding/native-transaction.fixture.ts#L99)             |
| [addSourceExport](/docs/api/cli-api#addsourceexport)                                           | Value | `@relkit/cli/scaffolding`         | [Source example](https://github.com/rel-kit/relkit/blob/main/tests/generator/project-discovery.edits.cases.ts#L86)                         |
| [addSourceImport](/docs/api/cli-api#addsourceimport-1)                                         | Value | `@relkit/cli/scaffolding`         | [Source example](https://github.com/rel-kit/relkit/blob/main/tests/generator/project-discovery.edits.cases.ts#L11)                         |
| [ApplyScaffoldContext](/docs/api/cli-api#applyscaffoldcontext-interface)                       | Type  | `@relkit/cli/scaffolding`         | [Source example](https://github.com/rel-kit/relkit/blob/main/packages/cli/tests/scaffolding/transaction-runner.fixture.ts#L92)             |
| [applyScaffoldPlan](/docs/api/cli-api#applyscaffoldplan)                                       | Value | `@relkit/cli/scaffolding`         | [Source example](https://github.com/rel-kit/relkit/blob/main/packages/cli/tests/scaffolding/dependency-patches-rollback.cases.ts#L26)      |
| [applyScaffoldPlanEffect](/docs/api/cli-api#applyscaffoldplaneffect)                           | Value | `@relkit/cli/scaffolding`         | [Source example](https://github.com/rel-kit/relkit/blob/main/packages/cli/tests/scaffolding/generator-environment.probe.ts#L43)            |
| [assertCreateCapability](/docs/api/create-relkit#assertcreatecapability)                       | Value | `@relkit/cli/scaffolding`         | [Source example](https://github.com/rel-kit/relkit/blob/main/packages/create-relkit/tests/create-capabilities.test.ts#L22)                 |
| [CatalogManifest](/docs/api/create-relkit#catalogmanifest-type-alias)                          | Type  | `@relkit/cli/scaffolding`         | [Module example](/docs/modules/cli/automation)                                                                                             |
| [ChoicePromptOptions](/docs/api/create-relkit#choicepromptoptions-interface)                   | Type  | `@relkit/cli/scaffolding`         | [Module example](/docs/modules/cli/automation)                                                                                             |
| [CLI_EXIT_CODES](/docs/api/cli-api#cli_exit_codes)                                             | Value | `@relkit/cli`                     | [Module example](/docs/modules/cli/automation)                                                                                             |
| [CLI_VERSION](/docs/api/cli-api#cli_version)                                                   | Value | `@relkit/cli`                     | [Module example](/docs/modules/cli/automation)                                                                                             |
| [CliCommandContext](/docs/api/cli-api#clicommandcontext-interface)                             | Type  | `@relkit/cli`                     | [Source example](https://github.com/rel-kit/relkit/blob/main/packages/cli/tests/commands/inspector.test.ts#L53)                            |
| [CliFailure](/docs/api/cli-api#clifailure-type-alias)                                          | Type  | `@relkit/cli`                     | [Module example](/docs/modules/cli/automation)                                                                                             |
| [CliHelpArgument](/docs/api/cli-api#clihelpargument-interface)                                 | Type  | `@relkit/cli`, `@relkit/cli/help` | [Module example](/docs/modules/cli/automation)                                                                                             |
| [CliHelpCommand](/docs/api/cli-api#clihelpcommand-interface)                                   | Type  | `@relkit/cli`, `@relkit/cli/help` | [Module example](/docs/modules/cli/automation)                                                                                             |
| [CliHelpModel](/docs/api/cli-api#clihelpmodel-interface)                                       | Type  | `@relkit/cli`, `@relkit/cli/help` | [Module example](/docs/modules/cli/automation)                                                                                             |
| [CliHelpOption](/docs/api/cli-api#clihelpoption-interface)                                     | Type  | `@relkit/cli`, `@relkit/cli/help` | [Module example](/docs/modules/cli/automation)                                                                                             |
| [CliIo](/docs/api/cli-api#cliio-interface)                                                     | Type  | `@relkit/cli`                     | [Module example](/docs/modules/cli/automation)                                                                                             |
| [CliLogger](/docs/api/cli-api#clilogger-type-alias)                                            | Type  | `@relkit/cli`                     | [Module example](/docs/modules/cli/automation)                                                                                             |
| [CliReporter](/docs/api/cli-api#clireporter-interface)                                         | Type  | `@relkit/cli`                     | [Module example](/docs/modules/cli/automation)                                                                                             |
| [CliRuntime](/docs/api/cli-api#cliruntime-interface)                                           | Type  | `@relkit/cli`                     | [Module example](/docs/modules/cli/automation)                                                                                             |
| [CREATE_CAPABILITY_TABLE](/docs/api/create-relkit#create_capability_table)                     | Value | `@relkit/cli/scaffolding`         | [Source example](https://github.com/rel-kit/relkit/blob/main/packages/create-relkit/tests/create-capabilities.test.ts#L12)                 |
| [CREATE_CLOUDS](/docs/api/create-relkit#create_clouds)                                         | Value | `@relkit/cli/scaffolding`         | [Module example](/docs/modules/cli/automation)                                                                                             |
| [CREATE_DEPLOYMENTS](/docs/api/create-relkit#create_deployments)                               | Value | `@relkit/cli/scaffolding`         | [Module example](/docs/modules/cli/automation)                                                                                             |
| [CREATE_JOBS](/docs/api/create-relkit#create_jobs)                                             | Value | `@relkit/cli/scaffolding`         | [Module example](/docs/modules/cli/automation)                                                                                             |
| [CREATE_OPTION_DEFAULTS](/docs/api/create-relkit#create_option_defaults)                       | Value | `@relkit/cli/scaffolding`         | [Source example](https://github.com/rel-kit/relkit/blob/main/tests/fixtures/inspector/generated-app.ts#L18)                                |
| [CREATE_TEMPLATES](/docs/api/create-relkit#create_templates)                                   | Value | `@relkit/cli/scaffolding`         | [Source example](https://github.com/rel-kit/relkit/blob/main/tests/generator/option-matrix.test.ts#L21)                                    |
| [CreateCapabilityEvidence](/docs/api/create-relkit#createcapabilityevidence-interface)         | Type  | `@relkit/cli/scaffolding`         | [Module example](/docs/modules/cli/automation)                                                                                             |
| [CreateCapabilityIdentity](/docs/api/create-relkit#createcapabilityidentity-interface)         | Type  | `@relkit/cli/scaffolding`         | [Module example](/docs/modules/cli/automation)                                                                                             |
| [CreateCapabilityTuple](/docs/api/create-relkit#createcapabilitytuple-interface)               | Type  | `@relkit/cli/scaffolding`         | [Module example](/docs/modules/cli/automation)                                                                                             |
| [createClackPromptDriver](/docs/api/create-relkit#createclackpromptdriver)                     | Value | `@relkit/cli/scaffolding`         | [Module example](/docs/modules/cli/automation)                                                                                             |
| [CreateCloud](/docs/api/create-relkit#createcloud-type-alias)                                  | Type  | `@relkit/cli/scaffolding`         | [Module example](/docs/modules/cli/automation)                                                                                             |
| [CreateDeployment](/docs/api/create-relkit#createdeployment-type-alias)                        | Type  | `@relkit/cli/scaffolding`         | [Module example](/docs/modules/cli/automation)                                                                                             |
| [createGenerateNextSteps](/docs/api/create-relkit#creategeneratenextsteps)                     | Value | `@relkit/cli/scaffolding`         | [Source example](https://github.com/rel-kit/relkit/blob/main/packages/create-relkit/tests/generation-output.effect.test.ts#L12)            |
| [CreateJobs](/docs/api/create-relkit#createjobs-type-alias)                                    | Type  | `@relkit/cli/scaffolding`         | [Module example](/docs/modules/cli/automation)                                                                                             |
| [CreateOptions](/docs/api/create-relkit#createoptions-interface)                               | Type  | `@relkit/cli/scaffolding`         | [Source example](https://github.com/rel-kit/relkit/blob/main/tests/generator/option-matrix-fixture.ts#L25)                                 |
| [CreateOptionsContext](/docs/api/create-relkit#createoptionscontext-interface)                 | Type  | `@relkit/cli/scaffolding`         | [Module example](/docs/modules/cli/automation)                                                                                             |
| [CreateOptionsError](/docs/api/create-relkit#createoptionserror-class)                         | Value | `@relkit/cli/scaffolding`         | [Module example](/docs/modules/cli/automation)                                                                                             |
| [CreateRelkitGeneratorApi](/docs/api/cli-api#createrelkitgeneratorapi-interface)               | Type  | `@relkit/cli`                     | [Module example](/docs/modules/cli/automation)                                                                                             |
| [createReporter](/docs/api/cli-api#createreporter)                                             | Value | `@relkit/cli`                     | [Module example](/docs/modules/cli/automation)                                                                                             |
| [CreateScaffoldPlan](/docs/api/create-relkit#createscaffoldplan-interface)                     | Type  | `@relkit/cli/scaffolding`         | [Module example](/docs/modules/cli/automation)                                                                                             |
| [CreateTemplate](/docs/api/create-relkit#createtemplate-type-alias)                            | Type  | `@relkit/cli/scaffolding`         | [Module example](/docs/modules/cli/automation)                                                                                             |
| [CreateValidationContext](/docs/api/create-relkit#createvalidationcontext-interface)           | Type  | `@relkit/cli/scaffolding`         | [Module example](/docs/modules/cli/automation)                                                                                             |
| [CreateValidationError](/docs/api/create-relkit#createvalidationerror-class)                   | Value | `@relkit/cli/scaffolding`         | [Module example](/docs/modules/cli/automation)                                                                                             |
| [currentCreateCapabilityIdentity](/docs/api/create-relkit#currentcreatecapabilityidentity)     | Value | `@relkit/cli/scaffolding`         | [Source example](https://github.com/rel-kit/relkit/blob/main/packages/create-relkit/tests/create-capabilities.test.ts#L23)                 |
| [DatabaseDialect](/docs/api/create-relkit#databasedialect-type-alias)                          | Type  | `@relkit/cli/scaffolding`         | [Module example](/docs/modules/cli/automation)                                                                                             |
| [default](/docs/api/cli-api#initialize)                                                        | Value | `@relkit/cli/editor`              | [Module example](/docs/modules/cli/automation)                                                                                             |
| [DependencySection](/docs/api/create-relkit#dependencysection-type-alias)                      | Type  | `@relkit/cli/scaffolding`         | [Module example](/docs/modules/cli/automation)                                                                                             |
| [DevActivationFingerprint](/docs/api/cli-api#devactivationfingerprint-type-alias)              | Type  | `@relkit/cli`                     | [Module example](/docs/modules/cli/automation)                                                                                             |
| [DevLocalServices](/docs/api/cli-api#devlocalservices-interface)                               | Type  | `@relkit/cli`                     | [Module example](/docs/modules/cli/automation)                                                                                             |
| [DevLog](/docs/api/cli-api#devlog-type-alias)                                                  | Type  | `@relkit/cli`                     | [Module example](/docs/modules/cli/automation)                                                                                             |
| [DevLogEvent](/docs/api/cli-api#devlogevent-interface)                                         | Type  | `@relkit/cli`                     | [Source example](https://github.com/rel-kit/relkit/blob/main/packages/cli/tests/commands/dev-ready.test.ts#L9)                             |
| [DevOptions](/docs/api/cli-api#devoptions-interface)                                           | Type  | `@relkit/cli`                     | [Source example](https://github.com/rel-kit/relkit/blob/main/tests/fixtures/cli/dev-fixture.ts#L83)                                        |
| [DevSession](/docs/api/cli-api#devsession-class)                                               | Value | `@relkit/cli`                     | [Source example](https://github.com/rel-kit/relkit/blob/main/packages/cli/tests/services/dev-supervisor.test.ts#L91)                       |
| [DiscoveredArtifact](/docs/api/cli-api#discoveredartifact-interface)                           | Type  | `@relkit/cli/scaffolding`         | [Module example](/docs/modules/cli/automation)                                                                                             |
| [DiscoveredProfile](/docs/api/cli-api#discoveredprofile-interface)                             | Type  | `@relkit/cli/scaffolding`         | [Module example](/docs/modules/cli/automation)                                                                                             |
| [DiscoveredService](/docs/api/cli-api#discoveredservice-interface)                             | Type  | `@relkit/cli/scaffolding`         | [Module example](/docs/modules/cli/automation)                                                                                             |
| [DiscoveredServiceMember](/docs/api/cli-api#discoveredservicemember-interface)                 | Type  | `@relkit/cli/scaffolding`         | [Module example](/docs/modules/cli/automation)                                                                                             |
| [discoverProject](/docs/api/cli-api#discoverproject)                                           | Value | `@relkit/cli/scaffolding`         | [Source example](https://github.com/rel-kit/relkit/blob/main/tests/generator/project-discovery.metadata.cases.ts#L14)                      |
| [discoverProjectEffect](/docs/api/cli-api#discoverprojecteffect)                               | Value | `@relkit/cli/scaffolding`         | [API example](/docs/api/cli-api#discoverprojecteffect)                                                                                     |
| [domainError](/docs/api/create-relkit#domainerror)                                             | Value | `@relkit/cli/scaffolding`         | [Module example](/docs/modules/cli/automation)                                                                                             |
| [domainTry](/docs/api/create-relkit#domaintry)                                                 | Value | `@relkit/cli/scaffolding`         | [Source example](https://github.com/rel-kit/relkit/blob/main/packages/create-relkit/tests/observation.effect.test.ts#L83)                  |
| [errorMessage](/docs/api/cli-api#errormessage)                                                 | Value | `@relkit/cli`                     | [Module example](/docs/modules/cli/automation)                                                                                             |
| [errorMessage](/docs/api/create-relkit#errormessage)                                           | Value | `@relkit/cli/scaffolding`         | [Module example](/docs/modules/cli/automation)                                                                                             |
| [fail](/docs/api/cli-api#fail)                                                                 | Value | `@relkit/cli`                     | [Module example](/docs/modules/cli/automation)                                                                                             |
| [failSignal](/docs/api/cli-api#failsignal)                                                     | Value | `@relkit/cli`                     | [Source example](https://github.com/rel-kit/relkit/blob/main/packages/cli/tests/invocation/signals.test.ts#L86)                            |
| [findCliHelp](/docs/api/cli-api#findclihelp)                                                   | Value | `@relkit/cli`, `@relkit/cli/help` | [Source example](https://github.com/rel-kit/relkit/blob/main/apps/docs/examples/public-api/tooling.ts#L19)                                 |
| [formatAddResult](/docs/api/cli-api#formataddresult)                                           | Value | `@relkit/cli/scaffolding`         | [Module example](/docs/modules/cli/automation)                                                                                             |
| [formatCreatePlan](/docs/api/create-relkit#formatcreateplan)                                   | Value | `@relkit/cli/scaffolding`         | [Module example](/docs/modules/cli/automation)                                                                                             |
| [formatGenerateResult](/docs/api/create-relkit#formatgenerateresult)                           | Value | `@relkit/cli/scaffolding`         | [Source example](https://github.com/rel-kit/relkit/blob/main/packages/create-relkit/tests/generation-output.effect.test.ts#L14)            |
| [formatScaffoldPlan](/docs/api/cli-api#formatscaffoldplan)                                     | Value | `@relkit/cli/scaffolding`         | [Module example](/docs/modules/cli/automation)                                                                                             |
| [GenerateCommandResult](/docs/api/create-relkit#generatecommandresult-interface)               | Type  | `@relkit/cli/scaffolding`         | [Module example](/docs/modules/cli/automation)                                                                                             |
| [GenerateCommandRunner](/docs/api/create-relkit#generatecommandrunner-type-alias)              | Type  | `@relkit/cli/scaffolding`         | [Module example](/docs/modules/cli/automation)                                                                                             |
| [GenerateFailurePoint](/docs/api/create-relkit#generatefailurepoint-type-alias)                | Type  | `@relkit/cli/scaffolding`         | [Source example](https://github.com/rel-kit/relkit/blob/main/tests/generator/failure-cleanup.test.ts#L14)                                  |
| [GenerateNextSteps](/docs/api/create-relkit#generatenextsteps-interface)                       | Type  | `@relkit/cli/scaffolding`         | [Module example](/docs/modules/cli/automation)                                                                                             |
| [generateProject](/docs/api/create-relkit#generateproject)                                     | Value | `@relkit/cli/scaffolding`         | [Source example](https://github.com/rel-kit/relkit/blob/main/packages/create-relkit/tests/dependency-patch-generation.test.ts#L20)         |
| [GenerateProjectContext](/docs/api/create-relkit#generateprojectcontext-interface)             | Type  | `@relkit/cli/scaffolding`         | [Source example](https://github.com/rel-kit/relkit/blob/main/tests/generator/failure-cleanup.test.ts#L101)                                 |
| [generateProjectEffect](/docs/api/create-relkit#generateprojecteffect)                         | Value | `@relkit/cli/scaffolding`         | [Source example](https://github.com/rel-kit/relkit/blob/main/packages/cli/tests/scaffolding/generator-environment.probe.ts#L45)            |
| [GenerateProjectError](/docs/api/create-relkit#generateprojecterror-class)                     | Value | `@relkit/cli/scaffolding`         | [Source example](https://github.com/rel-kit/relkit/blob/main/tests/generator/failure-cleanup.test.ts#L29)                                  |
| [GenerateProjectResult](/docs/api/create-relkit#generateprojectresult-interface)               | Type  | `@relkit/cli/scaffolding`         | [Module example](/docs/modules/cli/automation)                                                                                             |
| [GeneratorCleanupFailure](/docs/api/create-relkit#generatorcleanupfailure-interface)           | Type  | `@relkit/cli/scaffolding`         | [Module example](/docs/modules/cli/automation)                                                                                             |
| [generatorCleanupFailures](/docs/api/create-relkit#generatorcleanupfailures)                   | Value | `@relkit/cli/scaffolding`         | [Source example](https://github.com/rel-kit/relkit/blob/main/packages/cli/tests/scaffolding/transaction-lifecycle.effect.test.ts#L69)      |
| [GeneratorCommandResult](/docs/api/create-relkit#generatorcommandresult-interface)             | Type  | `@relkit/cli/scaffolding`         | [Module example](/docs/modules/cli/automation)                                                                                             |
| [GeneratorCommandRunner](/docs/api/create-relkit#generatorcommandrunner-type-alias)            | Type  | `@relkit/cli/scaffolding`         | [Module example](/docs/modules/cli/automation)                                                                                             |
| [GeneratorDirectoryEntry](/docs/api/create-relkit#generatordirectoryentry-interface)           | Type  | `@relkit/cli/scaffolding`         | [Module example](/docs/modules/cli/automation)                                                                                             |
| [GeneratorDomainError](/docs/api/create-relkit#generatordomainerror-class)                     | Value | `@relkit/cli/scaffolding`         | [Module example](/docs/modules/cli/automation)                                                                                             |
| [GeneratorEntryKind](/docs/api/create-relkit#generatorentrykind-type-alias)                    | Type  | `@relkit/cli/scaffolding`         | [Module example](/docs/modules/cli/automation)                                                                                             |
| [GeneratorFileMetadata](/docs/api/create-relkit#generatorfilemetadata-interface)               | Type  | `@relkit/cli/scaffolding`         | [Module example](/docs/modules/cli/automation)                                                                                             |
| [GeneratorFileSystem](/docs/api/create-relkit#generatorfilesystem-class)                       | Value | `@relkit/cli/scaffolding`         | [API example](/docs/api/create-relkit#generatorfilesystem-class)                                                                           |
| [generatorFileSystemLive](/docs/api/create-relkit#generatorfilesystemlive)                     | Value | `@relkit/cli/scaffolding`         | [Source example](https://github.com/rel-kit/relkit/blob/main/packages/cli/tests/scaffolding/generator-environment.probe.ts#L67)            |
| [GeneratorFileSystemService](/docs/api/create-relkit#generatorfilesystemservice-interface)     | Type  | `@relkit/cli/scaffolding`         | [Source example](https://github.com/rel-kit/relkit/blob/main/packages/cli/tests/scaffolding/generator-services-directories.fixture.ts#L14) |
| [GeneratorIoError](/docs/api/create-relkit#generatorioerror-class)                             | Value | `@relkit/cli/scaffolding`         | [Source example](https://github.com/rel-kit/relkit/blob/main/packages/cli/tests/scaffolding/generator-services.fixture.ts#L51)             |
| [GeneratorPaths](/docs/api/create-relkit#generatorpaths-class)                                 | Value | `@relkit/cli/scaffolding`         | [Source example](https://github.com/rel-kit/relkit/blob/main/packages/cli/tests/contributor/workspace.fixture.ts#L74)                      |
| [generatorPathsLive](/docs/api/create-relkit#generatorpathslive)                               | Value | `@relkit/cli/scaffolding`         | [Source example](https://github.com/rel-kit/relkit/blob/main/packages/cli/tests/scaffolding/generator-environment.probe.ts#L69)            |
| [GeneratorPathsService](/docs/api/create-relkit#generatorpathsservice-interface)               | Type  | `@relkit/cli/scaffolding`         | [Module example](/docs/modules/cli/automation)                                                                                             |
| [GeneratorProcess](/docs/api/create-relkit#generatorprocess-class)                             | Value | `@relkit/cli/scaffolding`         | [API example](/docs/api/create-relkit#generatorprocess-class)                                                                              |
| [GeneratorProcessError](/docs/api/create-relkit#generatorprocesserror-class)                   | Value | `@relkit/cli/scaffolding`         | [Source example](https://github.com/rel-kit/relkit/blob/main/packages/cli/tests/scaffolding/transaction-lifecycle.effect.test.ts#L99)      |
| [generatorProcessLayer](/docs/api/create-relkit#generatorprocesslayer)                         | Value | `@relkit/cli/scaffolding`         | [Module example](/docs/modules/cli/automation)                                                                                             |
| [generatorProcessLive](/docs/api/create-relkit#generatorprocesslive)                           | Value | `@relkit/cli/scaffolding`         | [Source example](https://github.com/rel-kit/relkit/blob/main/packages/cli/tests/scaffolding/generator-environment.probe.ts#L68)            |
| [GeneratorProcessService](/docs/api/create-relkit#generatorprocessservice-interface)           | Type  | `@relkit/cli/scaffolding`         | [Module example](/docs/modules/cli/automation)                                                                                             |
| [GeneratorPrompt](/docs/api/create-relkit#generatorprompt-class)                               | Value | `@relkit/cli/scaffolding`         | [Source example](https://github.com/rel-kit/relkit/blob/main/packages/cli/tests/scaffolding/generator-environment.probe.ts#L48)            |
| [GeneratorPromptError](/docs/api/create-relkit#generatorprompterror-class)                     | Value | `@relkit/cli/scaffolding`         | [Module example](/docs/modules/cli/automation)                                                                                             |
| [generatorPromptLayer](/docs/api/create-relkit#generatorpromptlayer)                           | Value | `@relkit/cli/scaffolding`         | [API example](/docs/api/create-relkit#generatorpromptlayer)                                                                                |
| [GeneratorPromptService](/docs/api/create-relkit#generatorpromptservice-interface)             | Type  | `@relkit/cli/scaffolding`         | [Module example](/docs/modules/cli/automation)                                                                                             |
| [getCliHelpModel](/docs/api/cli-api#getclihelpmodel)                                           | Value | `@relkit/cli`, `@relkit/cli/help` | [Module example](/docs/modules/cli/automation)                                                                                             |
| [hasErrno](/docs/api/create-relkit#haserrno)                                                   | Value | `@relkit/cli/scaffolding`         | [Module example](/docs/modules/cli/automation)                                                                                             |
| [helpPayload](/docs/api/cli-api#helppayload)                                                   | Value | `@relkit/cli`                     | [Module example](/docs/modules/cli/automation)                                                                                             |
| [helpText](/docs/api/cli-api#helptext)                                                         | Value | `@relkit/cli`                     | [Module example](/docs/modules/cli/automation)                                                                                             |
| [installSignals](/docs/api/cli-api#installsignals)                                             | Value | `@relkit/cli`                     | [Source example](https://github.com/rel-kit/relkit/blob/main/packages/cli/tests/invocation/signals.test.ts#L75)                            |
| [isGeneratorApi](/docs/api/cli-api#isgeneratorapi)                                             | Value | `@relkit/cli`                     | [Module example](/docs/modules/cli/automation)                                                                                             |
| [isValidPackageName](/docs/api/create-relkit#isvalidpackagename)                               | Value | `@relkit/cli/scaffolding`         | [Source example](https://github.com/rel-kit/relkit/blob/main/tests/generator/option-matrix-destinations.test.ts#L32)                       |
| [loadCreateRelkit](/docs/api/cli-api#loadcreaterelkit)                                         | Value | `@relkit/cli`                     | [Module example](/docs/modules/cli/automation)                                                                                             |
| [loadCreateRelkitEffect](/docs/api/cli-api#loadcreaterelkiteffect)                             | Value | `@relkit/cli`                     | [Module example](/docs/modules/cli/automation)                                                                                             |
| [main](/docs/api/cli-api#main)                                                                 | Value | `@relkit/cli`                     | [Module example](/docs/modules/cli/automation)                                                                                             |
| [normalizeAddRequest](/docs/api/cli-api#normalizeaddrequest)                                   | Value | `@relkit/cli/scaffolding`         | [Source example](https://github.com/rel-kit/relkit/blob/main/packages/cli/tests/scaffolding/generator-environment.probe.ts#L35)            |
| [normalizeArtifactName](/docs/api/cli-api#normalizeartifactname)                               | Value | `@relkit/cli/scaffolding`         | [Source example](https://github.com/rel-kit/relkit/blob/main/tests/generator/add-options.test.ts#L40)                                      |
| [normalizeCreateOptions](/docs/api/create-relkit#normalizecreateoptions)                       | Value | `@relkit/cli/scaffolding`         | [Source example](https://github.com/rel-kit/relkit/blob/main/apps/docs/examples/public-api/tooling.ts#L9)                                  |
| [NormalizedArtifactName](/docs/api/cli-api#normalizedartifactname-interface)                   | Type  | `@relkit/cli/scaffolding`         | [Module example](/docs/modules/cli/automation)                                                                                             |
| [planAdd](/docs/api/cli-api#planadd)                                                           | Value | `@relkit/cli/scaffolding`         | [Source example](https://github.com/rel-kit/relkit/blob/main/tests/generator/add-acceptance-fixture.ts#L116)                               |
| [planAddEffect](/docs/api/cli-api#planaddeffect)                                               | Value | `@relkit/cli/scaffolding`         | [Source example](https://github.com/rel-kit/relkit/blob/main/packages/cli/tests/scaffolding/generator-environment.probe.ts#L35)            |
| [PlanBuilder](/docs/api/cli-api#planbuilder-class)                                             | Value | `@relkit/cli/scaffolding`         | [Source example](https://github.com/rel-kit/relkit/blob/main/packages/cli/tests/scaffolding/dependency-patches.fixture.ts#L39)             |
| [planCreate](/docs/api/create-relkit#plancreate)                                               | Value | `@relkit/cli/scaffolding`         | [Source example](https://github.com/rel-kit/relkit/blob/main/apps/docs/examples/public-api/tooling.ts#L16)                                 |
| [planCreateEffect](/docs/api/create-relkit#plancreateeffect)                                   | Value | `@relkit/cli/scaffolding`         | [Module example](/docs/modules/cli/automation)                                                                                             |
| [ProjectDiscovery](/docs/api/cli-api#projectdiscovery-interface)                               | Type  | `@relkit/cli/scaffolding`         | [Module example](/docs/modules/cli/automation)                                                                                             |
| [projectDiscoveryLive](/docs/api/cli-api#projectdiscoverylive)                                 | Value | `@relkit/cli/scaffolding`         | [Source example](https://github.com/rel-kit/relkit/blob/main/packages/cli/tests/scaffolding/generator-environment.probe.ts#L32)            |
| [ProjectDiscoveryServiceTag](/docs/api/cli-api#projectdiscoveryservicetag-class)               | Value | `@relkit/cli/scaffolding`         | [Module example](/docs/modules/cli/automation)                                                                                             |
| [ProjectGeneration](/docs/api/create-relkit#projectgeneration-class)                           | Value | `@relkit/cli/scaffolding`         | [Module example](/docs/modules/cli/automation)                                                                                             |
| [projectGenerationLive](/docs/api/create-relkit#projectgenerationlive)                         | Value | `@relkit/cli/scaffolding`         | [Source example](https://github.com/rel-kit/relkit/blob/main/packages/cli/tests/scaffolding/generator-environment.probe.ts#L66)            |
| [PromptDriver](/docs/api/create-relkit#promptdriver-interface)                                 | Type  | `@relkit/cli/scaffolding`         | [Source example](https://github.com/rel-kit/relkit/blob/main/packages/cli/tests/invocation/interaction.test.ts#L14)                        |
| [PromptOption](/docs/api/create-relkit#promptoption-interface)                                 | Type  | `@relkit/cli/scaffolding`         | [Module example](/docs/modules/cli/automation)                                                                                             |
| [publicFailure](/docs/api/create-relkit#publicfailure)                                         | Value | `@relkit/cli/scaffolding`         | [Source example](https://github.com/rel-kit/relkit/blob/main/packages/cli/tests/scaffolding/planning.effect.test.ts#L129)                  |
| [readFactoryObject](/docs/api/cli-api#readfactoryobject)                                       | Value | `@relkit/cli/scaffolding`         | [Module example](/docs/modules/cli/automation)                                                                                             |
| [readFactoryStringProperty](/docs/api/cli-api#readfactorystringproperty)                       | Value | `@relkit/cli/scaffolding`         | [Module example](/docs/modules/cli/automation)                                                                                             |
| [recordCleanupFailure](/docs/api/create-relkit#recordcleanupfailure)                           | Value | `@relkit/cli/scaffolding`         | [Source example](https://github.com/rel-kit/relkit/blob/main/packages/create-relkit/tests/observation.effect.test.ts#L94)                  |
| [renderDatabase](/docs/api/cli-api#renderdatabase)                                             | Value | `@relkit/cli/scaffolding`         | [Module example](/docs/modules/cli/automation)                                                                                             |
| [renderDatabaseEffect](/docs/api/cli-api#renderdatabaseeffect)                                 | Value | `@relkit/cli/scaffolding`         | [Module example](/docs/modules/cli/automation)                                                                                             |
| [RenderedDatabase](/docs/api/cli-api#rendereddatabase-interface)                               | Type  | `@relkit/cli/scaffolding`         | [Module example](/docs/modules/cli/automation)                                                                                             |
| [ResolveAddContext](/docs/api/cli-api#resolveaddcontext-interface)                             | Type  | `@relkit/cli/scaffolding`         | [Module example](/docs/modules/cli/automation)                                                                                             |
| [resolveAddRequest](/docs/api/cli-api#resolveaddrequest)                                       | Value | `@relkit/cli/scaffolding`         | [Module example](/docs/modules/cli/automation)                                                                                             |
| [resolveAddRequestDetails](/docs/api/cli-api#resolveaddrequestdetails)                         | Value | `@relkit/cli/scaffolding`         | [Source example](https://github.com/rel-kit/relkit/blob/main/tests/generator/add-resolver.add.cases.ts#L14)                                |
| [resolveAddRequestDetailsEffect](/docs/api/cli-api#resolveaddrequestdetailseffect)             | Value | `@relkit/cli/scaffolding`         | [Module example](/docs/modules/cli/automation)                                                                                             |
| [resolveCatalogVersion](/docs/api/create-relkit#resolvecatalogversion)                         | Value | `@relkit/cli/scaffolding`         | [Module example](/docs/modules/cli/automation)                                                                                             |
| [ResolveCreateContext](/docs/api/create-relkit#resolvecreatecontext-interface)                 | Type  | `@relkit/cli/scaffolding`         | [Module example](/docs/modules/cli/automation)                                                                                             |
| [resolveCreateDestination](/docs/api/create-relkit#resolvecreatedestination)                   | Value | `@relkit/cli/scaffolding`         | [Module example](/docs/modules/cli/automation)                                                                                             |
| [resolveCreateDestinationEffect](/docs/api/create-relkit#resolvecreatedestinationeffect)       | Value | `@relkit/cli/scaffolding`         | [Module example](/docs/modules/cli/automation)                                                                                             |
| [resolveCreateOptions](/docs/api/create-relkit#resolvecreateoptions)                           | Value | `@relkit/cli/scaffolding`         | [Module example](/docs/modules/cli/automation)                                                                                             |
| [resolveCreateOptionsDetails](/docs/api/create-relkit#resolvecreateoptionsdetails)             | Value | `@relkit/cli/scaffolding`         | [Source example](https://github.com/rel-kit/relkit/blob/main/tests/generator/add-resolver.creation.cases.ts#L32)                           |
| [resolveCreateOptionsDetailsEffect](/docs/api/create-relkit#resolvecreateoptionsdetailseffect) | Value | `@relkit/cli/scaffolding`         | [Module example](/docs/modules/cli/automation)                                                                                             |
| [ResolvedAddRequest](/docs/api/cli-api#resolvedaddrequest-interface)                           | Type  | `@relkit/cli/scaffolding`         | [Module example](/docs/modules/cli/automation)                                                                                             |
| [ResolvedCreateOptions](/docs/api/create-relkit#resolvedcreateoptions-interface)               | Type  | `@relkit/cli/scaffolding`         | [Module example](/docs/modules/cli/automation)                                                                                             |
| [resolveProjectDependencies](/docs/api/cli-api#resolveprojectdependencies)                     | Value | `@relkit/cli/scaffolding`         | [Source example](https://github.com/rel-kit/relkit/blob/main/packages/cli/tests/scaffolding/project-catalog.test.ts#L28)                   |
| [resolveProjectDependenciesEffect](/docs/api/cli-api#resolveprojectdependencieseffect)         | Value | `@relkit/cli/scaffolding`         | [Module example](/docs/modules/cli/automation)                                                                                             |
| [resolveTemplateRoot](/docs/api/create-relkit#resolvetemplateroot)                             | Value | `@relkit/cli/scaffolding`         | [Module example](/docs/modules/cli/automation)                                                                                             |
| [resolveTemplateRootEffect](/docs/api/create-relkit#resolvetemplaterooteffect)                 | Value | `@relkit/cli/scaffolding`         | [Module example](/docs/modules/cli/automation)                                                                                             |
| [RouteMethod](/docs/api/create-relkit#routemethod-type-alias)                                  | Type  | `@relkit/cli/scaffolding`         | [Module example](/docs/modules/cli/automation)                                                                                             |
| [runCli](/docs/api/cli-api#runcli)                                                             | Value | `@relkit/cli`                     | [Source example](https://github.com/rel-kit/relkit/blob/main/packages/cli/tests/database/cancellation.test.ts#L35)                         |
| [runDev](/docs/api/cli-api#rundev)                                                             | Value | `@relkit/cli`                     | [Module example](/docs/modules/cli/automation)                                                                                             |
| [SCAFFOLD_DEPENDENCIES](/docs/api/create-relkit#scaffold_dependencies)                         | Value | `@relkit/cli/scaffolding`         | [Source example](https://github.com/rel-kit/relkit/blob/main/packages/cli/tests/scaffolding/dependency-patches-selection.cases.ts#L67)     |
| [scaffoldDependency](/docs/api/create-relkit#scaffolddependency-1)                             | Value | `@relkit/cli/scaffolding`         | [Module example](/docs/modules/cli/automation)                                                                                             |
| [ScaffoldDependency](/docs/api/create-relkit#scaffolddependency-interface)                     | Type  | `@relkit/cli/scaffolding`         | [Module example](/docs/modules/cli/automation)                                                                                             |
| [ScaffoldDependencyName](/docs/api/create-relkit#scaffolddependencyname-type-alias)            | Type  | `@relkit/cli/scaffolding`         | [Source example](https://github.com/rel-kit/relkit/blob/main/packages/cli/tests/scaffolding/dependency-patches.fixture.ts#L38)             |
| [scaffoldErrors](/docs/api/create-relkit#scaffolderrors)                                       | Value | `@relkit/cli/scaffolding`         | [Module example](/docs/modules/cli/automation)                                                                                             |
| [ScaffoldFileOperation](/docs/api/create-relkit#scaffoldfileoperation-interface)               | Type  | `@relkit/cli/scaffolding`         | [Module example](/docs/modules/cli/automation)                                                                                             |
| [ScaffoldPlan](/docs/api/create-relkit#scaffoldplan-interface)                                 | Type  | `@relkit/cli/scaffolding`         | [Source example](https://github.com/rel-kit/relkit/blob/main/packages/cli/tests/scaffolding/generator-environment.probe.ts#L27)            |
| [ScaffoldPlanning](/docs/api/cli-api#scaffoldplanning-class)                                   | Value | `@relkit/cli/scaffolding`         | [Module example](/docs/modules/cli/automation)                                                                                             |
| [scaffoldPlanningLive](/docs/api/cli-api#scaffoldplanninglive)                                 | Value | `@relkit/cli/scaffolding`         | [Source example](https://github.com/rel-kit/relkit/blob/main/packages/cli/tests/scaffolding/generator-environment.probe.ts#L39)            |
| [ScaffoldTransaction](/docs/api/cli-api#scaffoldtransaction-class)                             | Value | `@relkit/cli/scaffolding`         | [Module example](/docs/modules/cli/automation)                                                                                             |
| [scaffoldTransactionLive](/docs/api/cli-api#scaffoldtransactionlive)                           | Value | `@relkit/cli/scaffolding`         | [Source example](https://github.com/rel-kit/relkit/blob/main/packages/cli/tests/scaffolding/transaction-lifecycle.effect.test.ts#L109)     |
| [ScaffoldVerification](/docs/api/create-relkit#scaffoldverification-type-alias)                | Type  | `@relkit/cli/scaffolding`         | [Module example](/docs/modules/cli/automation)                                                                                             |
| [ScaffoldWarning](/docs/api/create-relkit#scaffoldwarning-interface)                           | Type  | `@relkit/cli/scaffolding`         | [Module example](/docs/modules/cli/automation)                                                                                             |
| [ServiceInclude](/docs/api/create-relkit#serviceinclude-type-alias)                            | Type  | `@relkit/cli/scaffolding`         | [Module example](/docs/modules/cli/automation)                                                                                             |
| [startDev](/docs/api/cli-api#startdev)                                                         | Value | `@relkit/cli`                     | [Source example](https://github.com/rel-kit/relkit/blob/main/packages/cli/tests/services/source-watch-synchronous.test.ts#L18)             |
| [staticPropertyName](/docs/api/cli-api#staticpropertyname)                                     | Value | `@relkit/cli/scaffolding`         | [Module example](/docs/modules/cli/automation)                                                                                             |
| [supported](/docs/api/create-relkit#supported)                                                 | Value | `@relkit/cli/scaffolding`         | [Module example](/docs/modules/cli/automation)                                                                                             |
| [supportedCreateTemplates](/docs/api/create-relkit#supportedcreatetemplates)                   | Value | `@relkit/cli/scaffolding`         | [Source example](https://github.com/rel-kit/relkit/blob/main/packages/create-relkit/tests/create-capabilities.test.ts#L24)                 |
| [TextPromptOptions](/docs/api/create-relkit#textpromptoptions-interface)                       | Type  | `@relkit/cli/scaffolding`         | [Module example](/docs/modules/cli/automation)                                                                                             |
| [toFailure](/docs/api/cli-api#tofailure)                                                       | Value | `@relkit/cli`                     | [Source example](https://github.com/rel-kit/relkit/blob/main/packages/cli/tests/invocation/signals.test.ts#L69)                            |
| [transferCleanupFailures](/docs/api/create-relkit#transfercleanupfailures)                     | Value | `@relkit/cli/scaffolding`         | [Module example](/docs/modules/cli/automation)                                                                                             |
| [validateCreateOptions](/docs/api/create-relkit#validatecreateoptions)                         | Value | `@relkit/cli/scaffolding`         | [Module example](/docs/modules/cli/automation)                                                                                             |
| [validateCreateOptionsEffect](/docs/api/create-relkit#validatecreateoptionseffect)             | Value | `@relkit/cli/scaffolding`         | [Module example](/docs/modules/cli/automation)                                                                                             |
| [ValidatedCreateOptions](/docs/api/create-relkit#validatedcreateoptions-interface)             | Type  | `@relkit/cli/scaffolding`         | [Module example](/docs/modules/cli/automation)                                                                                             |
| [validatePackageName](/docs/api/create-relkit#validatepackagename)                             | Value | `@relkit/cli/scaffolding`         | [Module example](/docs/modules/cli/automation)                                                                                             |

## `cli-help-model.ts`

Static CLI help metadata; rendering never evaluates projects or starts support services.

### "./cli-help-model.types.js" (namespace export)

Re-exports all named exports from the "./cli-help-model.types.js" module.

**Signature**

```ts
export * from "./cli-help-model.types.js";
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/cli-help-model.ts#L14)

### findCliHelp

Resolves a command path in the static tree without executing the command.

**Signature**

```ts
declare const findCliHelp: (path: readonly string[]) => CliHelpCommand | undefined;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/cli-help-model.ts#L134)

### getCliHelpModel

Returns a frozen static help tree without acquiring command services.

**Signature**

```ts
declare const getCliHelpModel: (version: string) => CliHelpModel;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/cli-help-model.ts#L126)

## `cli-help-model.types.ts`

One static option contract consumed by terminal and documentation renderers.

### CliHelpArgument (interface)

Positional argument metadata; this describes syntax without parsing input.

**Signature**

```ts
export interface CliHelpArgument {
  readonly name: string;
  readonly required: boolean;
  readonly description: string;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/cli-help-model.types.ts#L12)

### CliHelpCommand (interface)

Pure command tree shared by generated documentation and CLI help.

**Signature**

```ts
export interface CliHelpCommand {
  readonly name: string;
  readonly description: string;
  readonly usage: string;
  readonly examples: readonly { readonly command: string; readonly description: string }[];
  readonly options: readonly CliHelpOption[];
  readonly arguments: readonly CliHelpArgument[];
  readonly commands: readonly CliHelpCommand[];
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/cli-help-model.types.ts#L19)

### CliHelpModel (interface)

Versioned root command; returned instances are deeply frozen.

**Signature**

```ts
export interface CliHelpModel extends CliHelpCommand {
  readonly version: string;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/cli-help-model.types.ts#L30)

### CliHelpOption (interface)

One static option contract consumed by terminal and documentation renderers.

**Signature**

```ts
export interface CliHelpOption {
  readonly name: string;
  readonly aliases?: readonly string[];
  readonly type: "boolean" | "string" | "integer" | "choice" | "key=value";
  readonly description: string;
  readonly values?: readonly string[];
  readonly repeatable?: boolean;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/cli-help-model.types.ts#L2)

## `dev-session.ts`

Owns development session state and its public synchronous/Promise facade over scoped native operations.

### DevSession (class)

Public Promise/synchronous facade over one native session owner.

**Signature**

```ts
declare class DevSession {
  constructor(options: DevOptions);
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/commands/dev-session.ts#L14)

### attach (method)

Captures the acquired engine for the public compatibility facade. @param engine - Scoped operations.

**Signature**

```ts
declare const attach: (engine: DevSessionEngine) => void;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/commands/dev-session.ts#L75)

### start (method)

Acquires the manual public owner once; concurrent callers share startup.

**Signature**

```ts
declare const start: () => Promise<this>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/commands/dev-session.ts#L83)

### activate (method)

Joins one requested source activation through the captured engine.

**Signature**

```ts
declare const activate: (version?: number, files?: readonly string[]) => Promise<boolean>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/commands/dev-session.ts#L91)

### notifySourceChange (method)

Forwards an explicit source version to the serialized activation owner.

**Signature**

```ts
declare const notifySourceChange: (version: number, files?: readonly string[]) => Promise<boolean>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/commands/dev-session.ts#L100)

### waitForShutdown (method)

Joins the captured session's shared shutdown completion.

**Signature**

```ts
declare const waitForShutdown: () => Promise<void>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/commands/dev-session.ts#L106)

### stop (method)

Closes the manual public owner and joins its shared release.

**Signature**

```ts
declare const stop: <Reason>(reason?: Reason | Error) => Promise<void>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/commands/dev-session.ts#L115)

### drain (method)

Joins a retired generation's drain through the captured engine.

**Signature**

```ts
declare const drain: (
  previous: StartedCandidate,
  active: SupervisorCandidateToken,
) => Promise<void>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/commands/dev-session.ts#L163)

### resolveShutdownPromise (method)

Completes the retained synchronous compatibility shutdown latch.

**Signature**

```ts
declare const resolveShutdownPromise: () => void;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/commands/dev-session.ts#L167)

### clearSignals (method)

Closes the captured signal registration and its synchronous facade.

**Signature**

```ts
declare const clearSignals: () => void;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/commands/dev-session.ts#L181)

### markStopping (method)

Closes synchronous startup and activation admission.

**Signature**

```ts
declare const markStopping: () => void;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/commands/dev-session.ts#L186)

### runSynchronous (method)

Executes the retained synchronous watcher edge.

**Signature**

```ts
declare const runSynchronous: <A, E>(effect: Effect.Effect<A, E>) => A;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/commands/dev-session.ts#L196)

### projectRoot (property)

**Signature**

```ts
readonly projectRoot: string
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/commands/dev-session.ts#L15)

### options (property)

**Signature**

```ts
readonly options: DevOptions
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/commands/dev-session.ts#L16)

### inspectionIdentity (property)

**Signature**

```ts
readonly inspectionIdentity: { readonly sessionId: string; readonly token: string; }
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/commands/dev-session.ts#L17)

### abortController (property)

**Signature**

```ts
readonly abortController: AbortController
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/commands/dev-session.ts#L18)

### state (property)

**Signature**

```ts
readonly state: Ref.Ref<DevSessionState>
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/commands/dev-session.ts#L19)

### log (property)

**Signature**

```ts
readonly log: DevLog
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/commands/dev-session.ts#L32)

### observability (property)

**Signature**

```ts
readonly observability: SupervisorObservability
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/commands/dev-session.ts#L33)

### stateMachine (property)

**Signature**

```ts
readonly stateMachine: SupervisorStateMachine
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/commands/dev-session.ts#L34)

### proxy (property)

**Signature**

```ts
readonly proxy: SupervisorProxy
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/commands/dev-session.ts#L35)

## `dev.ts`

### DevActivationFingerprint

**Signature**

```ts
declare const DevActivationFingerprint: DevActivationFingerprint;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/commands/dev.ts#L8)

### DevLocalServices

**Signature**

```ts
declare const DevLocalServices: DevLocalServices;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/commands/dev.ts#L11)

### DevLog

**Signature**

```ts
declare const DevLog: DevLog;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/commands/dev.ts#L9)

### DevLogEvent

**Signature**

```ts
declare const DevLogEvent: DevLogEvent;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/commands/dev.ts#L10)

### DevOptions

**Signature**

```ts
declare const DevOptions: DevOptions;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/commands/dev.ts#L12)

### DevSession

**Signature**

```ts
declare const DevSession: typeof DevSession;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/commands/dev.ts#L14)

### acquireDevSessionEffect

Acquires a session in the caller's native lifetime.

**Signature**

```ts
declare const acquireDevSessionEffect: (
  _options: DevOptions,
) => Effect.Effect<
  DevSession,
  CliAdapterError,
  | Scope
  | CliDevSupervisor
  | CliFileSystem
  | CliCleanup
  | CliPortProbe
  | CliSourceWatch
  | CliInspectorSupport
>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/commands/dev.ts#L21)

### runDev

Runs development until the session's scoped shutdown completes.

**Signature**

```ts
declare const runDev: (options: DevOptions) => Promise<void>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/commands/dev.ts#L42)

### startDev

Starts and returns the manually owned public development session.

**Signature**

```ts
declare const startDev: (options: DevOptions) => Promise<DevSession>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/commands/dev.ts#L35)

## `dev.types.ts`

Explicit development policy keeps resourceful work in the session's Effect scope.

### DevActivationFingerprint (type alias)

Full activation identity or an explicit foreign identity provider.

**Signature**

```ts
type DevActivationFingerprint =
  | RuntimeActivationFingerprint
  | ((
      candidate: StartedCandidate,
    ) => RuntimeActivationFingerprint | PromiseLike<RuntimeActivationFingerprint>);
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/commands/dev.types.ts#L31)

### DevLocalServices (interface)

Existing manually owned local service compatibility boundary.

**Signature**

```ts
export interface DevLocalServices {
  /**
   * Joins native local resource cleanup before session shutdown completes.
   * @returns Shared local owner release completion.
   */
  readonly close: () => Promise<void>;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/commands/dev.types.ts#L37)

### DevLog (type alias)

Synchronous native logging callback; failures cannot change session lifecycle.

**Signature**

```ts
type DevLog = (event: DevLogEvent) => void;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/commands/dev.types.ts#L25)

### DevLogEvent (interface)

One admitted development log, rendered by the existing terminal policy.

**Signature**

```ts
export interface DevLogEvent {
  readonly level: LogLevel;
  readonly event: string;
  readonly fields?: Readonly<Record<string, JsonValue>>;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/commands/dev.types.ts#L15)

### DevOptions (interface)

Development host inputs; all process/session resources belong to one lifetime.

**Signature**

```ts
export interface DevOptions {
  readonly projectRoot?: string;
  readonly compile: CandidateCompile;
  readonly activationFingerprint?: DevActivationFingerprint;
  /**
   * Reuses the prepared identity only for a child installed from that validated receipt.
   * @param candidate - SDK child associated with one immutable preparation result.
   * @returns Its accepted identity, or absence for an independently checked fallback child.
   */
  readonly preparedActivationFingerprint?: (
    candidate: StartedCandidate,
  ) => RuntimeActivationFingerprint | undefined;
  /**
   * Proves application readiness after mandatory SDK cohort verification.
   * @param candidate - Unpublished child already matched to its graph/cohort.
   * @param signal - Activation cancellation consumed by readiness HTTP work.
   * @returns Joined proof or typed rejection before switching traffic.
   */
  readonly candidateVerificationEffect?: (
    candidate: StartedCandidate,
    signal: AbortSignal,
  ) => Effect.Effect<void, CliAdapterError>;
  /** Releases any request retained as the candidate's real route proof after publication. */
  readonly candidateVerificationPublished?: (candidate: StartedCandidate) => void;
  /** Releases a request retained by a candidate that could not be published. */
  readonly candidateVerificationRejected?: (candidate: StartedCandidate) => void;
  /**
   * Checks the final input epoch in the atomic traffic-switch turn.
   * @param candidate - Verified unpublished child.
   * @returns False when its prepared input epoch is obsolete.
   */
  readonly candidateAdmission?: (candidate: StartedCandidate) => boolean;
  readonly hostname?: string;
  readonly candidateHostname?: string;
  readonly stablePort?: number;
  readonly generatedDirectory?: string;
  readonly environment?: Readonly<Record<string, string | undefined>>;
  readonly maxStartupOutputBytes?: number;
  readonly candidateStopTimeoutMs?: number;
  readonly healthTimeoutMs?: number;
  /** Permits immutable prepared candidates to overlap independent health reads. */
  readonly candidateVerificationConcurrentHealth?: boolean;
  /** Native verification transport; prepared sessions restrict bearer credentials to internal probes. */
  readonly candidateVerificationFetch?: typeof fetch;
  readonly drainTimeoutMs?: number;
  readonly inspector?: Pick<InspectionBridgeOptions, "host" | "port"> | false;
  readonly inspectionRecords?: InspectionBridgeOptions["records"];
  /** Bridge credentials shared by every generation; generated per session when omitted. */
  readonly inspectionIdentity?: { readonly sessionId: string; readonly token: string };
  /**
   * Reads the bridge policy an accepted generation was built with.
   * @param generationToken - Promoted generation.
   * @returns Its policy, or undefined when the session keeps its current bridge.
   */
  readonly inspectionPolicy?: (generationToken: number) => DevInspectorPolicy | undefined;
  /**
   * Observes the bridge policy of every promoted generation, changed or not, once the
   * retired generation has drained.
   * @param policy - Bridge policy the session now serves.
   * @returns Completion after policy-owned resources are released or retained.
   */
  readonly inspectionApplied?: (policy: DevInspectorPolicy) => Effect.Effect<void>;
  /**
   * Observes a generation that was not promoted.
   * @param generationToken - Rejected, failed or superseded generation.
   * @returns Completion after resources prepared for it are rolled back.
   */
  readonly inspectionRejected?: (generationToken: number) => Effect.Effect<void>;
  /** Grace period after backend activation before optional inspector acquisition. */
  readonly supportStartupDelayMs?: number;
  readonly spawn?: typeof Bun.spawn;
  readonly signal?: AbortSignal;
  readonly installSignalHandlers?: boolean;
  readonly logger?: Omit<LoggerOptions, "component">;
  readonly onLog?: DevLog;
  /**
   * Consumes a projected native log envelope without lifecycle authority.
   * @param record - Existing structured log record.
   * @param origin - Declared process source.
   * @returns No value after synchronous admission.
   */
  readonly onRecord?: (record: LogRecord, origin: "application" | "relkit" | "inspector") => void;
  /**
   * Optionally intercepts a stable-proxy request before application routing.
   * @param request - Native incoming request.
   * @returns A native response receipt or absence to delegate to the backend.
   */
  readonly intercept?: (request: Request) => Promise<Response> | undefined;
  /**
   * Closes callback admission when shutdown begins.
   * @returns No value; resource cleanup remains with the session Scope.
   */
  readonly onStopping?: () => void;
  readonly terminal?: {
    readonly verbose?: boolean;
    readonly color?: boolean;
    readonly columns?: number;
  };
  readonly observability?: Omit<SupervisorObservabilityOptions, "activationFingerprint">;
  readonly localServices?: DevLocalServices;
  /** Native orchestration hook; acquired local owners close in the same session graph. */
  readonly localServicesEffect?: Effect.Effect<void>;
  /**
   * Native invalidation hook, captured by the owning compiler/cache service.
   * @param files - Admitted changed paths.
   * @returns Lazy session cache invalidation before the next compilation.
   */
  readonly sourceChangedEffect?: (files: readonly string[]) => Effect.Effect<void>;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/commands/dev.types.ts#L45)

## `editor.ts`

### initialize

Creates the synchronous editor plugin using the editor's own TypeScript instance.

**Signature**

```ts
declare const initialize: (modules: EditorModules) => ts.server.PluginModule;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/editor.ts#L13)

## `index.ts`

### "./commands/dev.js" (namespace export)

Re-exports all named exports from the "./commands/dev.js" module.

**Signature**

```ts
export * from "./commands/dev.js";
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/index.ts#L1)

### "./main.js" (namespace export)

Re-exports all named exports from the "./main.js" module.

**Signature**

```ts
export * from "./main.js";
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/index.ts#L2)

## `tooling.ts`

Exposes finite native ownership, byte identities and import policy to
repository tooling through a declared package boundary. These exports acquire
no CLI session; callers own cancellation, compilation and publication scopes.

### DevSnapshot

**Signature**

```ts
declare const DevSnapshot: Struct<{
  readonly version: Literal<1>;
  readonly fingerprint: String;
  readonly graphHash: String;
  readonly graphFile: String;
  readonly activationFile: String;
  readonly manifestFile: String;
  readonly runtimeIntegrationsFile: String;
  readonly jobsManifestFile: optionalKey<String>;
  readonly localServicesFile: optionalKey<String>;
  readonly entrypoint: String;
  readonly importIndex: String;
  readonly activation: Struct<{
    readonly graphHash: String;
    readonly manifestHash: String;
    readonly jobsManifestHash: optionalKey<String>;
    readonly runtimeIntegrationsPlanHash: String;
    readonly localServicesPlanHash: optionalKey<String>;
  }>;
  readonly tools: Struct<{
    readonly layout: Literal<1>;
    readonly bun: String;
    readonly effect: String;
    readonly typescript: String;
    readonly relkit: String;
    readonly platform: Literals<
      readonly ["darwin-arm64", "darwin-x64", "linux-arm64", "linux-x64"]
    >;
  }>;
  readonly inspector: optionalKey<
    Struct<{
      readonly enabled: Boolean;
      readonly connection: Struct<{ readonly host: String; readonly port: Number }>;
      readonly maxPreviewBytes: Number;
    }>
  >;
  readonly ports: optionalKey<Struct<{ readonly backend: Number }>>;
  readonly readiness: Union<
    readonly [
      Struct<{
        readonly kind: Literal<"route">;
        readonly path: String;
        readonly status: Literal<200>;
        readonly body: String;
      }>,
      Struct<{ readonly kind: Literal<"graph">; readonly routeTableHash: String }>,
    ]
  >;
  readonly inputs: $Array<
    Struct<{ readonly path: String; readonly hash: String; readonly bytes: Number }>
  >;
  readonly typecheckInputs: Struct<{
    readonly files: $Array<
      Struct<{ readonly path: String; readonly hash: String; readonly bytes: Number }>
    >;
    readonly observations: $Array<
      Union<
        readonly [
          Struct<{
            readonly kind: Literals<readonly ["fileExists", "directoryExists"]>;
            readonly path: Union<readonly [String, Literal<".">]>;
            readonly exists: Boolean;
          }>,
          Struct<{
            readonly kind: Literals<readonly ["directories", "entries"]>;
            readonly path: Union<readonly [String, Literal<".">]>;
            readonly entries: $Array<String>;
          }>,
        ]
      >
    >;
  }>;
  readonly dependencies: $Array<
    Struct<{
      readonly name: String;
      readonly version: String;
      readonly root: String;
      readonly members: $Array<
        Struct<{ readonly path: String; readonly hash: String; readonly bytes: Number }>
      >;
    }>
  >;
  readonly artifacts: $Array<
    Struct<{ readonly path: String; readonly hash: String; readonly bytes: Number }>
  >;
  readonly routeImports: $Array<
    Struct<{ readonly routeId: String; readonly members: $Array<String> }>
  >;
}>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/internal/tooling.ts#L14)

### SnapshotFileOperations

**Signature**

```ts
declare const SnapshotFileOperations: SnapshotFileOperations;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/internal/tooling.ts#L13)

### SnapshotFiles

**Signature**

```ts
declare const SnapshotFiles: typeof SnapshotFiles;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/internal/tooling.ts#L12)

### SnapshotPointer

**Signature**

```ts
declare const SnapshotPointer: Struct<{
  readonly version: Literal<1>;
  readonly generation: String;
}>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/internal/tooling.ts#L14)

### narrowEffectImportPlugin

**Signature**

```ts
declare const narrowEffectImportPlugin: () => Bun.BunPlugin;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/internal/tooling.ts#L9)

### narrowEffectImports

**Signature**

```ts
declare const narrowEffectImports: (source: string, path: string) => string;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/internal/tooling.ts#L8)

### ownedNativePromise

**Signature**

```ts
declare const ownedNativePromise: <A>(
  operation: string,
  run: (signal: AbortSignal) => PromiseLike<A>,
) => Effect<Awaited<A>, CliAdapterError, never>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/internal/tooling.ts#L6)

### snapshotDigest

**Signature**

```ts
declare const snapshotDigest: (bytes: Uint8Array | string) => string;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/internal/tooling.ts#L11)

### snapshotFilesLive

**Signature**

```ts
declare const snapshotFilesLive: Layer<SnapshotFiles, never, never>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/internal/tooling.ts#L12)

## `main-generator.ts`

Lazily loads CLI-owned scaffolding after command selection, validates the retained generator facade and preserves the public unavailable-API diagnostic.

### isGeneratorApi

Validates the minimal foreign facade while preserving its original identity.

**Signature**

```ts
declare const isGeneratorApi: (value: unknown) => value is CreateRelkitGeneratorApi;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/main-generator.ts#L36)

### loadCreateRelkit

Imports the optional generator using the existing public Promise contract.

**Throws**

The established unavailable-API failure.

**Signature**

```ts
declare const loadCreateRelkit: () => Promise<CreateRelkitGeneratorApi>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/main-generator.ts#L13)

### loadCreateRelkitEffect

Imports one foreign namespace lazily without creating a nested command runtime.

**Signature**

```ts
declare const loadCreateRelkitEffect: Effect.Effect<
  CreateRelkitGeneratorApi,
  CliAdapterError,
  never
>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/main-generator.ts#L18)

## `main-support-types.ts`

Defines CLI invocation I/O, presentation, runtime, and generator adapter contracts.

### CliCommandContext (interface)

Borrowed command inputs; all resource owners live in the invocation's service graph.

**Signature**

```ts
export interface CliCommandContext {
  /** Selected public command. */
  readonly command: string;
  /** Remaining public arguments. */
  readonly args: readonly string[];
  /** Whether output uses the established JSON protocol. */
  readonly json: boolean;
  /** Caller and native termination signals combined before prompting. */
  readonly signal: AbortSignal;
  /** Optional native terminal detection override. */
  readonly tty?: boolean;
  /** Optional borrowed output sinks. */
  readonly io?: CliIo;
  /** Public output/error projection. */
  readonly reporter: CliReporter;
  /** Synchronous callback into the scoped logger owner. */
  readonly log: CliLogger;
  /** Optional synchronous callback into the scoped status owner. */
  readonly onProgress?: (message: string) => void;
  /** Whether noninteractive continuous integration rules apply. */
  readonly ci?: boolean;
  /** Explicit working directory override. */
  readonly cwd?: string;
  /** Optional foreign prompt adapter, supplied before any prompt is admitted. */
  readonly promptDriver?: PromptDriver;
  /** Whether this invocation may ask the user for missing inputs. */
  readonly interactive?: boolean;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/main-support-types.ts#L33)

### CliFailure (type alias)

Original public error object enriched with stable CLI status metadata.

**Signature**

```ts
type CliFailure = Error & {
  /** Stable public diagnostic code. */
  readonly code: string;
  /** Established native exit status. */
  readonly exitCode: number;
  /** Native termination signal when one caused the failure. */
  readonly signal?: "SIGINT" | "SIGTERM" | "SIGHUP";
};
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/main-support-types.ts#L128)

### CliIo (interface)

Borrowed synchronous output sinks; the invocation never closes these streams.

**Signature**

```ts
export interface CliIo {
  /** Writes one already formatted public output line. */
  readonly stdout: (line: string) => void;
  /** Writes one already formatted diagnostic line. */
  readonly stderr: (line: string) => void;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/main-support-types.ts#L13)

### CliLogger (type alias)

Synchronous native callback bridge to the invocation's scoped logging queue.

**Signature**

```ts
type CliLogger = (
  level: LogLevel,
  message: string,
  fields?: Readonly<Record<string, unknown>>,
) => void;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/main-support-types.ts#L27)

### CliReporter (interface)

Established public JSON/human presentation contract.

**Signature**

```ts
export interface CliReporter {
  /** Emits an untrusted domain result with optional human presentation. */
  readonly output: (value: unknown, human?: string) => void;
  /** Emits the established public failure code and message. */
  readonly error: (code: string, message: string) => void;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/main-support-types.ts#L20)

### CliRuntime (interface)

Optional public invocation injection; defaults are acquired lazily by the selected domain.

**Signature**

```ts
export interface CliRuntime {
  /** Borrowed public output sinks. */
  readonly io?: CliIo;
  /** Explicit package version override used by public help/version output. */
  readonly version?: string;
  /** Explicit terminal detection override. */
  readonly tty?: boolean;
  /** Explicit continuous integration mode. */
  readonly ci?: boolean;
  /** Continuing caller cancellation; never replaced by a domain-owned controller. */
  readonly signal?: AbortSignal;
  /** Whether the invocation installs temporary native termination handlers. */
  readonly installSignalHandlers?: boolean;
  /** Optional individual foreign SDK loader; unused commands never call it. */
  readonly loadCreateRelkit?: () => Promise<CreateRelkitGeneratorApi>;
  /** Explicit project discovery root. */
  readonly cwd?: string;
  /** Optional native prompt adapter retaining its original public contract. */
  readonly promptDriver?: PromptDriver;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/main-support-types.ts#L107)

### CreateRelkitGeneratorApi (interface)

Narrow compatible generator SDK; domain values remain opaque until their owner validates them.

**Signature**

```ts
export interface CreateRelkitGeneratorApi {
  /** Parses the generator's existing synchronous create contract. */
  readonly normalizeCreateOptions: (
    args: readonly string[],
    context: { readonly json: boolean },
  ) => unknown;
  /** Executes the generator-owned transaction with its native cancellation receipt. */
  readonly generateProject: (
    options: unknown,
    context: CliCommandContext,
  ) => unknown | Promise<unknown>;
  /** Resolves missing create inputs without adding duplicate CLI confirmation. */
  readonly resolveCreateOptionsDetails?: (
    args: readonly string[],
    context: {
      readonly json: boolean;
      readonly interactive: boolean;
      readonly signal?: AbortSignal;
      readonly promptDriver?: PromptDriver;
    },
  ) => Promise<{ readonly options: unknown; readonly prompted: boolean }>;
  /** Previews a validated create plan without mutation. */
  readonly planCreate?: (
    options: unknown,
    context?: { readonly cwd?: string },
  ) => Promise<CreateScaffoldPlan>;
  /** Resolves the existing add selection flow with caller cancellation. */
  readonly resolveAddRequestDetails?: (
    args: readonly string[],
    context: {
      readonly cwd?: string;
      readonly interactive: boolean;
      readonly signal?: AbortSignal;
      readonly promptDriver?: PromptDriver;
    },
  ) => Promise<{ readonly request: AddRequest; readonly prompted: boolean }>;
  /** Previews the existing add plan. */
  readonly planAdd?: (request: AddRequest) => Promise<ScaffoldPlan>;
  /** Applies one generator-owned add transaction and its cleanup policy. */
  readonly applyScaffoldPlan?: (
    plan: ScaffoldPlan,
    context?: ApplyScaffoldContext,
  ) => Promise<AddResult>;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/main-support-types.ts#L62)

## `main-support.ts`

Presents CLI output, help and terminal failures while keeping command cancellation scoped to its invocation; optional scaffold loading has a separate lazy owner.

### "./main-support-types.js" (namespace export)

Re-exports all named exports from the "./main-support-types.js" module.

**Signature**

```ts
export * from "./main-support-types.js";
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/main-support.ts#L9)

### CLI_EXIT_CODES

Stable command, usage and native-signal exit statuses.

**Signature**

```ts
declare const CLI_EXIT_CODES: Readonly<{
  success: 0;
  failure: 1;
  usage: 2;
  sigint: 130;
  sigterm: 143;
  sighup: 129;
}>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/main-support.ts#L14)

### CLI_VERSION

Version of this installed CLI package.

**Signature**

```ts
declare const CLI_VERSION: string;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/main-support.ts#L12)

### createReporter

Builds the existing result/error presentation policy.

**Signature**

```ts
declare const createReporter: (json: boolean, io: CliIo) => CliReporter;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/main-support.ts#L29)

### errorMessage

Formats an existing terminal diagnostic without changing Error identity.

**Signature**

```ts
declare const errorMessage: (error: unknown) => string;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/main-support.ts#L155)

### fail

Constructs the typed product failure while retaining public code/exit fields.

**Signature**

```ts
declare const fail: (
  code: string,
  message: string,
  exitCode?: number,
  signal?: "SIGINT" | "SIGTERM" | "SIGHUP",
) => CliFailureError;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/main-support.ts#L119)

### failSignal

Preserves signal-specific public cancellation codes.

**Signature**

```ts
declare const failSignal: (signal: "SIGINT" | "SIGTERM" | "SIGHUP") => CliFailure;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/main-support.ts#L107)

### helpPayload

Projects public machine-readable help from pure command metadata.

**Signature**

```ts
declare const helpPayload: (
  version: string,
  command: string | readonly string[] | undefined,
) => unknown;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/main-support.ts#L50)

### helpText

Formats the existing compact human help.

**Signature**

```ts
declare const helpText: (version: string, command: string | undefined) => string;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/main-support.ts#L69)

### installSignals

Installs native process cancellation for one invocation owner.

**Signature**

```ts
declare const installSignals: (controller: AbortController) => () => void;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/main-support.ts#L91)

### isGeneratorApi

**Signature**

```ts
declare const isGeneratorApi: (value: unknown) => value is CreateRelkitGeneratorApi;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/main-support.ts#L178)

### loadCreateRelkit

**Signature**

```ts
declare const loadCreateRelkit: () => Promise<CreateRelkitGeneratorApi>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/main-support.ts#L178)

### loadCreateRelkitEffect

**Signature**

```ts
declare const loadCreateRelkitEffect: Effect<CreateRelkitGeneratorApi, CliAdapterError, never>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/main-support.ts#L178)

### toFailure

Applies the terminal invocation error policy after owned cleanup completes.

**Signature**

```ts
declare const toFailure: (error: unknown, signal: AbortSignal) => CliFailure;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/main-support.ts#L138)

## `main.ts`

Owns one native CLI invocation, its cancellation signals, presentation and scoped cleanup.

### "./cli-help-model.js" (namespace export)

Re-exports all named exports from the "./cli-help-model.js" module.

**Signature**

```ts
export * from "./cli-help-model.js";
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/main.ts#L17)

### "./main-support.js" (namespace export)

Re-exports all named exports from the "./main-support.js" module.

**Signature**

```ts
export * from "./main-support.js";
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/main.ts#L18)

### main

Runs the native process entry point using the same invocation owner.

**Signature**

```ts
declare const main: (argv?: readonly string[]) => Promise<number>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/main.ts#L84)

### runCli

Executes one invocation with one service graph and scoped resources.

**Signature**

```ts
declare const runCli: (argv?: readonly string[], runtime?: CliRuntime) => Promise<number>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/main.ts#L26)

## `add-name.ts`

Normalizes authored artifact names into stable file stems, identifiers and logical ID segments before add planning can mutate project files.

### NormalizedArtifactName (interface)

Normalized user label, file stem, binding identifier and descriptor ID segment.

**Signature**

```ts
export interface NormalizedArtifactName {
  readonly input: string;
  readonly fileStem: string;
  readonly identifier: string;
  readonly idSegment: string;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/scaffolding/add-name.ts#L8)

### normalizeArtifactName

Normalizes one friendly label for source files, bindings, and stable IDs.

**Signature**

```ts
declare const normalizeArtifactName: (input: string) => NormalizedArtifactName;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/scaffolding/add-name.ts#L20)

## `add-options.ts`

Builds normalized existing-project add requests from CLI arguments and enforces headless requirements before interactive resolution.

### normalizeAddRequest

Parses one complete non-interactive `relkit add` request.

**Signature**

```ts
declare const normalizeAddRequest: (
  args: readonly string[],
  context?: { readonly cwd?: string },
) => AddRequest;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/scaffolding/add-options.ts#L35)

## `add-output.ts`

Formats scaffold plans and apply results into terminal or JSON output while preserving verification failures and actionable next steps.

### formatAddResult

Formats the completed add result and verification status.

**Signature**

```ts
declare const formatAddResult: (result: AddResult) => string;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/scaffolding/add-output.ts#L46)

### formatScaffoldPlan

Formats a scaffold plan for review before mutation.

**Signature**

```ts
declare const formatScaffoldPlan: (plan: ScaffoldPlan) => string;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/scaffolding/add-output.ts#L10)

## `add-plan.ts`

Composes project discovery, artifact planning and request-local builder state into an immutable scaffold plan before transaction acquisition.

### ScaffoldPlanning (class)

Cohesive discovery and planning authority, with isolated Ref state per request.

**Signature**

```ts
declare class ScaffoldPlanning
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/scaffolding/add-plan.ts#L38)

### planAdd

Preserves the existing public Promise API and stable rejection constructors.

**Signature**

```ts
declare const planAdd: (request: AddRequest) => Promise<ScaffoldPlan>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/scaffolding/add-plan.ts#L84)

### planAddEffect

Plans an artifact through an explicitly supplied planning service.

**Signature**

```ts
declare const planAddEffect: (
  request: AddRequest,
) => Effect.Effect<ScaffoldPlan, GeneratorIoError | GeneratorDomainError, ScaffoldPlanning>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/scaffolding/add-plan.ts#L72)

### scaffoldPlanningLive

Planning Layer captures only declaration discovery and filesystem authority.

**Signature**

```ts
declare const scaffoldPlanningLive: Layer.Layer<
  ScaffoldPlanning,
  never,
  GeneratorFileSystem | ProjectDiscoveryServiceTag
>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/scaffolding/add-plan.ts#L46)

## `add-resolver.ts`

Composes add discovery and interactive resolution into one request workflow, preserving typed cancellation and validation failures.

### AddResolution (class)

Ordered interactive-add resolution, distinct from applying the user's final consent.

**Signature**

```ts
declare class AddResolution
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/scaffolding/add-resolver.ts#L27)

### ResolveAddContext

**Signature**

```ts
declare const ResolveAddContext: ResolveAddContext;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/scaffolding/add-resolver.ts#L24)

### ResolvedAddRequest

**Signature**

```ts
declare const ResolvedAddRequest: ResolvedAddRequest;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/scaffolding/add-resolver.ts#L24)

### addResolutionLive

Captures declaration discovery, filesystem reads and prompt input at the owning Layer boundary.

**Signature**

```ts
declare const addResolutionLive: Layer.Layer<
  AddResolution,
  never,
  GeneratorFileSystem | GeneratorPrompt | ProjectDiscoveryServiceTag
>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/scaffolding/add-resolver.ts#L35)

### resolveAddRequest

Preserves the existing normalized-request Promise API.

**Signature**

```ts
declare const resolveAddRequest: (
  args: readonly string[],
  context?: ResolveAddContext,
) => Promise<AddRequest>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/scaffolding/add-resolver.ts#L76)

### resolveAddRequestDetails

Preserves the existing detailed Promise API and add-flow consent behavior.

**Signature**

```ts
declare const resolveAddRequestDetails: (
  args: readonly string[],
  context?: ResolveAddContext,
) => Promise<ResolvedAddRequest>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/scaffolding/add-resolver.ts#L89)

### resolveAddRequestDetailsEffect

Resolves a request through explicit add-resolution authority while retaining consent metadata.

**Signature**

```ts
declare const resolveAddRequestDetailsEffect: (
  args: ReadonlyArray<string>,
  context?: ResolveAddContext | undefined,
) => Effect.Effect<
  ResolvedAddRequest,
  GeneratorIoError | GeneratorPromptError | GeneratorDomainError,
  AddResolution
>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/scaffolding/add-resolver.ts#L63)

## `add-resolver.types.ts`

Composes add discovery and interactive resolution into one request workflow, preserving typed cancellation and validation failures. This companion contains the shared planning contracts without executing work.

### AddResolutionService (interface)

Finite add-resolution owner with explicit discovery, prompt and source authority.

**Signature**

```ts
export interface AddResolutionService {
  /**
   * Resolves missing interactive add choices against source-discovered facts.
   * @param args - Literal flag and positional arguments.
   * @param context - Caller-owned settings and cancellation.
   * @returns An Effect returning a validated request and whether resolution prompted.
   */
  readonly resolve: (
    args: readonly string[],
    context: ResolveAddContext,
  ) => Effect.Effect<
    ResolvedAddRequest,
    GeneratorDomainError | GeneratorIoError | GeneratorPromptError
  >;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/scaffolding/add-resolver.types.ts#L27)

### ResolveAddContext (interface)

Existing interactive-add resolution context.

**Signature**

```ts
export interface ResolveAddContext {
  readonly cwd?: string;
  readonly interactive?: boolean;
  readonly promptDriver?: PromptDriver;
  readonly signal?: AbortSignal;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/scaffolding/add-resolver.types.ts#L13)

### ResolvedAddRequest (interface)

Existing resolved add request and consent-relevant prompted flag.

**Signature**

```ts
export interface ResolvedAddRequest {
  readonly request: AddRequest;
  readonly prompted: boolean;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/scaffolding/add-resolver.types.ts#L21)

## `add-transaction.ts`

Acquires file and lock snapshots before applying an immutable scaffold plan; commit, rollback and cleanup retain the original transaction owner.

### AddCommandResult

**Signature**

```ts
declare const AddCommandResult: AddCommandResult;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/scaffolding/add-transaction.ts#L31)

### ApplyScaffoldContext

**Signature**

```ts
declare const ApplyScaffoldContext: ApplyScaffoldContext;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/scaffolding/add-transaction.ts#L31)

### ScaffoldTransaction (class)

Owns file mutation, install/check and rollback within one finite transaction scope.

**Signature**

```ts
declare class ScaffoldTransaction
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/scaffolding/add-transaction.ts#L34)

### applyScaffoldPlan

Preserves the Promise transaction API and canonical public error constructors.

**Signature**

```ts
declare const applyScaffoldPlan: (
  plan: ScaffoldPlan,
  context?: ApplyScaffoldContext,
) => Promise<AddResult>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/scaffolding/add-transaction.ts#L98)

### applyScaffoldPlanEffect

Applies a plan with a caller-supplied transaction service.

**Signature**

```ts
declare const applyScaffoldPlanEffect: (
  plan: ScaffoldPlan,
  context?: ApplyScaffoldContext | undefined,
) => Effect.Effect<
  AddResult,
  GeneratorIoError | GeneratorProcessError | GeneratorDomainError,
  ScaffoldTransaction
>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/scaffolding/add-transaction.ts#L85)

### scaffoldTransactionLive

Transaction Layer captures explicit filesystem and process authority once.

**Signature**

```ts
declare const scaffoldTransactionLive: Layer.Layer<
  ScaffoldTransaction,
  never,
  GeneratorFileSystem | GeneratorProcess
>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/scaffolding/add-transaction.ts#L43)

## `add-transaction.types.ts`

Acquires file and lock snapshots before applying an immutable scaffold plan; commit, rollback and cleanup retain the original transaction owner. This companion contains the shared planning contracts without executing work.

### AddCommandResult (interface)

Existing command-runner result compatibility surface.

**Signature**

```ts
export interface AddCommandResult extends GeneratorCommandResult {}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/scaffolding/add-transaction.types.ts#L16)

### ApplyScaffoldContext (interface)

Existing scaffold transaction settings, preserving all caller injection points.

**Signature**

```ts
export interface ApplyScaffoldContext {
  readonly commandRunner?: GeneratorCommandRunner;
  readonly bunExecutable?: string;
  readonly relkitExecutable?: string;
  readonly signal?: AbortSignal;
  /**
   * Reports the current step through the caller's progress sink.
   * @param message - User-facing progress text for the current step.
   * @returns Completion after the sink receives one progress message.
   */
  readonly onProgress?: (message: string) => void;
  readonly deferVerification?: boolean;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/scaffolding/add-transaction.types.ts#L19)

### ScaffoldTransactionService (interface)

Scoped add-transaction owner; infrastructure remains an explicit Layer dependency.

**Signature**

```ts
export interface ScaffoldTransactionService {
  /**
   * Applies planned files, installs/checks when required and rolls back failure.
   * @param plan - Immutable conflict-checked scaffold plan.
   * @param context - Caller-owned settings and cancellation.
   * @returns A scoped Effect returning the unchanged AddResult after all owned cleanup settles.
   */
  readonly apply: (
    plan: ScaffoldPlan,
    context: ApplyScaffoldContext,
  ) => Effect.Effect<AddResult, GeneratorDomainError | GeneratorIoError | GeneratorProcessError>;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/scaffolding/add-transaction.types.ts#L34)

## `index.ts`

CLI-owned existing-project scaffolding; creation remains a lightweight dependency.

### "./add-name.js" (namespace export)

Re-exports all named exports from the "./add-name.js" module.

**Signature**

```ts
export * from "./add-name.js";
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/scaffolding/index.ts#L3)

### "./add-options.js" (namespace export)

Re-exports all named exports from the "./add-options.js" module.

**Signature**

```ts
export * from "./add-options.js";
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/scaffolding/index.ts#L4)

### "./add-output.js" (namespace export)

Re-exports all named exports from the "./add-output.js" module.

**Signature**

```ts
export * from "./add-output.js";
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/scaffolding/index.ts#L12)

### "./add-plan.js" (namespace export)

Re-exports all named exports from the "./add-plan.js" module.

**Signature**

```ts
export * from "./add-plan.js";
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/scaffolding/index.ts#L11)

### "./add-resolver.js" (namespace export)

Re-exports all named exports from the "./add-resolver.js" module.

**Signature**

```ts
export * from "./add-resolver.js";
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/scaffolding/index.ts#L13)

### "./add-transaction.js" (namespace export)

Re-exports all named exports from the "./add-transaction.js" module.

**Signature**

```ts
export * from "./add-transaction.js";
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/scaffolding/index.ts#L8)

### "./plan-builder.js" (namespace export)

Re-exports all named exports from the "./plan-builder.js" module.

**Signature**

```ts
export * from "./plan-builder.js";
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/scaffolding/index.ts#L10)

### "./project-catalog.js" (namespace export)

Re-exports all named exports from the "./project-catalog.js" module.

**Signature**

```ts
export * from "./project-catalog.js";
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/scaffolding/index.ts#L9)

### "./project-discovery-types.js" (namespace export)

Re-exports all named exports from the "./project-discovery-types.js" module.

**Signature**

```ts
export * from "./project-discovery-types.js";
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/scaffolding/index.ts#L5)

### "./project-discovery.js" (namespace export)

Re-exports all named exports from the "./project-discovery.js" module.

**Signature**

```ts
export * from "./project-discovery.js";
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/scaffolding/index.ts#L6)

### "./render-database.js" (namespace export)

Re-exports all named exports from the "./render-database.js" module.

**Signature**

```ts
export * from "./render-database.js";
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/scaffolding/index.ts#L14)

### "./source-edit.js" (namespace export)

Re-exports all named exports from the "./source-edit.js" module.

**Signature**

```ts
export * from "./source-edit.js";
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/scaffolding/index.ts#L7)

### "create-relkit" (namespace export)

Re-exports all named exports from the "create-relkit" module.

**Signature**

```ts
export * from "create-relkit";
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/scaffolding/index.ts#L2)

## `plan-builder.ts`

Exposes the synchronous planning facade over request-local Effect state; file writes remain deferred until the transaction applies the resulting plan.

### PlanBuilder (class)

Per-request Effect owner with synchronous and Promise compatibility edges.

**Signature**

```ts
declare class PlanBuilder
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/scaffolding/plan-builder.ts#L15)

### read (method)

Reads source through the Promise compatibility edge.

**Signature**

```ts
declare const read: (path: string) => Promise<string>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/scaffolding/plan-builder.ts#L21)

### create (method)

Plans file creation through the Promise compatibility edge.

**Signature**

```ts
declare const create: (path: string, content: string, mode?: number) => Promise<void>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/scaffolding/plan-builder.ts#L32)

### update (method)

Plans a source update through the Promise compatibility edge.

**Signature**

```ts
declare const update: (path: string, transform: (source: string) => string) => Promise<void>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/scaffolding/plan-builder.ts#L42)

### dependency (method)

Preserves the existing synchronous dependency API.

**Signature**

```ts
declare const dependency: (name: ScaffoldDependencyName) => void;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/scaffolding/plan-builder.ts#L51)

### registerArtifact (method)

Preserves the existing synchronous artifact registration API.

**Signature**

```ts
declare const registerArtifact: (
  kind: DiscoveredArtifact["kind"],
  value: PlannedArtifactInput,
) => void;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/scaffolding/plan-builder.ts#L61)

### registerProfile (method)

Preserves the existing synchronous profile registration API.

**Signature**

```ts
declare const registerProfile: (profile: DiscoveredProfile) => void;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/scaffolding/plan-builder.ts#L70)

### script (method)

Preserves the existing synchronous script API.

**Signature**

```ts
declare const script: (name: string, command: string) => void;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/scaffolding/plan-builder.ts#L80)

### warning (method)

Preserves the existing synchronous warning API.

**Signature**

```ts
declare const warning: (code: string, message: string) => void;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/scaffolding/plan-builder.ts#L90)

### nextStep (method)

Preserves the existing synchronous next-step API.

**Signature**

```ts
declare const nextStep: (command: string) => void;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/scaffolding/plan-builder.ts#L99)

### envExample (method)

Preserves the environment-example Promise API.

**Signature**

```ts
declare const envExample: (name: string, value?: string) => Promise<void>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/scaffolding/plan-builder.ts#L109)

### gitignore (method)

Preserves the gitignore Promise API.

**Signature**

```ts
declare const gitignore: (pattern: string) => Promise<void>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/scaffolding/plan-builder.ts#L118)

### finish (method)

Preserves the immutable plan Promise API.

**Signature**

```ts
declare const finish: () => Promise<ScaffoldPlan>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/scaffolding/plan-builder.ts#L126)

### relative (method)

Converts a source path into its existing project-relative representation.

**Signature**

```ts
declare const relative: (absolutePath: string) => string;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/scaffolding/plan-builder.ts#L135)

## `project-catalog.ts`

Resolves declared package versions for selected scaffold dependencies using installed project metadata and the portable release catalog.

### resolveProjectDependencies

Preserves the project catalog Promise API and authored alias ownership.

**Signature**

```ts
declare const resolveProjectDependencies: (
  projectRoot: string,
  dependencies: Readonly<Record<string, string>>,
) => Promise<Readonly<Record<string, string>>>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/scaffolding/project-catalog.ts#L49)

### resolveProjectDependenciesEffect

Resolves authored Bun aliases without replacing declarations or hiding filesystem authority.

**Signature**

```ts
declare const resolveProjectDependenciesEffect: (
  projectRoot: string,
  dependencies: Readonly<Record<string, string>>,
) => Effect.Effect<
  Readonly<Record<string, string>>,
  GeneratorIoError | GeneratorDomainError,
  GeneratorFileSystem
>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/scaffolding/project-catalog.ts#L24)

## `project-discovery-types.ts`

Defines immutable declaration-only scaffold discovery records. Compiler syntax
supplies layout/ownership; renderers preserve logical identities and provider
declarations while creating sources at their selected physical boundaries.

### DiscoveredArtifact (interface)

Static descriptor kind, identity, export form and owning source path.

**Signature**

```ts
export interface DiscoveredArtifact {
  readonly kind: SourceFactoryKind;
  readonly path: string;
  readonly domain?: string;
  readonly binding: string;
  readonly id?: string;
  readonly factory: string;
  readonly exported: boolean;
  readonly exportKind?: "default" | "named";
  readonly options: readonly string[];
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/scaffolding/project-discovery-types.ts#L35)

### DiscoveredProfile (interface)

Static provider capability, name, adapter/model identity and default selection.

**Signature**

```ts
export interface DiscoveredProfile {
  readonly capability: "bucket" | "cache" | "job" | "event" | "model";
  readonly name: string;
  readonly adapter?: string;
  readonly modelId?: string;
  readonly isDefault: boolean;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/scaffolding/project-discovery-types.ts#L50)

### DiscoveredService (interface)

Source-declared service identity, capability, members and optional database facts.

**Signature**

```ts
export interface DiscoveredService {
  readonly domain: string;
  readonly path: string;
  readonly binding: string;
  readonly capability: "generic" | "database" | "auth";
  readonly dialect?: DatabaseDialect;
  readonly schemaPath?: string;
  readonly members: readonly DiscoveredServiceMember[];
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/scaffolding/project-discovery-types.ts#L22)

### DiscoveredServiceMember (interface)

Statically discovered service member name and referenced binding.

**Signature**

```ts
export interface DiscoveredServiceMember {
  readonly name: string;
  readonly targetBinding?: string;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/scaffolding/project-discovery-types.ts#L14)

### ProjectDiscovery (interface)

Deterministic source-only app, provider, service and artifact facts for one project.

**Signature**

```ts
export interface ProjectDiscovery {
  /** Present on compiler-backed discovery; older supplied planning fixtures may omit it. */
  readonly layout?: ApplicationLayout;
  readonly projectRoot: string;
  readonly packagePath: string;
  readonly appPath: string;
  readonly appFactory: "defineApp" | "defineConfig";
  readonly envPath?: string;
  readonly services: readonly DiscoveredService[];
  readonly artifacts: readonly DiscoveredArtifact[];
  readonly profiles: readonly DiscoveredProfile[];
  readonly awsPulumiDeployment: boolean;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/scaffolding/project-discovery-types.ts#L61)

## `project-discovery.ts`

Composes source inspection and filesystem discovery into service, artifact and provider facts used by CLI scaffolding resolution.

### ProjectDiscoveryServiceTag (class)

Declaration-only project discovery authority; never imports user application modules.

**Signature**

```ts
declare class ProjectDiscoveryServiceTag
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/scaffolding/project-discovery.ts#L15)

### discoverProject

Preserves the existing Promise discovery API and original rejection constructors.

**Signature**

```ts
declare const discoverProject: (projectRoot: string) => Promise<ProjectDiscovery>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/scaffolding/project-discovery.ts#L89)

### discoverProjectEffect

Discovers canonical RELKIT source facts using caller-provided filesystem authority.

**Example**

```ts
import { Effect } from "effect";
import { discoverProjectEffect, projectDiscoveryLive } from "@relkit/cli/scaffolding";
const inspect = discoverProjectEffect("./my-app").pipe(Effect.provide(projectDiscoveryLive));
// Supply GeneratorFileSystem at the application or test composition boundary.
```

**Signature**

```ts
declare const discoverProjectEffect: (
  projectRoot: string,
) => Effect.Effect<
  ProjectDiscovery,
  GeneratorIoError | GeneratorDomainError,
  ProjectDiscoveryServiceTag
>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/scaffolding/project-discovery.ts#L77)

### projectDiscoveryLive

Discovery implementation with bounded independent reads and deterministic source order.

**Signature**

```ts
declare const projectDiscoveryLive: Layer.Layer<
  ProjectDiscoveryServiceTag,
  never,
  GeneratorFileSystem
>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/scaffolding/project-discovery.ts#L24)

## `render-database.ts`

Plans one native Drizzle service at the selected application boundary, including
schema tooling and environment declarations. Generator filesystem authority owns
source publication; no database client or migration runs during this workflow.

### RenderedDatabase

**Signature**

```ts
declare const RenderedDatabase: RenderedDatabase;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/scaffolding/render-database.ts#L12)

### renderDatabase

Preserves the renderDatabase Promise compatibility API.

**Signature**

```ts
declare const renderDatabase: (
  builder: PlanBuilder,
  request: Extract<AddRequest, { kind: "database" }>,
) => Promise<RenderedDatabase>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/scaffolding/render-database.ts#L93)

### renderDatabaseEffect

Plans database through the owning request and typed filesystem authority.

**Signature**

```ts
declare const renderDatabaseEffect: (
  builder: PlanBuilder,
  request: AddRequestBase & {
    readonly kind: "database";
    readonly orm: "drizzle";
    readonly dialect: DatabaseDialect;
    readonly authSchema?: boolean;
  },
) => Effect.Effect<RenderedDatabase, GeneratorIoError | GeneratorDomainError, GeneratorFileSystem>;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/scaffolding/render-database.ts#L41)

## `render-database.types.ts`

Carries the selected native database dialect and physical source destinations
between database/auth scaffold stages. Values describe source declarations;
no connection, transaction or provider ownership is acquired by planning.

### RenderedDatabase (interface)

Validated discovered/planned native database and registered schema locations.

**Signature**

```ts
export interface RenderedDatabase {
  readonly dialect: Extract<AddRequest, { kind: "database" }>["dialect"];
  readonly servicePath: string;
  readonly schemaPath: string;
}
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/scaffolding/render-database.types.ts#L10)

## `source-edit.ts`

Applies focused TypeScript syntax edits to existing source text while retaining unrelated authored statements and the planner's collision diagnostics.

### addFactoryObjectMember

Inserts one property into a canonical factory object or one nested object property.

**Signature**

```ts
declare const addFactoryObjectMember: (
  source: string,
  fileName: string,
  factories: readonly string[],
  path: readonly string[],
  memberName: string,
  memberSource: string,
) => string;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/scaffolding/source-edit.ts#L30)

### addSourceExport

Appends one export declaration after validating the source syntax.

**Signature**

```ts
declare const addSourceExport: (source: string, fileName: string, declaration: string) => string;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/scaffolding/source-edit.ts#L14)

### addSourceImport

**Signature**

```ts
declare const addSourceImport: (source: string, fileName: string, declaration: string) => string;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/scaffolding/source-edit.ts#L5)

### readFactoryObject

Parses the one supported factory object before editing its declarations.

**Signature**

```ts
declare const readFactoryObject: (
  source: string,
  fileName: string,
  factories: readonly string[],
) => ts.ObjectLiteralExpression;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/scaffolding/source-edit.ts#L59)

### readFactoryStringProperty

Reads one literal string property from a supported factory call.

**Signature**

```ts
declare const readFactoryStringProperty: (
  source: string,
  fileName: string,
  factory: string,
  name: string,
  argumentIndex?: number,
) => string | undefined;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/scaffolding/source-edit.ts#L76)

### staticPropertyName

Reads statically known property names without evaluating computed expressions.

**Signature**

```ts
declare const staticPropertyName: (node: ts.PropertyName | undefined) => string | undefined;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/scaffolding/source-edit.ts#L95)

## `source-import-edit.ts`

Adds and merges TypeScript import bindings required by planned source changes while preserving existing imports and module specifiers.

### addSourceImport

Adds or merges one import declaration without reprinting the source file.

**Signature**

```ts
declare const addSourceImport: (source: string, fileName: string, declaration: string) => string;
```

[Source](https://github.com/rel-kit/relkit/blob/main/packages/cli/src/scaffolding/source-import-edit.ts#L13)
