ausus/cli
Composer 安装命令:
composer require ausus/cli
包简介
AUSUS — CLI (L6): DSL frontend and the `ausus compile` command. Discovers closed-DSL definition files, scans them for forbidden symbols, compiles them to content-addressed EntitySchema via the Entity Engine, and persists through FileSchemaRepository. PHP-native, no container, no auto-discovery.
关键字:
README 文档
README
AUSUS 2.0 — CLI (L6). The authoring frontend for the Entity Engine: it
discovers closed-DSL definition files, scans them for forbidden symbols,
compiles them to content-addressed EntitySchema, and persists them through
a FileSchemaRepository. PHP-native: no container, no auto-discovery.
Installation
composer require ausus/cli:^2.0
Dependencies
- PHP 8.3+
ausus/kernel,ausus/authoring,ausus/entity-engine(resolved automatically)
Public surface
Ausus\Cli\Authoring\DslFrontend—discover(string $root): EntityDefinition[](loads*.phpdefinition files; one-shot evaluation, forbidden-symbol scan).Ausus\Cli\Command\CompileEntitiesCommand—run(string $entitiesDir, string $aususRoot, $stdout = null, $stderr = null): int. Discovers + compiles in memory, then writes atomically (.ausus/schemas/<hash>.json+index.json); on any error nothing is written.Ausus\Cli\Repository\FileSchemaRepository—resolve(string $entityId): EntitySchema,getByHash(),putByHash(). Reads/writes the content-addressed store; never recompiles.
Minimal example
compile.php in your project root:
<?php require __DIR__ . '/vendor/autoload.php'; use Ausus\Cli\Command\CompileEntitiesCommand; // entities/*.php each `return Definition::make(...)->build();` exit((new CompileEntitiesCommand())->run(__DIR__ . '/entities', __DIR__ . '/.ausus'));
php compile.php
# → writes .ausus/schemas/<hash>.json + .ausus/index.json
Documentation
See the canonical reference docs/v2/ and the
Quick Start (EE-RFC-011 / EE-RFC-012).
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-06-29