> ## Documentation Index
> Fetch the complete documentation index at: https://docs.veadk.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# Build a product CLI

Declare the product in product.yaml and define commands through modules, catalogs and transport bindings. The examples scaffold a minimal HTTP project, validate it offline, build it and package it. Check the result with node dist/index.js --help from the project directory. Packaging creates an npm tarball and any declared skill bundles. By default a skill calls the installed product command.

> [!WARNING]
>
> Publishing uploads the package to the configured npm registry. The example uses --dry-run to review it first.

## cli init

`agentkit cli init <name>`

| Option | Description | Default |
| - | - | - |
| `--dir <dir>` | target directory (defaults to ./`<name>`) | — |
| `--force` | overwrite generated files in a non-empty directory | Off |
| `--template <template>` | scaffold template: "default" (HTTP + MCP) or "http" (minimal HTTP) | default |
| `--json` | output a machine-readable result | Off |

```bash theme={null}
agentkit cli init answers-cli --template http
```

## cli validate

| Option | Description | Default |
| - | - | - |
| `--dir <dir>` | project directory | — |
| `--contracts` | run the explicit read-only contract cases in tests/contracts.json | Off |
| `--json` | output a machine-readable result | Off |

```bash theme={null}
agentkit cli validate --dir ./answers-cli
```

## cli build

| Option | Description | Default |
| - | - | - |
| `--dir <dir>` | project directory | — |
| `--out-dir <dir>` | output directory, relative to the project root (defaults to dist) | — |
| `--json` | output a machine-readable result | Off |

```bash theme={null}
agentkit cli build --dir ./answers-cli
```

## cli pack

| Option | Description | Default |
| - | - | - |
| `--dir <dir>` | project directory | — |
| `--bundle-cli` | include a private CLI copy in each Skill bundle (default: use the installed command) | Off |
| `--manifest` | write optional manifest.json metadata into each Skill bundle | Off |
| `--json` | output a machine-readable result | Off |

```bash theme={null}
agentkit cli pack --dir ./answers-cli
```

## cli publish

| Option | Description | Default |
| - | - | - |
| `--dir <dir>` | project directory | — |
| `--registry <url>` | override package.json publishConfig.registry | — |
| `--dry-run` | run npm publish --dry-run | Off |
| `--json` | output a machine-readable result | Off |

```bash theme={null}
agentkit cli publish --dir ./answers-cli --dry-run
```

The README produced by cli init includes build, invocation and packaging commands. From the generated project root, check the entry point with the following command.

```bash theme={null}
node dist/index.js --help
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.