Repository: configuredco/haulable
Branch: main
Commit: a8526c260d7b
Files: 26
Total size: 17.2 MB
Directory structure:
gitextract_gek_81al/
├── .editorconfig
├── .gitattributes
├── .gitignore
├── LICENSE
├── README.md
├── app/
│ ├── Commands/
│ │ ├── .gitkeep
│ │ └── Package.php
│ ├── Enums/
│ │ └── Platform.php
│ └── Providers/
│ └── AppServiceProvider.php
├── bootstrap/
│ └── app.php
├── box.json
├── builds/
│ └── haulable
├── composer.json
├── config/
│ ├── app.php
│ ├── commands.php
│ ├── filesystems.php
│ └── view.php
├── haulable
├── phpunit.xml.dist
├── pint.json
├── resources/
│ └── views/
│ ├── error.blade.php
│ ├── intro.blade.php
│ └── packaging-successful.blade.php
└── tests/
├── CreatesApplication.php
├── Pest.php
└── TestCase.php
================================================
FILE CONTENTS
================================================
================================================
FILE: .editorconfig
================================================
root = true
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 4
trim_trailing_whitespace = true
[*.md]
trim_trailing_whitespace = false
[*.yml]
indent_style = space
indent_size = 2
================================================
FILE: .gitattributes
================================================
* text=auto eol=lf
/.github export-ignore
.scrutinizer.yml export-ignore
BACKERS.md export-ignore
CONTRIBUTING.md export-ignore
CHANGELOG.md export-ignore
================================================
FILE: .gitignore
================================================
/vendor
/.idea
/.vscode
/.vagrant
.phpunit.result.cache
macos_intel
macos_apple
linux_x86_64
linux_aarch64
windows_x64
================================================
FILE: LICENSE
================================================
MIT License
Copyright (c) 2023 Joe Campo
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
================================================
FILE: README.md
================================================
<p align="center">
<a href="https://packagist.org/packages/configured/haulable"><img src="https://img.shields.io/packagist/dt/configured/haulable" alt="Total Downloads"></a>
<a href="https://packagist.org/packages/configured/haulable"><img src="https://img.shields.io/packagist/v/configured/haulable" alt="Latest Stable Version"></a>
<a href="https://packagist.org/packages/configured/haulable"><img src="https://img.shields.io/packagist/l/configured/haulable" alt="License"></a>
</p>

