Search by

rmb32 / barnscaff-cli

rogerbarnfather

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

v2.0.0 2026-10-19 20:50 UTC

This package is auto-updated.

Last update: 2026-10-28 19:46:15 UTC


README

Part of Barn.

The barnscaff command: scaffold a folder from a Barncept concept, 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 concepts live, and which other folders it may borrow from. barnscaff uses it to find a concept by name; you can always pass a file path instead. Without a barncept.json it looks in ./concepts.

Usage

barnscaff scaffold <concept> <choice> <target> [--apply]
barnscaff scan <concept> <choice> <path>
  • <concept> — a path to a concept file, or a concept's name in the project's concept folder. A concept that borrows others is composed first, so they must be in that folder or a borrowFrom one.
  • <choice> — the key of the Choice to resolve from: an entry point with no open slots beneath it.
  • 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 — concepts, and the graphs they resolve to.
  • 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.