---
title: Automate project tooling
description: Preview project creation, inspect CLI help, and choose the correct public tooling package.
pagination: false
sidebar:
  icon: code
---

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`:

```ts title="preview-orders.ts"
/** 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](/docs/api/cli).

## Choose the package and operation

| Package            | Use it for                                                                          | Reference                                                   |
| ------------------ | ----------------------------------------------------------------------------------- | ----------------------------------------------------------- |
| `create-relkit`    | Normalize creation options, preview a project, or explicitly generate it            | [Generator APIs](/docs/api/create-relkit#all-exported-apis) |
| `@relkit/cli`      | Invoke commands with controlled I/O/cancellation, run development, or add artifacts | [CLI automation APIs](/docs/api/cli-api#all-exported-apis)  |
| `@relkit/cli/help` | Read command descriptions, arguments, flags, and examples                           | [Help model](/docs/api/cli-api#public-imports)              |
| `relkit`           | Resolve and launch the CLI installed in the target project                          | [Launcher APIs](/docs/api/relkit#all-exported-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](/docs/learn/create-an-app) for the complete user workflow,
or [Add application files](/docs/modules/cli/add-artifacts) for an existing project.

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

**Reference and source**

- [`@relkit/cli` API](/docs/api/cli-api)
- [`create-relkit` API](/docs/api/create-relkit)
- [`relkit` API](/docs/api/relkit)

- [`apps/docs/examples/public-api/tooling.ts`](https://github.com/rel-kit/relkit/blob/main/apps/docs/examples/public-api/tooling.ts)
