Search by

rushphp / support

stougeiro

Shared helpers for RUSH - Registry-driven Unified Shell Helper. Filesystem primitives and operator identity.

Package info

github.com/rushphp/support

pkg:composer/rushphp/support

Statistics

Installs: 35

Dependents: 4

Suggesters: 0

Stars: 0

Open Issues: 0

v0.2.0 2026-11-23 17:33 UTC

This package is auto-updated.

Last update: 2026-11-23 18:08:47 UTC


README

English | Português

PHP PHPStan-Level License

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.