leafs/aloe
Aloe is a lightweight Laravel/PHP package from Leafs, offering a focused, easy-to-install toolkit for common application tasks. It emphasizes simple configuration and a clean API, making it a practical addition to Laravel projects.
Aloe is a global CLI that wraps the boring parts of a Leaf app: scaffolding, serving, and installing Leaf packages with their config side effects. It is not a Laravel Artisan replacement — think "project bootstrapper + package installer + dev server" rather than a full task runner.
Minimum viable setup:
composer global require leafs/aloe
# make sure Composer's global bin dir is on PATH
export PATH="$HOME/.config/composer/vendor/bin:$PATH" # Linux/macOS
# Windows: %APPDATA%\Composer\vendor\bin
aloe --version
aloe list # this is the first thing to read
First day workflow:
aloe new my-app # interactive; scaffolds a Leaf skeleton
cd my-app
aloe serve # dev server, default host/port depends on version
# open http://localhost:<port>, edit your route file, refresh
For an existing project, Aloe infers context from the current working directory, so run it from the app root. If you want reproducibility across a team, also install it locally (composer require --dev leafs/aloe) and invoke vendor/bin/aloe; the global binary is convenient, the local one is version-pinned.
Your first real use case should be package installation, because that is where Aloe adds value over raw Composer:
aloe install leafs/auth
# vs. composer require leafs/auth + manually wiring config/env
Check the git diff after that command — Aloe runs the package's install hook, which may publish config, touch .env, or modify bootstrap files.
Bootstrap → serve → install loop. Use aloe new to create the skeleton, aloe serve as the inner-loop server, and aloe install/aloe uninstall whenever you add or remove a Leaf package. Treat aloe uninstall as the mirror of install; don't hand-reverse a package's config changes.
Composer scripts as the stable interface. Aloe commands change between majors; your team's muscle memory shouldn't. Wrap them:
{
"scripts": {
"serve": "aloe serve",
"setup": ["composer install", "aloe install leafs/auth"]
}
}
Then composer serve works regardless of whether Aloe later moves to vendor/bin or a different binary name.
Docker/CI pattern. Install Aloe globally in the image and use it for setup steps, but don't use aloe serve as a production server:
RUN composer global require leafs/aloe
ENV PATH="/root/.config/composer/vendor/bin:${PATH}"
CMD ["aloe", "serve", "--host=0.0.0.0"]
For containers you usually need an explicit host binding; the default binds to localhost and will be unreachable from outside the container.
Custom commands as a task runner. Aloe's real leverage is turning repeated project chores into aloe <task>. The shape is a command class registered with the CLI:
namespace App\Console;
use Aloe\Command;
class SeedDemoCommand extends Command
{
protected $name = 'seed:demo';
protected $description = 'Seed demo data';
protected function handle(): int
{
// call your app code here
$this->output->writeln('Seeded.');
return 0;
}
}
Register it in whatever hook your Aloe version exposes (inspect the package source or existing service providers — this is under-documented). If registration is awkward in your version, keep the command as a plain PHP script and expose it through a Composer script instead; don't fight the tool.
Package install is a workflow, not a one-liner. The pattern that works:
git status clean.aloe install leafs/<pkg>..env and config changes.aloe serve) and exercise the new feature.That makes aloe uninstall safe to reason about later.
Scaffolding as a starting point, not a source of truth. Generated controllers/models/routes are meant to be edited immediately. Don't re-run generators over files you've already customized unless you've checked the overwrite behavior.
composer global require leafs/aloe:^x.y) and document it, or prefer vendor/bin/aloe locally. This is the most common source of "works on my machine."%APPDATA%\Composer\vendor\bin) and in minimal Docker images. aloe: command not found almost always means PATH, not a missing install.aloe install may edit .env, config files, and bootstrap code. Always inspect git diff; never run it on a dirty tree in CI without knowing what it does. aloe uninstall can leave artifacts behind.aloe serve. It's a development convenience (typically a thin wrapper over PHP's built-in server). No TLS, no concurrency tuning, no process supervision. Use nginx + php-fpm or an equivalent for anything real.watchexec, entr, or your editor's save hooks if refresh-on-change matters.aloe.bat; symlink and permission behavior differs. Prefer running inside WSL or a container if you hit odd failures.aloe list to confirm the command exists, aloe <cmd> -v/-vvv for verbosity if it's Symfony Console–based, and composer global show leafs/aloe to confirm what's actually installed. When output is unhelpful, read the command class in the package source — with 5 stars and near-zero dependents, the source is often better documentation than the docs.composer require / php -S equivalents in your README so the team isn't blocked if Aloe misbehaves or is abandoned.aloe serve fails to bind, pass an explicit port; check for a stale PHP process left behind by a previous run.How can I help you explore Laravel packages today?