rushphp / support
Shared helpers for RUSH - Registry-driven Unified Shell Helper. Filesystem primitives and operator identity.
v0.2.0
2026-11-23 17:33 UTC
Requires
- php: ^8.3
Requires (Dev)
- pestphp/pest: ^3.8
- phpstan/phpstan: ^2.2
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
RUSH Support
RUSH — Registry-driven Unified Shell Helper.
Shared helpers used by the RUSH manager and its tools. No runtime dependencies.
Pre-1.0: minor releases may include breaking changes.
✨ Features
FileSystem: safe directory creation, atomic writes, recursive copy/delete.Operator: value object for the shared operator identity.OperatorFile: reads and writes.rush/operator.json.
📦 Installation
composer require rushphp/support
Requirements
- PHP 8.3 or newer.
- No runtime dependencies.
🧩 Usage
use Rush\Support\FileSystem; use Rush\Support\Operator; use Rush\Support\OperatorFile; FileSystem::ensureDirectory('/srv/app/.rush/code'); OperatorFile::save('/srv/app', new Operator('Developer', 'developer@example.com')); $operator = OperatorFile::load('/srv/app'); echo $operator->name;
The operator file is stored at:
.rush/operator.json
and is mandatory for tool commands that record who performed an action.
🤝 Contributions
Contributions are welcome. Open an issue or submit a pull request.
📄 License
MIT. See LICENSE.