Haulable is a CLI tool that packages your existing PHP CLI Phar with [PHP Micro CLI](https://github.com/dixyes/phpmicro) for MacOS (Apple/Intel), Linux, and Windows. This enables your existing PHP CLI app built with something like [Laravel Zero](https://github.com/laravel-zero/laravel-zero) to be truly portable as the end user will no longer need PHP to be installed to run your application.
### Requirements
* Haulable currently only runs on MacOS/Linux; however, it will package your CLI for Windows.
* Your CLI application must be built using PHP8.0+
### Installation
To install Haulable, you can use `composer` to install globally, or you can use the Phar directly by downloading the latest build.
```bash
composer global require configured/haulable
```
### Usage
To use Haulable, once installed, you can simply run `haulable your_cli_app.phar`. Haulable will then ask you for what target system(s) you'd like to package your CLI app for.

#### Options
Haulable accepts options and arguments to make it easier to use in CI pipelines
##### Platform
An option can be one of the following:
* All Platforms
* MacOS (Intel)
* MacOS (Apple)
* Linux (x86_64)
* Linux (aarch64)
* Windows (x64)
```bash
haulable your_cli_app.phar --platform="<option>"
```
## License
Haulable is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).
================================================
FILE: app/Commands/.gitkeep
================================================
================================================
FILE: app/Commands/Package.php
================================================
<?php
namespace App\Commands;
use App\Enums\Platform;
use Illuminate\Support\Facades\File;
use Illuminate\Support\Facades\Process;
use Illuminate\Support\Facades\Storage;
use LaravelZero\Framework\Commands\Command;
use Symfony\Component\Console\Helper\ProgressBar;
use function Termwind\{render}; //@codingStandardsIgnoreStart
class Package extends Command
{
protected $signature = 'package {phar} {--platform=} {--php=}';
protected $description = 'Package PHAR with PHP Micro';
protected const STORAGE_URL = 'https://haulable.configured.co/';
protected ProgressBar $progress;
protected ?Platform $platform;
public function handle(): void
{
if (! File::exists($this->argument('phar'))) {
$this->error('The path to the PHAR could not be found.');
exit();
}
$this->setupProgress();
render(view('intro', ['version' => app('git.version')]));
$this->determinePlatform();
match ($this->platform) {
Platform::ALL_PLATFORMS => $this->packageForAllPlatforms(),
null => $this->error('The specified --platform option is invalid.'),
default => $this->package($this->platform)
};
}
private function determinePlatform(): void
{
if (! $choice = $this->option('platform')) {
$choice = $this->choice('Create for which platform?', array_column(Platform::cases(), 'value'));
}
$this->platform = Platform::tryFrom($choice);
}
private function packageForAllPlatforms(): void
{
collect(Platform::cases())->skip(1)->each(fn (Platform $platform) => $this->package($platform));
}
private function package(Platform $platform, string $phpVersion = null): void
{
$sfx = $this->downloadSfx($platform, $phpVersion);
$dir = getcwd().'/'.str($platform->value)->lower()->replace(['(', ')'], '')->replace(' ', '_')->value;
$buildName = basename($this->argument('phar'));
$fileExtension = $platform === Platform::WINDOWS ? '.exe' : '';
if (! File::isDirectory($dir)) {
File::makeDirectory($dir);
}
$result = Process::run("cat {$sfx} {$this->argument('phar')} > {$dir}/{$buildName}{$fileExtension}");
match (true) {
$result->successful() => render(
view('packaging-successful', [
'platform' => $platform,
'dir' => $dir,
'buildName' => $buildName,
'fileExtension' => $fileExtension,
])
),
default => render(view('error'))
};
}
private function downloadSfx(Platform $platform, string $phpVersion = null): string
{
$filename = $this->sfxFilename($platform, $phpVersion);
if (Storage::exists($filename)) {
return Storage::path($filename);
}
render('💾 Downloading PHP Micro CLI for '.$platform->value);
$context = stream_context_create([], [
'notification' => function ($code, $severity, $message, $messageCode, $bytesTransferred, $bytesMax) {
match ($code) {
STREAM_NOTIFY_FILE_SIZE_IS => $this->progress->start($bytesMax),
STREAM_NOTIFY_PROGRESS => $this->progress->setProgress($bytesTransferred),
default => null
};
},
]);
$file = file_get_contents(self::STORAGE_URL.$filename, false, $context);
Storage::put($filename, $file);
$this->progress->finish();
render(PHP_EOL);
return Storage::path($filename);
}
private function sfxFilename(Platform $platform, string $phpVersion = null): ?string
{
$phpVersion ??= $this->phpVersion();
return match ([$platform, $phpVersion]) {
[Platform::MACOS_INTEL, '8.0'] => 'micro-cli_8.0_macos_intel.sfx',
[Platform::MACOS_APPLE, '8.0'] => 'micro-cli_8.0_macos_apple.sfx',
[Platform::LINUX, '8.0'] => 'micro-cli_8.0_linux_x86_64.sfx',
[Platform::LINUX_ARM, '8.0'] => 'micro-cli_8.0_linux_aarch64.sfx',
[Platform::WINDOWS, '8.0'] => 'micro-cli_8.0_windows_x64.sfx',
[Platform::MACOS_INTEL, '8.1'] => 'micro-cli_8.1_macos_intel.sfx',
[Platform::MACOS_APPLE, '8.1'] => 'micro-cli_8.1_macos_apple.sfx',
[Platform::LINUX, '8.1'] => 'micro-cli_8.1_linux_x86_64.sfx',
[Platform::LINUX_ARM, '8.1'] => 'micro-cli_8.1_linux_aarch64.sfx',
[Platform::WINDOWS, '8.1'] => 'micro-cli_8.1_windows_x64.sfx',
[Platform::MACOS_INTEL, '8.2'] => 'micro-cli_8.2_macos_intel.sfx',
[Platform::MACOS_APPLE, '8.2'] => 'micro-cli_8.2_macos_apple.sfx',
[Platform::LINUX, '8.2'] => 'micro-cli_8.2_linux_x86_64.sfx',
[Platform::LINUX_ARM, '8.2'] => 'micro-cli_8.2_linux_aarch64.sfx',
[Platform::WINDOWS, '8.2'] => 'micro-cli_8.2_windows_x64.sfx',
default => $this->throwInvalidPhpVersion($phpVersion)
};
}
private function phpVersion(): string
{
return $this->option('php') ?? str(phpversion())->beforeLast('.')->value();
}
private function setupProgress(): void
{
$this->progress = $this->output->createProgressBar();
$this->progress->setFormat('[%bar%] %percent%%');
}
private function throwInvalidPhpVersion(string $phpVersion): void
{
$this->error("The needed PHP Micro version could not be found for your PHP version ({$phpVersion}).");
exit();
}
}
================================================
FILE: app/Enums/Platform.php
================================================
<?php
namespace App\Enums;
enum Platform: string
{
case ALL_PLATFORMS = 'All Platforms';
case MACOS_INTEL = 'MacOS (Intel)';
case MACOS_APPLE = 'MacOS (Apple)';
case LINUX = 'Linux (x86_64)';
case LINUX_ARM = 'Linux (aarch64)';
case WINDOWS = 'Windows (x64)';
}
================================================
FILE: app/Providers/AppServiceProvider.php
================================================
<?php
namespace App\Providers;
use Illuminate\Support\ServiceProvider;
class AppServiceProvider extends ServiceProvider
{
/**
* Bootstrap any application services.
*/
public function boot(): void
{
//
}
/**
* Register any application services.
*/
public function register(): void
{
//
}
}
================================================
FILE: bootstrap/app.php
================================================
<?php
/*
|--------------------------------------------------------------------------
| Create The Application
|--------------------------------------------------------------------------
|
| The first thing we will do is create a new Laravel application instance
| which serves as the "glue" for all the components of Laravel, and is
| the IoC container for the system binding all of the various parts.
|
*/
$app = new LaravelZero\Framework\Application(
dirname(__DIR__)
);
/*
|--------------------------------------------------------------------------
| Bind Important Interfaces
|--------------------------------------------------------------------------
|
| Next, we need to bind some important interfaces into the container so
| we will be able to resolve them when needed. The kernels serve the
| incoming requests to this application from both the web and CLI.
|
*/
$app->singleton(
Illuminate\Contracts\Console\Kernel::class,
LaravelZero\Framework\Kernel::class
);
$app->singleton(
Illuminate\Contracts\Debug\ExceptionHandler::class,
Illuminate\Foundation\Exceptions\Handler::class
);
/*
|--------------------------------------------------------------------------
| Return The Application
|--------------------------------------------------------------------------
|
| This script returns the application instance. The instance is given to
| the calling script so we can separate the building of the instances
| from the actual running of the application and sending responses.
|
*/
return $app;
================================================
FILE: box.json
================================================
{
"chmod": "0755",
"directories": [
"app",
"bootstrap",
"config",
"vendor",
"resources"
],
"files": [
"composer.json"
],
"exclude-dev-files": false,
"exclude-composer-files": false,
"compression": "GZ",
"compactors": [
"KevinGH\\Box\\Compactor\\Php",
"KevinGH\\Box\\Compactor\\Json"
]
}
================================================
FILE: builds/haulable
================================================
[File too large to display: 17.2 MB]
================================================
FILE: composer.json
================================================
{
"name": "configured/haulable",
"description": "Create standalone PHP CLI applications with PHP Micro CLI",
"keywords": ["framework", "laravel", "laravel zero", "console", "cli"],
"type": "project",
"license": "MIT",
"support": {
"issues": "https://github.com/configuredco/haulable/issues",
"source": "https://github.com/configuredco/haulable"
},
"authors": [
{
"name": "Joe Campo",
"email": "joe@configured.co"
}
],
"require": {
"php": "^8.1"
},
"require-dev": {
"laravel-zero/framework": "^10.0",
"nunomaduro/termwind": "^1.15",
"laravel/pint": "^1.5",
"mockery/mockery": "^1.5.1",
"pestphp/pest": "^1.22.3"
},
"autoload": {
"psr-4": {
"App\\": "app/",
"Database\\Factories\\": "database/factories/",
"Database\\Seeders\\": "database/seeders/"
}
},
"autoload-dev": {
"psr-4": {
"Tests\\": "tests/"
}
},
"config": {
"preferred-install": "dist",
"sort-packages": true,
"optimize-autoloader": true,
"allow-plugins": {
"pestphp/pest-plugin": true
}
},
"minimum-stability": "stable",
"prefer-stable": true,
"bin": ["builds/haulable"]
}
================================================
FILE: config/app.php
================================================
<?php
return [
/*
|--------------------------------------------------------------------------
| Application Name
|--------------------------------------------------------------------------
|
| This value is the name of your application. This value is used when the
| framework needs to place the application's name in a notification or
| any other location as required by the application or its packages.
|
*/
'name' => 'Haulable',
/*
|--------------------------------------------------------------------------
| Application Version
|--------------------------------------------------------------------------
|
| This value determines the "version" your application is currently running
| in. You may want to follow the "Semantic Versioning" - Given a version
| number MAJOR.MINOR.PATCH when an update happens: https://semver.org.
|
*/
'version' => app('git.version'),
/*
|--------------------------------------------------------------------------
| Application Environment
|--------------------------------------------------------------------------
|
| This value determines the "environment" your application is currently
| running in. This may determine how you prefer to configure various
| services the application utilizes. This can be overridden using
| the global command line "--env" option when calling commands.
|
*/
'env' => 'development',
/*
|--------------------------------------------------------------------------
| Application Timezone
|--------------------------------------------------------------------------
|
| Here you may specify the default timezone for your application, which
| will be used by the PHP date and date-time functions. We have gone
| ahead and set this to a sensible default for you out of the box.
|
*/
'timezone' => 'UTC',
/*
|--------------------------------------------------------------------------
| Autoloaded Service Providers
|--------------------------------------------------------------------------
|
| The service providers listed here will be automatically loaded on the
| request to your application. Feel free to add your own services to
| this array to grant expanded functionality to your applications.
|
*/
'providers' => [
App\Providers\AppServiceProvider::class,
],
];
================================================
FILE: config/commands.php
================================================
<?php
return [
/*
|--------------------------------------------------------------------------
| Default Command
|--------------------------------------------------------------------------
|
| Laravel Zero will always run the command specified below when no command name is
| provided. Consider update the default command for single command applications.
| You cannot pass arguments to the default command because they are ignored.
|
*/
'default' => App\Commands\Package::class,
/*
|--------------------------------------------------------------------------
| Commands Paths
|--------------------------------------------------------------------------
|
| This value determines the "paths" that should be loaded by the console's
| kernel. Foreach "path" present on the array provided below the kernel
| will extract all "Illuminate\Console\Command" based class commands.
|
*/
'paths' => [app_path('Commands')],
/*
|--------------------------------------------------------------------------
| Added Commands
|--------------------------------------------------------------------------
|
| You may want to include a single command class without having to load an
| entire folder. Here you can specify which commands should be added to
| your list of commands. The console's kernel will try to load them.
|
*/
'add' => [
// ..
],
/*
|--------------------------------------------------------------------------
| Hidden Commands
|--------------------------------------------------------------------------
|
| Your application commands will always be visible on the application list
| of commands. But you can still make them "hidden" specifying an array
| of commands below. All "hidden" commands can still be run/executed.
|
*/
'hidden' => [
NunoMaduro\LaravelConsoleSummary\SummaryCommand::class,
Symfony\Component\Console\Command\DumpCompletionCommand::class,
Symfony\Component\Console\Command\HelpCommand::class,
Illuminate\Console\Scheduling\ScheduleRunCommand::class,
Illuminate\Console\Scheduling\ScheduleListCommand::class,
Illuminate\Console\Scheduling\ScheduleFinishCommand::class,
Illuminate\Foundation\Console\VendorPublishCommand::class,
LaravelZero\Framework\Commands\StubPublishCommand::class,
],
/*
|--------------------------------------------------------------------------
| Removed Commands
|--------------------------------------------------------------------------
|
| Do you have a service provider that loads a list of commands that
| you don't need? No problem. Laravel Zero allows you to specify
| below a list of commands that you don't to see in your app.
|
*/
'remove' => [
// ..
],
];
================================================
FILE: config/filesystems.php
================================================
<?php
return [
'default' => 'local',
'disks' => [
'local' => [
'driver' => 'local',
'root' => getenv('HOME').'/.haulable',
],
],
];
================================================
FILE: config/view.php
================================================
<?php
return [
'paths' => [
resource_path('views'),
],
'compiled' => sys_get_temp_dir().'/haulable',
];
================================================
FILE: haulable
================================================
#!/usr/bin/env php
<?php
define('LARAVEL_START', microtime(true));
/*
|--------------------------------------------------------------------------
| Register The Auto Loader
|--------------------------------------------------------------------------
|
| Composer provides a convenient, automatically generated class loader
| for our application. We just need to utilize it! We'll require it
| into the script here so that we do not have to worry about the
| loading of any our classes "manually". Feels great to relax.
|
*/
$autoloader = require file_exists(__DIR__.'/vendor/autoload.php') ? __DIR__.'/vendor/autoload.php' : __DIR__.'/../../autoload.php';
$app = require_once __DIR__.'/bootstrap/app.php';
/*
|--------------------------------------------------------------------------
| Run The Artisan Application
|--------------------------------------------------------------------------
|
| When we run the console application, the current CLI command will be
| executed in this console and the response sent back to a terminal
| or another output device for the developers. Here goes nothing!
|
*/
$kernel = $app->make(Illuminate\Contracts\Console\Kernel::class);
$status = $kernel->handle(
$input = new Symfony\Component\Console\Input\ArgvInput,
new Symfony\Component\Console\Output\ConsoleOutput
);
/*
|--------------------------------------------------------------------------
| Shutdown The Application
|--------------------------------------------------------------------------
|
| Once Artisan has finished running, we will fire off the shutdown events
| so that any final work may be done by the application before we shut
| down the process. This is the last thing to happen to the request.
|
*/
$kernel->terminate($input, $status);
exit($status);
================================================
FILE: phpunit.xml.dist
================================================
<?xml version="1.0" encoding="UTF-8"?>
<phpunit backupGlobals="false"
backupStaticAttributes="false"
bootstrap="vendor/autoload.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false">
<testsuites>
<testsuite name="Feature">
<directory suffix="Test.php">./tests/Feature</directory>
</testsuite>
<testsuite name="Unit">
<directory suffix="Test.php">./tests/Unit</directory>
</testsuite>
</testsuites>
<coverage processUncoveredFiles="true">
<include>
<directory suffix=".php">./app</directory>
</include>
</coverage>
</phpunit>
================================================
FILE: pint.json
================================================
{
"preset": "laravel"
}
================================================
FILE: resources/views/error.blade.php
================================================
😖 <span class="bg-red-400 text-white px-1">Something unexpected went wrong.</span>
================================================
FILE: resources/views/intro.blade.php
================================================
<div class="ml-2">
<div>
_ _ _ _ <br>
| | | | | | | | <br>
| | __, | | __, | | | | _ <br>
|/ \ / | | | |/ / | |/ \_|/ |/ <br>
| |_/\_/|_/ \_/|_/|__/\_/|_/\_/ |__/|__/
</div>
<div class="px-1 mt-1 bg-green-300 text-black">by ⚙️ Configured</div>
<div class="px-1 mt-1 bg-blue-300 text-black">{{ $version }}</div>
<em class="ml-1">
Create portable PHP CLI applications w/ PHP Micro
</em>
</div>
================================================
FILE: resources/views/packaging-successful.blade.php
================================================
<div class="space-y-1 mb-1">
<div>
📦 <span class="bg-green-300 text-black px-1">Packaging for {{ $platform->value }} successful.</span>
</div>
<div>
✅ <a href="{{ $dir }}/{{ $buildName }}{{ $fileExtension }}">{{ $dir }}/{{ $buildName }}{{ $fileExtension }}</a>
</div>
</div>
<br>
================================================
FILE: tests/CreatesApplication.php
================================================
<?php
namespace Tests;
use Illuminate\Contracts\Console\Kernel;
use Illuminate\Foundation\Application;
trait CreatesApplication
{
/**
* Creates the application.
*/
public function createApplication(): Application
{
$app = require __DIR__.'/../bootstrap/app.php';
$app->make(Kernel::class)->bootstrap();
return $app;
}
}
================================================
FILE: tests/Pest.php
================================================
<?php
/*
|--------------------------------------------------------------------------
| Test Case
|--------------------------------------------------------------------------
|
| The closure you provide to your test functions is always bound to a specific PHPUnit test
| case class. By default, that class is "PHPUnit\Framework\TestCase". Of course, you may
| need to change it using the "uses()" function to bind a different classes or traits.
|
*/
uses(Tests\TestCase::class)->in('Feature');
/*
|--------------------------------------------------------------------------
| Expectations
|--------------------------------------------------------------------------
|
| When you're writing tests, you often need to check that values meet certain conditions. The
| "expect()" function gives you access to a set of "expectations" methods that you can use
| to assert different things. Of course, you may extend the Expectation API at any time.
|
*/
expect()->extend('toBeOne', function () {
return $this->toBe(1);
});
/*
|--------------------------------------------------------------------------
| Functions
|--------------------------------------------------------------------------
|
| While Pest is very powerful out-of-the-box, you may have some testing code specific to your
| project that you don't want to repeat in every file. Here you can also expose helpers as
| global functions to help you to reduce the number of lines of code in your test files.
|
*/
function something(): void
{
// ..
}
================================================
FILE: tests/TestCase.php
================================================
<?php
namespace Tests;
use LaravelZero\Framework\Testing\TestCase as BaseTestCase;
abstract class TestCase extends BaseTestCase
{
use CreatesApplication;
}
gitextract_gek_81al/
├── .editorconfig
├── .gitattributes
├── .gitignore
├── LICENSE
├── README.md
├── app/
│ ├── Commands/
│ │ ├── .gitkeep
│ │ └── Package.php
│ ├── Enums/
│ │ └── Platform.php
│ └── Providers/
│ └── AppServiceProvider.php
├── bootstrap/
│ └── app.php
├── box.json
├── builds/
│ └── haulable
├── composer.json
├── config/
│ ├── app.php
│ ├── commands.php
│ ├── filesystems.php
│ └── view.php
├── haulable
├── phpunit.xml.dist
├── pint.json
├── resources/
│ └── views/
│ ├── error.blade.php
│ ├── intro.blade.php
│ └── packaging-successful.blade.php
└── tests/
├── CreatesApplication.php
├── Pest.php
└── TestCase.php
SYMBOL INDEX (17 symbols across 5 files)
FILE: app/Commands/Package.php
class Package (line 13) | class Package extends Command
method handle (line 25) | public function handle(): void
method determinePlatform (line 46) | private function determinePlatform(): void
method packageForAllPlatforms (line 55) | private function packageForAllPlatforms(): void
method package (line 60) | private function package(Platform $platform, string $phpVersion = null...
method downloadSfx (line 88) | private function downloadSfx(Platform $platform, string $phpVersion = ...
method sfxFilename (line 119) | private function sfxFilename(Platform $platform, string $phpVersion = ...
method phpVersion (line 143) | private function phpVersion(): string
method setupProgress (line 148) | private function setupProgress(): void
method throwInvalidPhpVersion (line 154) | private function throwInvalidPhpVersion(string $phpVersion): void
FILE: app/Providers/AppServiceProvider.php
class AppServiceProvider (line 7) | class AppServiceProvider extends ServiceProvider
method boot (line 12) | public function boot(): void
method register (line 20) | public function register(): void
FILE: tests/CreatesApplication.php
type CreatesApplication (line 8) | trait CreatesApplication
method createApplication (line 13) | public function createApplication(): Application
FILE: tests/Pest.php
function something (line 42) | function something(): void
FILE: tests/TestCase.php
class TestCase (line 7) | abstract class TestCase extends BaseTestCase
Condensed preview — 26 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (28K chars).
[
{
"path": ".editorconfig",
"chars": 234,
"preview": "root = true\n\n[*]\ncharset = utf-8\nend_of_line = lf\ninsert_final_newline = true\nindent_style = space\nindent_size = 4\ntrim_"
},
{
"path": ".gitattributes",
"chars": 155,
"preview": "* text=auto eol=lf\n/.github export-ignore\n.scrutinizer.yml export-ignore\nBACKERS.md export-ignore\nCONTRIBUTING.md export"
},
{
"path": ".gitignore",
"chars": 119,
"preview": "/vendor\n/.idea\n/.vscode\n/.vagrant\n.phpunit.result.cache\nmacos_intel\nmacos_apple\nlinux_x86_64\nlinux_aarch64\nwindows_x64\n"
},
{
"path": "LICENSE",
"chars": 1066,
"preview": "MIT License\n\nCopyright (c) 2023 Joe Campo\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\n"
},
{
"path": "README.md",
"chars": 2095,
"preview": "<p align=\"center\">\n<a href=\"https://packagist.org/packages/configured/haulable\"><img src=\"https://img.shields.io/packagi"
},
{
"path": "app/Commands/.gitkeep",
"chars": 0,
"preview": ""
},
{
"path": "app/Commands/Package.php",
"chars": 5649,
"preview": "<?php\n\nnamespace App\\Commands;\n\nuse App\\Enums\\Platform;\nuse Illuminate\\Support\\Facades\\File;\nuse Illuminate\\Support\\Faca"
},
{
"path": "app/Enums/Platform.php",
"chars": 288,
"preview": "<?php\n\nnamespace App\\Enums;\n\nenum Platform: string\n{\n case ALL_PLATFORMS = 'All Platforms';\n case MACOS_INTEL = 'M"
},
{
"path": "app/Providers/AppServiceProvider.php",
"chars": 361,
"preview": "<?php\n\nnamespace App\\Providers;\n\nuse Illuminate\\Support\\ServiceProvider;\n\nclass AppServiceProvider extends ServiceProvid"
},
{
"path": "bootstrap/app.php",
"chars": 1529,
"preview": "<?php\n\n/*\n|--------------------------------------------------------------------------\n| Create The Application\n|--------"
},
{
"path": "box.json",
"chars": 391,
"preview": "{\n \"chmod\": \"0755\",\n \"directories\": [\n \"app\",\n \"bootstrap\",\n \"config\",\n \"vendor\",\n "
},
{
"path": "composer.json",
"chars": 1358,
"preview": "{\n \"name\": \"configured/haulable\",\n \"description\": \"Create standalone PHP CLI applications with PHP Micro CLI\",\n "
},
{
"path": "config/app.php",
"chars": 2479,
"preview": "<?php\n\nreturn [\n\n /*\n |--------------------------------------------------------------------------\n | Applicatio"
},
{
"path": "config/commands.php",
"chars": 2930,
"preview": "<?php\n\nreturn [\n\n /*\n |--------------------------------------------------------------------------\n | Default Co"
},
{
"path": "config/filesystems.php",
"chars": 185,
"preview": "<?php\n\nreturn [\n 'default' => 'local',\n 'disks' => [\n 'local' => [\n 'driver' => 'local',\n "
},
{
"path": "config/view.php",
"chars": 126,
"preview": "<?php\n\nreturn [\n 'paths' => [\n resource_path('views'),\n ],\n\n 'compiled' => sys_get_temp_dir().'/haulable"
},
{
"path": "haulable",
"chars": 1779,
"preview": "#!/usr/bin/env php\n<?php\n\ndefine('LARAVEL_START', microtime(true));\n\n/*\n|-----------------------------------------------"
},
{
"path": "phpunit.xml.dist",
"chars": 811,
"preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<phpunit backupGlobals=\"false\"\n backupStaticAttributes=\"false\"\n b"
},
{
"path": "pint.json",
"chars": 27,
"preview": "{\n \"preset\": \"laravel\"\n}"
},
{
"path": "resources/views/error.blade.php",
"chars": 83,
"preview": "😖 <span class=\"bg-red-400 text-white px-1\">Something unexpected went wrong.</span>\n"
},
{
"path": "resources/views/intro.blade.php",
"chars": 1703,
"preview": "<div class=\"ml-2\">\n <div>\n _ &nbs"
},
{
"path": "resources/views/packaging-successful.blade.php",
"chars": 312,
"preview": "<div class=\"space-y-1 mb-1\">\n <div>\n 📦 <span class=\"bg-green-300 text-black px-1\">Packaging for {{ $platform->"
},
{
"path": "tests/CreatesApplication.php",
"chars": 375,
"preview": "<?php\n\nnamespace Tests;\n\nuse Illuminate\\Contracts\\Console\\Kernel;\nuse Illuminate\\Foundation\\Application;\n\ntrait CreatesA"
},
{
"path": "tests/Pest.php",
"chars": 1511,
"preview": "<?php\n\n/*\n|--------------------------------------------------------------------------\n| Test Case\n|---------------------"
},
{
"path": "tests/TestCase.php",
"chars": 163,
"preview": "<?php\n\nnamespace Tests;\n\nuse LaravelZero\\Framework\\Testing\\TestCase as BaseTestCase;\n\nabstract class TestCase extends Ba"
}
]
// ... and 1 more files (download for full content)
About this extraction
This page contains the full source code of the configuredco/haulable GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 26 files (17.2 MB), approximately 6.4k tokens, and a symbol index with 17 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.
Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.