Download the PHP package cipi/sdk without Composer

On this page you can find all versions of the php package cipi/sdk. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package sdk

cipi/sdk

PHP client for the Cipi panel API. One Sanctum token is enough to manage apps, deploys, domains, databases, and the server from PHP, Laravel, Symfony, or any other framework.

The package talks only to the REST API (/api/*). It does not open SSH and it does not shell out to cipi on the machine where your code runs.

Documentation: cipi.sh/docs/php-sdk.

Requirements

Laravel 11, 12, and 13 can use the service provider and facade. They are optional.

Install

Create a token on the server and grant only the abilities this application needs (apps-view, deploy-manage, and so on). The panel returns 403 when the token is missing an ability.

Quick start

https://api.example.com and https://api.example.com/api are both accepted. Plain http:// is rejected unless you pass allow_http: true for a local panel.

Responses are the JSON body as an associative array. Writes that the panel queues return job_id and status: pending. wait() polls GET /api/jobs/{id} until the job is completed or failed.

Laravel

The service provider is discovered automatically.

Or inject the client:

One container binding talks to one server. For several servers, call Cipi::connect() with each endpoint and token.

Other frameworks

Symfony, Slim, WordPress, or a script: construct the client yourself and pass it through your container. There is no framework-specific bundle to install.

What you can call

Client Panel
apps() list, get, create, update, delete, suspend, unsuspend, fix permissions, recreate webhook
limits() FPM, memory, workers, and the soft disk limit
basicAuth() HTTP Basic Auth status, enable, disable
env() read and merge .env keys
authJson() shared Composer auth.json (not Basic Auth)
artisan() Artisan as an async job (tinker is rejected by the panel)
run() whitelisted non-interactive commands
deployConfig() structured Deployer options
logs() nginx, php, worker, deploy, laravel
aliases(), www(), redirects(), proxies() domains, apex redirects, path redirects, prefix proxies
node() Node runtimes, app status, blue/green restart
deploys() deploy, rollback, unlock, audit ledger
ssl() install a certificate (HTTP-01 or Cloudflare DNS-01), force HTTPS, DNS accounts
databases() engines, create, backup, restore, password
php(), ssh(), services(), smtp() PHP versions, cipi user keys, services, SMTP
health(), search() HTTP healthchecks, Meilisearch / Scout
packages(), monitor(), zeroTrust(), disk() read-only host insights
server()->status() same snapshot as cipi status
ipWhitelist() API client allowlist
jobs()->get() / wait() async job status
request() any /api path this release does not wrap yet

A few examples:

node_build (Laravel apps only) is the asset build Cipi runs inside every deploy, before the release goes live. It starts with npm, npx, yarn, pnpm, bun, or node, allows && and ;, refuses pipes, redirects, backticks, and $( ), and is at most 200 characters. The panel validates it and answers 422 (ValidationException) on a bad command or on a custom or Node app (Node apps take build). Needs cipi/api 1.34.0+ and Cipi CLI 5.6.0+.

The same versions report whether the app's deploy key can read its repository. The app-create job result, and the app-edit result when the repository or branch changed, carry repository_access; app-create also carries build. The check never fails the job, so look at it after wait():

status is ok, nobranch, or denied; branch, error, and hint are optional. On older servers, and on apps without a repository, the key is absent.

limits()->update() is an async job. Pass disk_limit_gb: null to clear the soft limit. DNS-01 and the disk limit need Cipi CLI 5.5.0+. disk() needs CLI 5.5.2 (older hosts return 503). ssl()->setDnsAccount() is synchronous, so the Cloudflare token is not queued, and the panel never returns it.

Installing host packages, changing monitor thresholds, and mutating Cloudflare Zero Trust stay on the server CLI. The API exposes those as read-only, and so does this SDK. Disk usage is read-only too; the per-app limit is limits().

Errors

Failed HTTP responses throw Cipi\Sdk\Exception\CipiException (or a subclass):

Status Exception
401 AuthenticationException
403 AuthorizationException
404 NotFoundException
409 ConflictException
422 ValidationException (errors() when Laravel returned a bag)
429 RateLimitException
5xx ServerException

wait() throws JobFailedException when the job finishes with failed, and TimeoutException if it is still running when the timeout elapses (default 300 seconds).

Security

Store CIPI_TOKEN in the environment of the machine that runs PHP. Do not commit it, and do not log the client. Create a separate token per application, with the smallest ability set that works.

Tests

License

MIT. Copyright (c) 2026 Andrea Pollastri.


All versions of sdk with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
ext-curl Version *
ext-json Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package cipi/sdk contains the following files

Loading the files please wait ...