open-index/open-npm huggingface dataset:
npm package: @promptype/cli
Description: CLI for Promptype - build and preview prompts
Author: Promptype
Latest version: 1.0.0

# @promptype/cli

Generate prompt preview files from your Promptype registry fixtures.

Before you start:

- [Repository README](https://github.com/promptype/promptype/blob/main/README.md)
- [Learning Docs](https://github.com/promptype/promptype/tree/main/docs/learn)

## Installation

```bash
npm install -D @promptype/cli
```

## Quick Usage

```bash
npx promptype build
```

```bash
npx promptype build [compositionId] [options]
```

Options:

- `-f, --fixture <name>`: build a single fixture
- `-o, --outdir <path>`: set output directory
- `-c, --config <path>`: set config file path
- `--no-metadata`: generate previews without header metadata
- `--no-clean`: keep stale preview files

## Features

- Fixture-driven preview generation (`complete`, `partial`, `placeholder`)
- Estimated input cost block when pricing is configured (`defaultCost` or entry `cost`)
- Estimated tokens fallback when pricing is not configured
- Metadata header controls (`--no-metadata`)
- Stale preview cleanup by default (`--no-clean` to disable)
- Default output directory: `.promptype/builds`

## License

Apache-2.0
npm package: @promptype/core
Description: A powerful and type-safe prompt engineering framework for TypeScript
Author: Promptype
Latest version: 1.0.0

# @promptype/core

Build reusable, validated prompt architectures for production LLM workflows.

Before you start:

- [Repository README](https://github.com/promptype/promptype/blob/main/README.md)
- [Learning Docs](https://github.com/promptype/promptype/tree/main/docs/learn)

## Installation

```bash
npm install @promptype/core
```

## Quick Usage

```ts
import { createPromptComponent, createPromptComposition } from '@promptype/core';
import { z } from 'zod';

const role = createPromptComponent({
  key: 'role',
  schema: z.object({ role: z.string() }),
  template: 'You are a {{role}}.',
});

const task = createPromptComponent({
  key: 'task',
  schema: z.object({ task: z.string() }),
  template: 'Task: {{task}}',
});

const prompt = createPromptComposition({
  id: 'assistant',
  components: [role, task],
}).build({ role: 'analyst', task: 'review this report' });

console.log(prompt.asString());
console.log(prompt.metadata.estimatedTokens);
```

## Features

- Prompt components
- Prompt compositions
- Composition patterns
- Prompt strategies
- Registry (`Promptype`)
- Metadata (`estimatedTokens`)

## License

Apache-2.0