PHPackages                             zenddevops/client - 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. [CLI &amp; Console](/categories/cli)
4. /
5. zenddevops/client

ActiveProject[CLI &amp; Console](/categories/cli)

zenddevops/client
=================

ZF2 CLI tool to access Zend Server Web API

1.1.1(10y ago)225.1k17[13 issues](https://github.com/zend-patterns/ZendServerSDK/issues)BSD-3-ClausePHPPHP &gt;=5.3.3CI failing

Since Mar 13Pushed 1y ago22 watchersCompare

[ Source](https://github.com/zend-patterns/ZendServerSDK)[ Packagist](https://packagist.org/packages/zenddevops/client)[ Docs](https://github.com/zendtech/ZendServerSDK)[ RSS](/packages/zenddevops-client/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (10)Versions (7)Used By (0)

Table of Contents
=================

[](#table-of-contents)

- [Intro](#intro)
- [Requirements](#requirements)
- [Installation](#installation)
- [Contributing](#contributing)
- [Usage](#usage)
- [Use Cases](#use-cases)
- [HTTP tuning](#http-tuning)
- [Output formats](#output-formats)
- [Providing array values](#providing-array-values)
- [Deployment properties syntax](#deployment-properties-syntax)
- [Feedback](#feedback)

Intro
=====

[](#intro)

ZendServerSDK, aka zs-client, is a command line application that communicates with Zend Server's WebAPI. It can run on all modern Operating Systems(OS) such as Linux, Mac OS X and Windows.

Requirements
============

[](#requirements)

PHP version &gt;=5.3.3 with enabled phar module.

Installation
============

[](#installation)

You can copy locally the latest stable version as a stand-alone file from:

On Linux you can execute the following command:

```
wget https://github.com/zend-patterns/ZendServerSDK/raw/master/bin/zs-client.phar
```

Contributing
============

[](#contributing)

Linux: [![Build Status](https://camo.githubusercontent.com/1f8db5cb75044d5e28073dbcd8e7bd4b6a06892a2bbf4e01062e80706d7e32aa/68747470733a2f2f7472617669732d63692e6f72672f7a656e642d7061747465726e732f5a656e6453657276657253444b2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/zend-patterns/ZendServerSDK) and Windows: [![Build status](https://camo.githubusercontent.com/d9c14e09446f0593bc0d13bb1c5eb6c8a23a71c93debc2292dc0a5c254f14a15/68747470733a2f2f63692e6170707665796f722e636f6d2f6170692f70726f6a656374732f7374617475732f3569343773747337773977366f7075613f7376673d74727565)](https://ci.appveyor.com/project/slaff/zendserversdk)

If you wish to contribute to the project, please read the [CONTRIBUTING.md](CONTRIBUTING.md)

Usage
=====

[](#usage)

Run the phar file with --help to see the available commands:

```
php zs-client.phar  --help
```

Use Cases
=========

[](#use-cases)

Adding Target
-------------

[](#adding-target)

A target is representing the information needed to connect to a Zend Server. Every target contains unique name and must have URL that points to the location of the Zend Server, WebAPI key and secret and optionally a target can contain information about the version of Zend Server.

To add a target run the following command:

```
php bin/zs-client.phar addTarget --target="" \
                                --zskey="" \
                                --zssecret="" \
                                --zsurl="" \
                                --zsversion=""

```

To update a target run the command with the same --target value and provide the new values.

zsurl: if not specified, the value `http://localhost:10081` is used. zsversion: if not specified, the latest Zend Server version will be used.

The information about the available targets is saved in the home directory of the current user in a file named .zsapi.ini.

Using Targets
-------------

[](#using-targets)

Once a target has been defined, specify it in subsequent commands by adding its unique name to the argument list, as in this example:

```
php bin/zs-client.phar monitorGetIssuesListPredefinedFilter \
                             --target="" \
                             --filterId="Resources Issues"

```

Deploying PHP application
-------------------------

[](#deploying-php-application)

You have a PHP application that you want to deploy to Zend Server. In order to use the deployment you will have to enable deployment support, create a package and upload it to the remote server.

Below are the steps that you need to take:

### Enable Deployment Support

[](#enable-deployment-support)

```
php bin/zs-client.phar initZpk --folder=""

```

This will add two new files in the specified folder: deployment.xml and deployment.properties.

### Configure the Deployment

[](#configure-the-deployment)

Using Zend Studio 10 or normal text editor edit the deployment.xml file and change the XML data to match your application name, version, etc.

### Create Package

[](#create-package)

Run the following command.

```
php bin/zs-client.phar packZpk --folder="" --destination=""

```

It will output the name of the newly created package file. You have to use this name to install or update an existing application on Zend Server. If you want to use other name for the output file you can use the --name="{desired-zpk-name}" option.

#### Composer Integration

[](#composer-integration)

There is experimental integration with composer that allows you to download the dependant packages, as described in composer.json, download them and convert them to zpk files. The above command with composer integration will look like this

```
php bin/zs-client.phar packZpk --folder="" \
			      --destination="" \
                              --composer

```

The result from the command will be list of packages in the order that they have to be installed (top first, bottom last). Example:

/tmp/zendframework.zend-stdlib-2.2.4.zpk /tmp/zendframework.zend-console-2.2.4.zpk /tmp/zendframework.zend-file-2.2.4.zpk /tmp/zendframework.zend-mvc-2.2.4.zpk /tmp/zendframework.zend-text-2.2.4.zpk /tmp/zendframework.zend-math-2.2.4.zpk /tmp/zendframework.zend-json-2.2.4.zpk /tmp/zendframework.zend-serializer-2.2.4.zpk /tmp/zenddevops.webapi-dev-dev.zpk /tmp/AddYourUniqueApplicationName-1.0.0.zpk

### Deploy Package

[](#deploy-package)

Run the following command to install a package.

```
php bin/zs-client.phar installApp --zpk="" \
                                 --target="" \
                                 --baseUri=""

```

You can use the same command to update a package. User parameters during the installation can be passed using --userParams="{provide-params-as-query-string}". For example if you want to pass parameter APPLICATION\_ENV and DB\_TYPE then you can use the following

```
php bin/zs-client.phar installApp --zpk="" \
                                 --target="" \
                                 --baseUri="" \
                                 --userParams="APPLICATION_ENV=staging&DB_TYPE=mysql"

```

#### Safe Package Deployment

[](#safe-package-deployment)

If you deploy a new version of your zpk if the old version is still being deployed then this can lead to unpredictable results. In order to prevent this you can use the `--safe` flag. If it is present zs-client will check if there is a current deployment going on for this app and will exit if that is the case.

Example:

```
php bin/zs-client.phar installApp --zpk="" --safe ...

```

If you want to be safe AND want to wait for the previous deployment to finish then you can use the --safe and --wait flags together.

Example:

```
php bin/zs-client.phar installApp --zpk="" --safe --wait ...

```

#### Deploy Multiple Packages

[](#deploy-multiple-packages)

If you use the composer integration then packZpk can create multiple packages, instead of one. Below is a suggestion how you can deploy these newly created packages in the correct order.

```
ZPKS=`php bin/zs-client.phar packZpk --folder="" \
			      	        --destination="" \
	                                --composer`;

for i in $ZPKS; do
	php bin/zs-client.phar installApp --zpk="$i" \
                                 --target="" \
                                 --baseUri="" \
                                 --userParams="APPLICATION_ENV=staging&DB_TYPE=mysql"
done;

```

HTTP tuning
===========

[](#http-tuning)

### Changing Connection Timeout

[](#changing-connection-timeout)

In some cases we may expect slower communication between the client and the server. In that case we can set explicitly the http timeout to a bigger value. The example below shows how to set it to 40 seconds.

```
php bin/zs-client.phar getSystemInfo --target=" \
                                    --http="timeout=40"

```

### Accepting Self-Signed SSL Certificates

[](#accepting-self-signed-ssl-certificates)

In most cases the HTTPS access to your Zend Server will use self-signed certificate. In order to instruct the client to accept the SSL certificate you can do the following.

```
php bin/zs-client.phar getSystemInfo --target=" \
                                    --http="sslverify=0"

```

### Combining Multiple HTTP options

[](#combining-multiple-http-options)

If you want to combine multiple HTTP options in the same request then you can format the value of the http parameter as a valid HTTP query string. Request with timeout of 40 seconds and acceptance of self-signed certificates will look like this.

```
php bin/zs-client.phar getSystemInfo --target=" \
                                    --http="timeout=40&sslverify=0"

```

### Persisting the HTTP Options

[](#persisting-the-http-options)

If you want to keep the http options saved to a target then when defining or updating the target define also the http parameter. Format the value as valid HTTP query string. Take a look at the following example.

```
php bin/zs-client.phar addTarget --target=" \
                                --zsurl="http://x.y.z" \
                                --zskey="admin" \
                                --zssecret="" \
                                --http="timeout=40&sslverify=0"

```

Output formats
==============

[](#output-formats)

In the cases where the output is text zs-client supports three formats: xml, which is the default one, json and kv(key value). To specify the desired format you have to use the --output-format parameter.

Example:

```
php bin/zs-client.phar getSystemInfo --target=zserver --output-format=kv

```

Will return

```
status=Error
edition=ZendServerCluster
zendServerVersion=7.0.0
supportedApiVersions[0]=application/vnd.zend.serverapi;version=1.2
supportedApiVersions[1]=application/vnd.zend.serverapi;version=1.3
...
supportedApiVersions[6]=application/vnd.zend.serverapi;version=1.8
phpVersion=5.5.13
operatingSystem=Linux
deploymentVersion=2.0
serverLicenseInfo[status]=OK
...
serverLicenseInfo[nodeLimit]=100
serverLicenseInfo[edition]=ENTERPRISE
...
managerLicenseInfo[evaluation]=

```

Providing array values
======================

[](#providing-array-values)

Some commands accept arrays as arguments.

For example configurationExtensionsOn allows you turn on multiple extensions at the same time. The code below turns on bcmath and tidy:

```
php bin/zs-client.phar configurationExtensionsOn --target=zserver --extensions=bcmath,tidy

```

Notice the syntax of the extensions value. It is a list of items having comma as delimiter. If for some reason you want to replace the comma with another delimiter this can be done by adding the new delimiter enclosed in smaller than (&lt;) and bigger than (&gt;). In the example below we use semicolon as delimiter:

```
php bin/zs-client.phar configurationExtensionsOn --target=zserver --extensions=bcmath;tidy

```

If needed you can pass more complicated array data. For example a PHP array like the one below ...

```
$data = array (
   'x' => array(
      'a' => 1,
      'b' => 2,
   ),
   y => 3
);
```

... can be represented in the command line using the following syntax.

```
php bin/zs-client.phar installApp --userParams='x[a]=1&x[b]=2&y=3' --target=zserver ...

```

Here the default delimiter is &amp;. If you want to use custom delimiter, semicolon for example, then you can specify it similar to the previous example:

```
php bin/zs-client.phar installApp --userParams='x[a]=1;x[b]=2;y=3' --target=zserver ...

```

Notice about delimiters: Choose your delimiter wisely.

- Choose custom delimiter only if the default ones ("," and "&amp;") do not work for you.
- A delimiter should not be special character that is interpreted by your shell.
- A delimiter should not be special character that is removed silently by your shell.
- A delimiter should not be one of the characters that are already in the data.

Deployment properties syntax
============================

[](#deployment-properties-syntax)

In the `deployment.properties` file one can specify the files that will become part of the application or part of the deployment scripts. Read [this document](https://github.com/zendtech/zendserver-sdk-java/wiki/Deployment-Properties-File) for more information. Make sure to read about the way [scriptsdir.includes](https://github.com/zend-patterns/ZendServerSDK/issues/60) values are processed.

For application excludes we support following wildcard syntax:

- `**/{something}` - will exclude all entries that have base name {something}, no matter if they are files or folders, Example: \*\*/.svn excludes all folders and files with the name `.svn`. This is true for `/.svn`, `public/.svn` or `module/folder-with-file/.svn`. If the entry is folder then the content of that folder and sub-folders will be excluded too.
- `*{something}` - will exclude all entries ending with {something} in their name. Example: `*.fla` will exclude all files ending with `.fla`, like `video.fla`. or directories, like `more.fla`.

Feedback
========

[](#feedback)

For questions and feedback write to slavey (at) zend DOT com.

###  Health Score

37

—

LowBetter than 81% of packages

Maintenance21

Infrequent updates — may be unmaintained

Popularity30

Limited adoption so far

Community26

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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

3929d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/247452?v=4)[slaff](/maintainers/slaff)[@slaff](https://github.com/slaff)

---

Top Contributors

[![slaff](https://avatars.githubusercontent.com/u/247452?v=4)](https://github.com/slaff "slaff (20 commits)")[![slav-at-attachix](https://avatars.githubusercontent.com/u/117992494?v=4)](https://github.com/slav-at-attachix "slav-at-attachix (19 commits)")[![gonzalez](https://avatars.githubusercontent.com/u/95561?v=4)](https://github.com/gonzalez "gonzalez (4 commits)")[![swilczynski](https://avatars.githubusercontent.com/u/1162359?v=4)](https://github.com/swilczynski "swilczynski (3 commits)")[![clarkphp](https://avatars.githubusercontent.com/u/262565?v=4)](https://github.com/clarkphp "clarkphp (2 commits)")[![brobie](https://avatars.githubusercontent.com/u/213990?v=4)](https://github.com/brobie "brobie (2 commits)")[![kher](https://avatars.githubusercontent.com/u/6650040?v=4)](https://github.com/kher "kher (2 commits)")[![zvikazend](https://avatars.githubusercontent.com/u/4850149?v=4)](https://github.com/zvikazend "zvikazend (2 commits)")[![burkl](https://avatars.githubusercontent.com/u/180822?v=4)](https://github.com/burkl "burkl (2 commits)")[![minkbear](https://avatars.githubusercontent.com/u/233714?v=4)](https://github.com/minkbear "minkbear (1 commits)")[![chukShirley](https://avatars.githubusercontent.com/u/4006510?v=4)](https://github.com/chukShirley "chukShirley (1 commits)")[![maxbeutel](https://avatars.githubusercontent.com/u/521162?v=4)](https://github.com/maxbeutel "maxbeutel (1 commits)")[![boedah](https://avatars.githubusercontent.com/u/1183125?v=4)](https://github.com/boedah "boedah (1 commits)")[![perforce-sp](https://avatars.githubusercontent.com/u/49441849?v=4)](https://github.com/perforce-sp "perforce-sp (1 commits)")[![pleckey](https://avatars.githubusercontent.com/u/684580?v=4)](https://github.com/pleckey "pleckey (1 commits)")[![ryanheath86](https://avatars.githubusercontent.com/u/11924366?v=4)](https://github.com/ryanheath86 "ryanheath86 (1 commits)")

---

Tags

phpzend-frameworkzend-serverzpkzs-clientapiclizf2zend server

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/zenddevops-client/health.svg)

```
[![Health](https://phpackages.com/badges/zenddevops-client/health.svg)](https://phpackages.com/packages/zenddevops-client)
```

###  Alternatives

[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.6k38.2k](/packages/matomo-matomo)[soflomo/cache

Command line utility for cache management in Zend Framework 2

1410.9k](/packages/soflomo-cache)[renoki-co/php-helm

PHP Helm Processor is a process wrapper for Kubernetes' Helm v3 CLI. You can run programmatically Helm v3 commands, directly from PHP, with a simple syntax.

1310.6k](/packages/renoki-co-php-helm)

PHPackages © 2026

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