Search by

rmb32 / barnscaff-cli

rogerbarnfather

The barnscaff command: scaffold a folder from a Barncept schema, or scan one to check it still conforms

v1.0.0 2026-10-07 12:22 UTC

This package is auto-updated.

Last update: 2026-10-07 18:34:17 UTC


README

Part of BarnSuite.

The barnscaff command: scaffold a folder from a Barncept schema, or scan a folder to check it still conforms. Built on Barnscaff.

Requirements

  • PHP 8.5+

Installation

composer require rmb32/barnscaff-cli

Setup

Run vendor/bin/barncept init once (from Barncept CLI) so the project has a barncept.json saying where its schemas live. barnscaff uses it to resolve a bare schema name; you can always pass a file path instead.

Usage

barnscaff scaffold <schema> <rootKey> <target> [--apply]
barnscaff scan <schema> <rootKey> <path>
  • <schema> — a schema JSON path, or a bare name (library → <schemaDirectory>/library.json).
  • <rootKey> — the root Implementation key to resolve from.
  • scaffold prints the plan and writes nothing; add --apply to create the directories and files.
  • scan prints every finding (Missing / Unexpected / Misplaced / TypeMismatch) and exits 0 if conformant, 1 otherwise — handy in CI.
$ barnscaff scaffold library Root ./generated
[Directory] ./generated
[Directory] ./generated/Core
[Directory] ./generated/Command
[File] ./generated/Command/Cmd.php
Re-run with --apply to write these to disk.

$ barnscaff scaffold library Root ./generated --apply
$ barnscaff scan library Root ./generated
Conformant.

Related packages

  • Barnscaff — the library behind this CLI, for use from PHP.
  • Barncept — schemas and concept graphs.
  • Barncept CLI — barncept init.
  • Barnark CLI — template:scaffold / template:check against ready-made architecture templates.

More docs

Internals · History

License

Proprietary. See LICENSE. Copyright (c) Roger Barnfather.