PHPackages                             niravsutariya/quick-deployer-sdk - 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. niravsutariya/quick-deployer-sdk

ActiveLibrary

niravsutariya/quick-deployer-sdk
================================

A simple to use PHP class to work with the Quick Deployer API

v1.0.0(1y ago)20MITPHPPHP ^7.4|^8.0CI passing

Since May 6Pushed 1y ago1 watchersCompare

[ Source](https://github.com/niravsutariya/php-quick-deployer-sdk)[ Packagist](https://packagist.org/packages/niravsutariya/quick-deployer-sdk)[ RSS](/packages/niravsutariya-quick-deployer-sdk/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (4)Versions (2)Used By (0)

PHP QuickDeployer SDK
=====================

[](#php-quickdeployer-sdk)

The QuickDeployer SDK is a PHP library for interacting with the QuickDeployer API, enabling developers to manage projects and servers programmatically. Built with simplicity and modularity in mind, it provides a clean interface for listing, creating, updating, and deleting projects and servers, with robust error handling and testing support.

Features
--------

[](#features)

- Manage projects (list, get, create, update, delete).
- Manage servers within projects (list, get, create, update, delete, check status).
- Easy integration with PHP applications, including Laravel.
- Comprehensive unit tests using PHPUnit.
- Built with Guzzle HTTP client for reliable API communication.

Requirements
------------

[](#requirements)

- PHP ^7.4|^8.0
- Composer
- Guzzle HTTP Client (`guzzlehttp/guzzle: ^7.0`)
- PHPUnit (for running tests)

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

[](#installation)

Install the SDK via Composer:

```
composer require niravsutariya/quick-deployer-sdk
```

If the SDK is not yet published, you can include it as a local or VCS repository in your `composer.json`:

```
{
    "repositories": [
        {
            "type": "vcs",
            "url": "https://github.com/niravsutariya/php-quick-deployer-sdk.git"
        }
    ],
    "require": {
        "niravsutariya/quick-deployer-sdk": "dev-main"
    }
}
```

Then run:

```
composer install
```

Usage
-----

[](#usage)

### Initializing the Client

[](#initializing-the-client)

Create a `Client` instance with your API key:

```
use QuickDeployer\SDK\Client;

$apiKey = 'your-api-token';
$client = new Client($apiKey);
```

Optionally, specify a custom base URI (defaults to `https://staging.quickdeployer.com/api`):

```
$client = new Client($apiKey, 'https://quickdeployer.com/api');
```

### Managing Projects

[](#managing-projects)

#### List Projects

[](#list-projects)

Retrieve a list of projects:

```
$projects = $client->getProjects();
foreach ($projects as $project) {
    echo "Project ID: {$project['id']}, Name: {$project['name']}\n";
}
```

#### Get a Project

[](#get-a-project)

Fetch details for a specific project:

```
$projectResource = new QuickDeployer\Resources\Project($client->getClient());
$project = $projectResource->get('project-123');
echo "Project Name: {$project['name']}\n";
```

#### Create a Project

[](#create-a-project)

Create a new project:

```
$projectResource = new QuickDeployer\Resources\Project($client->getClient());
$newProject = $projectResource->create([
    'name' => 'New Project',
    'description' => 'A test project'
]);
echo "Created Project ID: {$newProject['id']}\n";
```

#### Update a Project

[](#update-a-project)

Update an existing project:

```
$projectResource = new QuickDeployer\Resources\Project($client->getClient());
$updatedProject = $projectResource->update('project-123', [
    'name' => 'Updated Project'
]);
echo "Updated Project Name: {$updatedProject['name']}\n";
```

#### Delete a Project

[](#delete-a-project)

Delete a project:

```
$projectResource = new QuickDeployer\Resources\Project($client->getClient());
$projectResource->delete('project-123');
echo "Project deleted successfully\n";
```

### Managing Servers

[](#managing-servers)

#### List Servers

[](#list-servers)

Retrieve servers for a specific project:

```
$servers = $client->servers('project-123')->list();
foreach ($servers['servers'] as $server) {
    echo "Server ID: {$server['id']}, Name: {$server['name']}\n";
}
```

#### Get a Server

[](#get-a-server)

Fetch details for a specific server:

```
$server = $client->servers('project-123')->get('server-456');
echo "Server Name: {$server['name']}\n";
```

#### Create a Server

[](#create-a-server)

Create a new server:

```
$newServer = $client->servers('project-123')->create([
    'name' => 'New Server',
    'type' => 'web'
]);
echo "Created Server ID: {$newServer['id']}\n";
```

#### Update a Server

[](#update-a-server)

Update an existing server:

```
$updatedServer = $client->servers('project-123')->update('server-456', [
    'name' => 'Updated Server'
]);
echo "Updated Server Name: {$updatedServer['name']}\n";
```

#### Delete a Server

[](#delete-a-server)

Delete a server:

```
$client->servers('project-123')->delete('server-456');
echo "Server deleted successfully\n";
```

#### Check Server Status

[](#check-server-status)

Check the status of a server:

```
$status = $client->servers('project-123')->checkStatus('server-456');
echo "Server Status: {$status['status']}\n";
```

### Error Handling

[](#error-handling)

All methods throw a `\RuntimeException` on API failures. Use try-catch blocks to handle errors:

```
try {
    $projects = $client->getProjects();
} catch (\RuntimeException $e) {
    echo "Error: {$e->getMessage()}\n";
}
```

Configuration
-------------

[](#configuration)

- **API Key**: Obtain your API key from the QuickDeployer dashboard.
- **Base URI**: Override the default `https://quickdeployer.com/api` if using a different environment (e.g., production).

Testing
-------

[](#testing)

The SDK includes unit tests for the `Project` and `Server` resources using PHPUnit.

### Running Tests

[](#running-tests)

1. Install dependencies:

```
composer install
```

2. Run tests:

```
vendor/bin/phpunit
```

Tests are located in the `tests/Resources` directory (`ProjectTest.php`, `ServerTest.php`) and use Guzzle’s `MockHandler` to simulate API responses.

Laravel Integration
-------------------

[](#laravel-integration)

To use the SDK in a Laravel project with a domain-driven structure:

1. Install the SDK as a Composer package (see [Installation](#installation)).
2. Place the SDK in a domain module, e.g., `app/Domains/Deployment/Vendor/QuickDeployer`.
3. Create a service class to wrap SDK usage:

```
namespace App\Domains\Deployment\Services;

use QuickDeployer\SDK\Client;

class DeploymentService
{
    private Client $client;

    public function __construct()
    {
        $this->client = new Client(config('services.quickdeployer.api_key'));
    }

    public function getProjects(): array
    {
        return $this->client->getProjects();
    }
}
```

4. Register the service in a Laravel service provider and configure the API key in `config/services.php`.

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

[](#contributing)

1. Fork the repository.
2. Create a feature branch (`git checkout -b feature/your-feature`).
3. Commit your changes (`git commit -m "Add your feature"`).
4. Push to the branch (`git push origin feature/your-feature`).
5. Open a pull request.

Please include tests for new features and follow PSR-12 coding standards.

License
-------

[](#license)

This SDK is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.

Support
-------

[](#support)

For issues or questions, open an issue on the [GitHub repository](https://github.com/niravsutariya/php-quick-deployer-sdk) or contact .

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance52

Moderate activity, may be stable

Popularity3

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

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

Unknown

Total

1

Last Release

368d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3f37102c0ac81a6dc1d9738d032e671c6b8328a6826ecf9ece5d030da9750984?d=identicon)[niravsutariya](/maintainers/niravsutariya)

---

Tags

laravelsdkquick-deployer

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/niravsutariya-quick-deployer-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/niravsutariya-quick-deployer-sdk/health.svg)](https://phpackages.com/packages/niravsutariya-quick-deployer-sdk)
```

###  Alternatives

[openai-php/laravel

OpenAI PHP for Laravel is a supercharged PHP API client that allows you to interact with the Open AI API

3.7k7.6M74](/packages/openai-php-laravel)[mozex/anthropic-laravel

Anthropic PHP for Laravel is a supercharged PHP API client that allows you to interact with the Anthropic API

71226.4k1](/packages/mozex-anthropic-laravel)

PHPackages © 2026

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