Skip to content
RELKIT
Esc
↑↓navigate↵open⌘Jpreview
On this page

Automate project tooling

Preview project creation, inspect CLI help, and choose the correct public tooling package.

Use the CLI commands for everyday development. Use the programmatic APIs when an editor, test harness, or other tool needs to inspect or drive the same behavior.

Preview a new application

Install create-relkit and @relkit/cli as development dependencies in your tooling package. Call previewOrders with an existing parent directory that does not contain relkit-orders:

/** Uses the generator's read-only planning API and the CLI's native command model. */
import { findCliHelp } from "@relkit/cli/help";
import { normalizeCreateOptions, planCreate } from "create-relkit";

/** Reads a minimal application's planned files without creating or installing a project.
 * @param cwd - Parent directory in which a future project would be created.
 * @returns Validated file/dependency preview; no project files are written. */
export async function previewOrders(cwd: string) {
  const options = normalizeCreateOptions([
    "relkit-orders",
    "--template",
    "minimal",
    "--no-install",
    "--no-git",
  ]);
  return planCreate(options, { cwd });
}

export const checkHelp = findCliHelp(["check"]);

The preview contains the destination, planned files, and dependency versions. It does not create the application, install packages, or initialize Git. normalizeCreateOptions validates the same explicit template/cloud/deployment choices as the command line. findCliHelp returns the command model used by terminal help and the CLI reference.

Choose the package and operation

Package Use it for Reference
create-relkit Normalize creation options, preview a project, or explicitly generate it Generator APIs
@relkit/cli Invoke commands with controlled I/O/cancellation, run development, or add artifacts CLI automation APIs
@relkit/cli/help Read command descriptions, arguments, flags, and examples Help model
relkit Resolve and launch the CLI installed in the target project Launcher APIs

Creation and scaffold execution write files; preview operations return plans. Keep the preview and execution boundaries explicit in your own tool. A development handle owns processes and watchers: await its stop operation when your tool is finished.

Follow Create an application for the complete user workflow, or Add application files for an existing project.

Reference and source