Convert this repo in place from a Laravel package into a Laravel Zero 12 standalone CLI named crow, with Composer package identity crowbot/cli. The primary UX becomes PHAR-first distribution through Packagist, short commands like crow plan, and a new crow auth login setup flow.
Use the current Laravel Zero docs path: composer create-project style skeleton, commands in app/Commands, config in config, PHAR builds via php crow app:build crow, and Packagist PHAR bin behavior from the PHAR distribution docs.
- Replace package scaffolding with Laravel Zero app scaffolding:
composer.jsonbecomes a Laravel Zero project usinglaravel-zero/framework:^12.- Rename app executable to
crow. - Set Composer package name to
crowbot/cli. - Remove Laravel package auto-discovery and
CrowListenServiceProvider. - Add
box.json,bootstrap/app.php, Laravel Zeroconfig/app.php, andconfig/commands.php.
- Move reusable code into app namespace:
- Existing commands become Laravel Zero commands under
app/Commands. - Existing client, formatter, and listener classes move under
app/Supportor equivalentApp\...namespace. - Keep behavior of current
plan,read, andlistenflows unless explicitly changed below.
- Existing commands become Laravel Zero commands under
- Command UX:
- Primary commands are
crow plan,crow read, andcrow listen. - Add hidden/compat aliases for
crow:plan,crow:read, andcrow:listenwhere Laravel command aliasing allows it. - Update command output that currently says
php artisan crow:plan <plan-id>to saycrow plan <plan-id>.
- Primary commands are
- Auth/config:
- Add
crow auth login. - Prompt for API token and optional API URL.
- Store credentials in
~/.crow/config.jsonwith restrictive permissions where supported. - Config precedence: explicit command option, environment variable,
~/.crow/config.json, then default config. - Keep default API URL as the current
https://crow.test/api/v1. - Preserve existing env vars like
CROW_API_TOKEN,CROW_API_URL,CROW_APP_ID, and listener options for automation.
- Add
- PHAR-first distribution:
- Build artifact name is
builds/crow. - Composer
binpoints tobuilds/crowfor release/Packagist distribution. - Move Laravel Zero runtime dependencies to the release model recommended by the docs for PHAR Packagist installs.
- Include Laravel Zero
dotenvandhttpcomponents so HTTP and adjacent.envfiles work in PHAR usage.
- Build artifact name is
- Port current PHPUnit/Testbench command tests to Laravel Zero app tests.
- Cover:
crow planlists plans and printscrow plan <plan-id>.crow plan <id>outputs markdown/json and handles API failures.crow readfetches latest or by ID and respects--leave-unread.crow listenpreserves listener registration/no-register behavior.crow auth loginwrites~/.crow/config.jsonand command config reads it.- Env vars override stored config.
- Hidden compatibility aliases still execute the same command behavior.
- Add build verification:
composer testor equivalent test command passes.php crow listshows the expected commands.php crow app:build crow --build-version=<version>createsbuilds/crow../builds/crow plan --helpruns successfully.
- This repo stops being a Laravel installable package and becomes only the standalone CLI.
- v1 does not add native single-file binaries; PHAR is the release artifact.
crow auth loginis the only new auth command for this migration; logout/status can be added later.- Production still defaults to
https://crow.test/api/v1until a different URL is provided.