rmb32 / barnscaff-cli
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
Requires
- php: ^8.5
- rmb32/barncept: ^1.0
- rmb32/barnscaff: ^1.0
Requires (Dev)
- infection/infection: ^0.35.4
- phpstan/phpstan: ^2.2
- phpunit/phpunit: ^13.3
- rector/rector: ^2.6
- squizlabs/php_codesniffer: ^4.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
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.scaffoldprints the plan and writes nothing; add--applyto create the directories and files.scanprints every finding (Missing/Unexpected/Misplaced/TypeMismatch) and exits0if conformant,1otherwise — 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:checkagainst ready-made architecture templates.
More docs
License
Proprietary. See LICENSE. Copyright (c) Roger Barnfather.