# @codetools/blueprints-cli

> A tool for generating predefined files and directories

Latest version **2.0.0** (published 2026-03-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install @codetools/blueprints-cli
pnpm add @codetools/blueprints-cli
yarn add @codetools/blueprints-cli
bun add @codetools/blueprints-cli
```

Provides the commands `bp`, `bp-mcp`.

## Health

**Score 50/100 (C)** — status: stable.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

## Facts

| | |
|---|---|
| Version | 2.0.0 |
| Published | 2026-03-26 |
| First published | 2021-01-15 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Node | >=20 |
| Dependencies | 19 |
| Unpacked size | 221.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | yes |
| GitHub stars | 0 |
| Author | Cliff Pyles |
| Maintainers | cliffpyles |
| Keywords | node, cli, scaffold, generate, boilerplate, automation, workflow, template |

## Links

- npm: https://www.npmjs.com/package/@codetools/blueprints-cli
- Repository: https://github.com/codetools-io/blueprints-cli
- Homepage: https://github.com/codetools-io/blueprints-cli#readme
- Issues: https://github.com/codetools-io/blueprints-cli/issues
- npm.io page: https://npm.io/package/@codetools/blueprints-cli

## Dependencies (19)

- [rc](https://npm.io/package/rc.md) ^1.2.6
- [zod](https://npm.io/package/zod.md) ^4.3.6
- [yaml](https://npm.io/package/yaml.md) ^2.3.4
- [globby](https://npm.io/package/globby.md) ^16.1.1
- [lodash](https://npm.io/package/lodash.md) ^4.17.23
- [find-up](https://npm.io/package/find-up.md) ^8.0.0
- [treeify](https://npm.io/package/treeify.md) ^1.1.0
- [date-fns](https://npm.io/package/date-fns.md) ^4.1.0
- [dot-prop](https://npm.io/package/dot-prop.md) ^10.1.0
- [fs-extra](https://npm.io/package/fs-extra.md) ^11.3.4
- [commander](https://npm.io/package/commander.md) ^14.0.3
- [lodash-es](https://npm.io/package/lodash-es.md) ^4.17.23
- [cli-table3](https://npm.io/package/cli-table3.md) ^0.6.5
- [inflection](https://npm.io/package/inflection.md) ^3.0.2
- [@langchain/core](https://npm.io/package/@langchain/core.md) ^1.1.35
- [@langchain/openai](https://npm.io/package/@langchain/openai.md) ^1.3.0
- [@langchain/anthropic](https://npm.io/package/@langchain/anthropic.md) ^1.3.25
- [@langchain/google-genai](https://npm.io/package/@langchain/google-genai.md) ^2.1.26
- [@modelcontextprotocol/sdk](https://npm.io/package/@modelcontextprotocol/sdk.md) ^1.28.0

## Alternatives

- [@salesforce/cli](https://npm.io/package/@salesforce/cli.md) — 389.7K weekly downloads
- [@mintlify/cli](https://npm.io/package/@mintlify/cli.md) — 208.9K weekly downloads
- [@grafana/e2e-selectors](https://npm.io/package/@grafana/e2e-selectors.md) — 128.7K weekly downloads
- [mintlify](https://npm.io/package/mintlify.md) — 112.0K weekly downloads
- [@intlayer/cli](https://npm.io/package/@intlayer/cli.md) — 22.8K weekly downloads

## Recent versions

- 2.0.0 (latest) — 2026-03-26
- 2.0.0-rc.1 (rc) — 2026-03-26
- 2.0.0-beta.2 (beta) — 2023-12-15
- 2.0.0-beta.1 — 2023-12-14
- 2.0.0-beta.0 — 2023-12-14
- 1.16.1 — 2021-01-19
- 1.16.0 — 2021-01-17
- 1.15.0 — 2021-01-15
- 1.14.5 — 2021-01-15
- 1.14.4 — 2021-01-15
- 1.14.3 — 2021-01-15

## README

# blueprints-cli

A tool for generating files and directories from reusable templates called *blueprints*. Commonly used to scaffold components, services, configurations, and other repeatable file structures.

## Installation

```bash
npm install -g @codetools/blueprints-cli
```

## Quick Start

```bash
# 1. Create a blueprint
bp new -g myBlueprint

# 2. Add template files to ~/.blueprints/myBlueprint/files/

# 3. Generate from the blueprint
bp generate myBlueprint MyInstance
```

## Commands

| Command | Description | Options |
| ------- | ----------- | ------- |
| `generate\|g <blueprint> <instance>` | Generate files from a blueprint. Extra `key=value` args supply template data. | `-d, --dest <dir>`: Output directory.<br>`--dry-run`: Preview without writing.<br>`--json`: Machine-readable output. |
| `info\|i <blueprint>` | Inspect a blueprint and list its required variables. | `--json` |
| `list\|ls [namespace]` | List all available blueprints. | `-l, --long`: Show descriptions.<br>`--json` |
| `new <blueprint>` | Create a new blueprint template. | `-g, --global`: Create globally.<br>`-s, --source <path>`: Seed from a directory.<br>`--json` |
| `import <globalBlueprint> [localBlueprint]` | Copy a global blueprint into the current project. | `--json` |
| `remove\|rm <blueprint>` | Remove a blueprint. | `-g, --global`: Remove from global store.<br>`--json` |
| `init [projectPath]` | Initialize a `.blueprints` directory in a project. | `--json` |
| `ask\|a <blueprint> <instance>` | Generate files using AI and blueprint prompts. | `-d, --dest <dir>`<br>`-m, --model <id>` |
| `models\|md` | List configured AI model ids, providers, and model names. | — |

The global `--json` flag is supported on all commands except `ask` and `models`. When set, output is emitted as structured JSON to stdout; errors are emitted as `{ "error": { "code", "message" } }` to stderr with exit code 1.

## Example

```bash
# Inspect a blueprint first
bp info statusReport --json

# Generate with template data
bp generate statusReport ProjectAlpha projectName="Project Alpha" status="On Track" date=2023-12-08
```

## MCP Server (Agent Integration)

blueprints-cli ships an MCP server so AI agents (Claude Code, Claude Desktop, etc.) can call blueprint operations directly without shell execution.

**Recommended — zero-install via `npx`:**

```json
{
  "mcpServers": {
    "blueprints": {
      "command": "npx",
      "args": ["-y", "-p", "@codetools/blueprints-cli", "bp-mcp"]
    }
  }
}
```

**Working inside this repo?** An `.mcp.json` is included at the project root — compatible clients connect automatically with no extra setup.

See [Agent Integration](docs/agent-integration.md) for all setup options, available tools, and CLI JSON mode.

## Documentation

- [Blueprint Structure](docs/blueprints.md) — directory layout, `blueprint.json` schema, template syntax, lifecycle hooks
- [Template Variables](docs/template-variables.md) — `{{ var }}` / `__var__` patterns and auto-generated metadata
- [AI Generation](docs/ai-generation.md) — `bp ask`, model configuration, prompt files
- [Agent Integration](docs/agent-integration.md) — `--json`, `--dry-run`, `bp info`, MCP server
- [Examples](docs/examples.md) — full worked examples

---
_Source: https://npm.io/package/@codetools/blueprints-cli · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
