PHPackages                             securitydiscovery/laravel-fly-machines - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. securitydiscovery/laravel-fly-machines

AbandonedArchivedLibrary[API Development](/categories/api)

securitydiscovery/laravel-fly-machines
======================================

A Fly.io Machine PHP API client for Laravel.

v1.0.1(3y ago)51.1k[2 PRs](https://github.com/SecurityDiscovery/laravel-fly-machines/pulls)MITPHPPHP ^8.0

Since Dec 1Pushed 2y agoCompare

[ Source](https://github.com/SecurityDiscovery/laravel-fly-machines)[ Packagist](https://packagist.org/packages/securitydiscovery/laravel-fly-machines)[ Docs](https://github.com/securitydiscovery/laravel-fly-machines)[ RSS](/packages/securitydiscovery-laravel-fly-machines/feed)WikiDiscussions main Synced yesterday

READMEChangelog (5)Dependencies (13)Versions (8)Used By (0)

A Fly.io Machine PHP API client for Laravel.
============================================

[](#a-flyio-machine-php-api-client-for-laravel)

A very simple and thin API client for the Fly.io machine API.

[![Latest Version on Packagist](https://camo.githubusercontent.com/0777940961c41e745747fae07c89adf7f2b0ebd0d56d890c457a9d3239c03af6/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7365637572697479646973636f766572792f6c61726176656c2d666c792d6d616368696e65732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/securitydiscovery/laravel-fly-machines)[![GitHub Tests Action Status](https://camo.githubusercontent.com/e81d201833ab2fa81609a06ec9c2fc0ffc4f19bea96ebc4b3ae921033f144bb6/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f7365637572697479646973636f766572792f6c61726176656c2d666c792d6d616368696e65732f72756e2d74657374733f6c6162656c3d7465737473)](https://github.com/securitydiscovery/laravel-fly-machines/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/8e3a7356eb1abc617d5866e703298d5f4b924abfdeff773d95274d40eb5439a8/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f7365637572697479646973636f766572792f6c61726176656c2d666c792d6d616368696e65732f466978253230504850253230636f64652532307374796c652532306973737565733f6c6162656c3d636f64652532307374796c65)](https://github.com/securitydiscovery/laravel-fly-machines/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/aff88f5f6e61c7034928e9e68401704cca3ddf89def9de5f722a2f22306041c7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7365637572697479646973636f766572792f6c61726176656c2d666c792d6d616368696e65732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/securitydiscovery/laravel-fly-machines)

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require securitydiscovery/laravel-fly-machines
```

You can publish the config file with:

```
php artisan vendor:publish --tag="fly-machines-config"
```

This is the contents of the published config file:

```
// config for SecurityDiscovery/LaravelFlyMachines
return [
    'proto' => env('FLY_API_PROTO', 'http'),
    // The endpoint to the Fly machines API.
    'endpoint' => env('FLY_API_HOSTNAME', '127.0.0.1:4280'),
    // The token to authenticate to the API.
    'token' => env('FLY_API_TOKEN'),
];
```

Usage
-----

[](#usage)

```
use SecurityDiscovery\LaravelFlyMachines\Facades\LaravelFlyMachines as FlyMachines;
```

#### List machines of a Fly.io App:

[](#list-machines-of-a-flyio-app)

```
FlyMachines::machines('my-fly-app')->list()
```

#### Launch a machine.

[](#launch-a-machine)

```
FlyMachines::machines('my-fly-app')->launch(machine: $config)
```

#### Update a machine.

[](#update-a-machine)

```
FlyMachines::machines('my-fly-app')->update(machineId: "machineId", machine: $config, nonce: "nonce")
```

#### Get a machine.

[](#get-a-machine)

```
FlyMachines::machines('my-fly-app')->get(machineId: "machineId")
```

#### Stop a machine.

[](#stop-a-machine)

```
FlyMachines::machines('my-fly-app')->stop(machineId: "machineId")
```

#### Start a machine.

[](#start-a-machine)

```
FlyMachines::machines('my-fly-app')->start(machineId: "machineId")
```

#### Send a signal to a machine.

[](#send-a-signal-to-a-machine)

```
FlyMachines::machines('my-fly-app')->signal(machineId: "machineId", signal: 9)
```

#### Kill a machine (uses the signal 9 (SIGKILL), the same as the above call).

[](#kill-a-machine-uses-the-signal-9-sigkill-the-same-as-the-above-call)

```
FlyMachines::machines('my-fly-app')->kill(machineId: "machineId")
```

#### Restart a machine.

[](#restart-a-machine)

```
FlyMachines::machines('my-fly-app')->restart(machineId: "machineId", forceStop: true, timeout: 10, signal: 9)
```

#### Find a lease for a machine.

[](#find-a-lease-for-a-machine)

```
FlyMachines::machines('my-fly-app')->findLease(machineId: "machineId")
```

#### Acquire a lease for a machine.

[](#acquire-a-lease-for-a-machine)

```
FlyMachines::machines('my-fly-app')->acquireLease(machineId: "machineId", ttl: 30)
```

#### Release a lease of a machine.

[](#release-a-lease-of-a-machine)

```
FlyMachines::machines('my-fly-app')->releaseLease(machineId: "machineId", nonce: "nonce")
```

#### Wait for a machine.

[](#wait-for-a-machine)

```
FlyMachines::machines('my-fly-app')->releaseLease(machineId: "machineId", instanceId: "instanceId", state: "started", timeout: 30)
```

#### Destroy a machine.

[](#destroy-a-machine)

```
FlyMachines::machines('my-fly-app')->destroy(machineId: "machineId", kill: true)
```

#### Launch a Fly.io machine

[](#launch-a-flyio-machine)

```
use SecurityDiscovery\LaravelFlyMachines\Facades\LaravelFlyMachines as FlyMachines;
use SecurityDiscovery\LaravelFlyMachines\Helpers\Machine;

$machineConfig = Machine();
$machine = FlyMachines::machines('my-fly-app')
    ->launch(
        Machine::builder()
            ->image(image: 'registry-1.docker.io/flyio/postgres:14.4')
            ->toArray()
    );
```

#### Launch a Fly.io machine without the helper

[](#launch-a-flyio-machine-without-the-helper)

```
use SecurityDiscovery\LaravelFlyMachines\Facades\LaravelFlyMachines as FlyMachines;

$machine = FlyMachines::machines('my-fly-app')->launch([
    'config' => [
        'image' => 'registry-1.docker.io/flyio/postgres:14.4',
    ],
    'region' => 'fra',
]);
```

### Fly Machine Helper

[](#fly-machine-helper)

```
use SecurityDiscovery\LaravelFlyMachines\Facades\LaravelFlyMachines as FlyMachines;
use SecurityDiscovery\LaravelFlyMachines\Helpers\Machine;

$machineConfig = Machine::builder()
    ->image(image: 'my.registry.io/a/b:14.4')  // Required
    ->init(                                    // Optional
        entrypoint: ['/bin/sh'],
        exec: ['exec'],
        cmd: ['cmd'],
        tty: false
    )
    ->retries(                                 // Optional
        max_retries: 3,
        policy: 'on-failure'
    )
    ->mount(                                   // Optional
        volume_id: 'vol_123',
        path: '/data'
    )

    ->env(name: 'NAME_1', value: 'VALUE_1')    // Optional
    ->env(name: 'NAME_2', value: 'VALUE_2')    // Optional

    ->auto_destroy(auto_destroy: True)         // Optional
    ->name(name: 'my_machine')                 // Optional
    ->schedule(schedule: 'daily')              // Optional
    ->region(region: 'fra')                    // Optional
    ->size(size: 'shared-cpu-1x' )             // Optional | WARNING: Use 'guest' or 'size'
    ->guest(                                   // Optional
        cpus: 1,
        memory_mb: 2*256,
        cpu_kind: 'shared',
        kernel_args: []
    )
    ->process()                                // TODO: Document this
    ->toArray();
```

See more here .

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Sebastien Kaul](https://github.com/KaulSe)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

"Laravel" is a registered trademark of Taylor Otwell. This project is not affiliated, associated, endorsed, or sponsored by Taylor Otwell, nor has it been reviewed, tested, or certified by Taylor Otwell. The use of the trademark "Laravel" is for informational and descriptive purposes only. Laravel Workflow is not officially related to the Laravel trademark or Taylor Otwell.

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 85.1% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~24 days

Total

5

Last Release

1213d ago

Major Versions

v0.0.1 → v1.0.02023-03-05

PHP version history (2 changes)v0.0.1-alphaPHP ^8.1

v0.0.1PHP ^8.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/45340011?v=4)[Sebastien Kaul](/maintainers/kaulse)[@KaulSe](https://github.com/KaulSe)

---

Top Contributors

[![KaulSe](https://avatars.githubusercontent.com/u/45340011?v=4)](https://github.com/KaulSe "KaulSe (74 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (7 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (6 commits)")

---

Tags

fly-ioflyiolaravelphplaravelSecurityDiscoverylaravel-fly-machines

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/securitydiscovery-laravel-fly-machines/health.svg)

```
[![Health](https://phpackages.com/badges/securitydiscovery-laravel-fly-machines/health.svg)](https://phpackages.com/packages/securitydiscovery-laravel-fly-machines)
```

###  Alternatives

[defstudio/telegraph

A laravel facade to interact with Telegram Bots

816333.6k3](/packages/defstudio-telegraph)[dedoc/scramble

Automatic generation of API documentation for Laravel applications.

2.1k11.2M100](/packages/dedoc-scramble)[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[simplestats-io/laravel-client

Server-side analytics for Laravel that follows the full funnel from visit to registration to payment, attributed to the channel that drove it. Revenue, MRR, churn and ad-spend profit (ROAS/CAC) per channel. GDPR compliant, ad-blocker proof.

5021.9k](/packages/simplestats-io-laravel-client)[spatie/laravel-pdf

Create PDFs in Laravel apps

1.0k4.8M47](/packages/spatie-laravel-pdf)[rawilk/profile-filament-plugin

Profile &amp; MFA starter kit for filament.

3914.6k](/packages/rawilk-profile-filament-plugin)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
