Skip to content

Quickstart

Install bluprint globally with your preferred package manager:

Terminal window
pnpm add -g @reuters-graphics/bluprint
Terminal window
npm install -g @reuters-graphics/bluprint

Any repo becomes a bluprint when you add a bluprint.config.ts to its root. In the project you want to templatize, run:

Terminal window
bluprint new

That scaffolds a starter config:

bluprint.config.ts
import { defineConfig } from '@reuters-graphics/bluprint';
export default defineConfig({
name: 'My bluprint',
bluprint: '^1.0.0',
files: ['**/*'],
ignores: [],
actions: [],
});
  • files / ignores decide which of the repo’s files get scaffolded.
  • actions transform those files after they’re copied — see the Actions guide.

See Creating a bluprint for every option.

Before publishing, test your bluprint straight from your working directory:

Terminal window
bluprint preview

This scaffolds your current files into a temp directory, runs your actions, and prints the path so you can inspect exactly what a user would get — no publishing required. See Previewing.

Commit bluprint.config.ts and push to GitHub. That’s it — there’s no separate publish step; the CLI pulls straight from the repo.

Register your bluprint with the CLI by its GitHub repo:

Terminal window
bluprint add reuters-graphics/my-bluprint

A repo can be referenced by URL (https://github.com/user/repo), SSH string (git@github.com:user/repo.git), or the user/repo shorthand.

Then scaffold a new project from it in an empty directory:

Terminal window
bluprint start

The CLI lists your registered bluprints, scaffolds the files, and runs the actions — prompting you for anything they need.

To let the CLI read a private repo, provide a personal access token one of two ways:

Terminal window
export GITHUB_TOKEN=<your token> # environment variable
Terminal window
bluprint token <your token> # saved to your CLI profile