The Platform.sh CLI is the official command-line interface for Platform.sh

Overview

The Platform.sh CLI is the official command-line interface for Platform.sh. Use this tool to interact with your Platform.sh projects, and to build them locally for development purposes.

Build Status License

Requirements

  • Operating system: Linux, OS X, or Windows 10
  • PHP 5.5.9 or higher, with the following extensions: curl, json, mbstring, pcre, and phar. The installation command will check for these.
  • Git
  • A Bash-like shell:
    • On OS X or Linux/Unix: SH, Bash, Dash or ZSH - usually the built-in shell will work.
    • On Windows: Windows Subsystem for Linux (recommended), or another Bash-compatible shell such as Git Bash, Cygwin, or MinGW. The built-in Command Prompt may also work for most purposes.
  • For building locally, your project's dependencies, e.g.

Installation

Run this command to install the CLI:

curl -sS https://platform.sh/cli/installer | php

In some Windows terminals you may need php.exe instead of php.

Installing manually

  1. Download the platform.phar file from the latest release.

  2. Rename the file to platform, ensure it is executable, and move it into a directory in your PATH.

  3. Enable autocompletion and shell aliases:

     platform self:install
    

Updating

New releases of the CLI are made regularly. Update with this command:

platform self:update

Usage

You can run the Platform.sh CLI in your shell by typing platform.

platform

Use the 'list' command to get a list of available options and commands:

platform list

Authentication

There are two ways to authenticate:

  1. The recommended way is platform login, which lets you log in via a web browser, including via third-party providers such as Google, GitHub, GitLab and Bitbucket.

  2. If using a browser is not possible, use an API token.

    An interactive command is available for this: platform auth:api-token-login

    For non-interactive uses such as scripts or CI systems, set the API token in an environment variable named PLATFORMSH_CLI_TOKEN. This can be insecure if not handled properly, although it is appropriate for systems such as CircleCI, Jenkins and GitLab.

    Warning: An API token can act as the account that created it, with no restrictions. Use a separate machine account to limit the token's access.

Customization

You can configure the CLI via the user configuration file ~/.platformsh/config.yaml. These are the possible keys, and their default values:

Other customization is available via environment variables:

  • PLATFORMSH_CLI_DEBUG: set to 1 to enable cURL debugging. Warning: this will print all request information in the terminal, including sensitive access tokens.
  • PLATFORMSH_CLI_DEFAULT_TIMEOUT: the timeout (in seconds) for most individual API requests. The default is 30.
  • PLATFORMSH_CLI_DISABLE_CACHE: set to 1 to disable caching
  • PLATFORMSH_CLI_HOME: override the home directory (inside which the .platformsh directory is stored)
  • PLATFORMSH_CLI_NO_COLOR: set to 1 to disable colors in output
  • PLATFORMSH_CLI_NO_INTERACTION: set to 1 to disable interaction (useful for scripting). Warning: this will bypass any confirmation questions.
  • PLATFORMSH_CLI_SESSION_ID: change user session (default 'default'). The session:switch command (beta) is now available as an alternative.
  • PLATFORMSH_CLI_SHELL_CONFIG_FILE: specify the shell configuration file that the installer should write to (as an absolute path). If not set, a file such as ~/.bashrc will be chosen automatically. Set this to an empty string to disable writing to a shell config file.
  • PLATFORMSH_CLI_TOKEN: an API token. Warning: An API token can act as the account that created it, with no restrictions. Use a separate machine account to limit the token's access. Additionally, storing a secret in an environment variable can be insecure. It may be better to use the auth:api-token-login command. The environment variable is preferable on CI systems like Jenkins and GitLab.
  • PLATFORMSH_CLI_UPDATES_CHECK: set to 0 to disable the automatic updates check
  • PLATFORMSH_CLI_AUTO_LOAD_SSH_CERT: set to 0 to disable automatic loading of an SSH certificate when running login or SSH commands
  • CLICOLOR_FORCE: set to 1 or 0 to force colorized output on or off, respectively
  • http_proxy or https_proxy: specify a proxy for connecting to Platform.sh

Known issues

Caching

The CLI caches details of your projects and their environments, and some other information. These caches could become out-of-date. You can clear caches with the command platform clear-cache (or platform cc for short).

Contributing

See CONTRIBUTING.md for how to contribute to the CLI.

Comments
  • mount:list, mount:upload and mount:download commands

    mount:list, mount:upload and mount:download commands

    ... to easily look up mounts and rsync files up or down. I've never worked with any of the used components before so I'm pretty sure some stuff (like verbose error reporting, etc.) can be improved but I think it's a pretty solid base for you guys to work with. push and pull duplicate quite some code too and I think you might want to refactor part of this into some service or similar.

    opened by markushausammann 20
  • Drush aliases can't find document root

    Drush aliases can't find document root

    With the latest release, v3.39.0, our team's drush aliases can't find the document root after regenerating. We have to manually add the /app directory before our document root to our alias files for the aliases to function properly. Our sites are currently running Drupal 8.6.7 and Drush 9.4.

    opened by chaseconklin 18
  • Trying to set up my local development environment.

    Trying to set up my local development environment.

    Hello I am trying to set up my local development environment and i am following this link

    But whenever i download a project usning platform get [project-id] [folder-name] command. I got following sh: 1: drush: not found error, while i have downloaded drush by composer global require 'drush/drush:6.*' command.

    linux@ubuntu:~$ platform get uoml5m5oa72ya my-project Created project directory: my-project Enter a number to choose which environment to check out: [0] Master [1] sprint1 [2] Test Arif

    Enter passphrase for key '/home/linux/.ssh/id_rsa': Cloning into 'my-project/repository'... Enter passphrase for key '/home/linux/.ssh/id_rsa': The project Genero was successfully downloaded to: my-project Building application php using the toolstack php:drupal sh: 1: drush: not found Changed current directory to /home/linux/.composer ./composer.json has been updated Loading composer repositories with package information Updating dependencies (including require-dev) Nothing to install or update Generating autoload files sh: 1: drush: not found The build failed with an error Drush must be installed linux@ubuntu:~$

    Can anyone please tell me how can i solve this issue?

    Thanks.

    opened by uzair001 15
  • Activity stream problem:

    Activity stream problem: "Cannot cast a filtered stream on this system"

    When I try the command platform environment:activate --project=project_id --parent=develop branch -vvv, I get this issue:

    Waiting for the activity xxx (Nek activated environment feature/assets-packages):
    
    [-->-------------------------] 3 secs (in progress)
    Warning: stream_select(): Cannot cast a filtered stream on this system in phar:///Users/nek/.platformsh/bin/platform/src/Service/ActivityMonitor.php on line 203
    
    Fatal error: Uncaught ValueError: No stream arrays were passed in phar:///Users/nek/.platformsh/bin/platform/src/Service/ActivityMonitor.php:203
    Stack trace:
    #0 phar:///Users/nek/.platformsh/bin/platform/src/Service/ActivityMonitor.php(203): stream_select(Array, Array, Array, 0, 200000)
    #1 phar:///Users/nek/.platformsh/bin/platform/src/Service/ActivityMonitor.php(124): Platformsh\Cli\Service\ActivityMonitor->canRead(Resource id #810, 200000)
    #2 phar:///Users/nek/.platformsh/bin/platform/src/Service/ActivityMonitor.php(252): Platformsh\Cli\Service\ActivityMonitor->waitAndLog(Object(Platformsh\Client\Model\Activity))
    #3 phar:///Users/nek/.platformsh/bin/platform/src/Command/Environment/EnvironmentActivateCommand.php(118): Platformsh\Cli\Service\ActivityMonitor->waitMultiple(Array, Object(Platformsh\Client\Model\Project))
    #4 phar:///Users/nek/.platformsh/bin/platform/src/Command/Environment/EnvironmentActivateCommand.php(43): Platformsh\Cli\Command\Environment\EnvironmentActivateCommand->activateMultiple(Array, Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\StreamOutput))
    #5 phar:///Users/nek/.platformsh/bin/platform/vendor/symfony/console/Command/Command.php(255): Platformsh\Cli\Command\Environment\EnvironmentActivateCommand->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
    #6 phar:///Users/nek/.platformsh/bin/platform/vendor/symfony/console/Application.php(1010): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
    #7 phar:///Users/nek/.platformsh/bin/platform/src/Application.php(297): Symfony\Component\Console\Application->doRunCommand(Object(Platformsh\Cli\Command\Environment\EnvironmentActivateCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
    #8 phar:///Users/nek/.platformsh/bin/platform/vendor/symfony/console/Application.php(255): Platformsh\Cli\Application->doRunCommand(Object(Platformsh\Cli\Command\Environment\EnvironmentActivateCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
    #9 phar:///Users/nek/.platformsh/bin/platform/vendor/symfony/console/Application.php(148): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
    #10 phar:///Users/nek/.platformsh/bin/platform/bin/platform(32): Symfony\Component\Console\Application->run()
    #11 /Users/nek/.platformsh/bin/platform(10): require('phar:///Users/m...')
    #12 {main}
      thrown in phar:///Users/nek/.platformsh/bin/platform/src/Service/ActivityMonitor.php on line 203
    

    Another issue not-really-related to the cli is that when you try to create an environment while you cannot because you're out of the authorized number of environments deployed, it will create the environment anyway but it's broken. (it would be nice if nothing happen)

    opened by Nek- 12
  • Access to Plataform.sh behind a proxy

    Access to Plataform.sh behind a proxy

    I installed platformsh-cli whitout problems, but when I try connect to Plataform.sh I get this error:

    [~]$ platform
    Welcome to Platform.sh!
    
    Please log in using your Platform.sh account
    
    Your email address: [email protected]
    Your password:
    
    [GuzzleHttp\Exception\ConnectException]                                      
      Error creating resource: [message] fopen(https://marketplace.commerceguys.c  
      om/oauth2/token): failed to open stream: Connection refused                  
      [file] /home/rpayanm/.composer/vendor/guzzlehttp/ringphp/src/Client/StreamH  
      andler.php                                                                   
      [line] 405                                                                   
      [message] Undefined variable: http_response_header                           
      [file] /home/rpayanm/.composer/vendor/guzzlehttp/ringphp/src/Client/StreamH  
      andler.php                                                                   
      [line] 406
    
    [GuzzleHttp\Exception\ConnectException]                                      
      Error creating resource: [message] fopen(https://marketplace.commerceguys.c  
      om/oauth2/token): failed to open stream: Connection refused                  
      [file] /home/rpayanm/.composer/vendor/guzzlehttp/ringphp/src/Client/StreamH  
      andler.php                                                                   
      [line] 405                                                                   
      [message] Undefined variable: http_response_header                           
      [file] /home/rpayanm/.composer/vendor/guzzlehttp/ringphp/src/Client/StreamH  
      andler.php                                                                   
      [line] 406
    
    [GuzzleHttp\Ring\Exception\RingException]                                    
      Error creating resource: [message] fopen(https://marketplace.commerceguys.c  
      om/oauth2/token): failed to open stream: Connection refused                  
      [file] /home/rpayanm/.composer/vendor/guzzlehttp/ringphp/src/Client/StreamH  
      andler.php                                                                   
      [line] 405                                                                   
      [message] Undefined variable: http_response_header                           
      [file] /home/rpayanm/.composer/vendor/guzzlehttp/ringphp/src/Client/StreamH  
      andler.php                                                                   
      [line] 406 
    
    

    I am behind a proxy and I config the terminal for work with my proxy:

    [~]$ echo $http_proxy
    http://192.168.1.1:3128
    [~]$ echo $https_proxy
    http://192.168.1.1:3128
    [~]$ echo $ftp_proxy
    http://192.168.1.1:3128
    

    How I can fix that?

    opened by rpayanm 12
  • Allow specifying a Drush alias group name (and other minor drush alias features)

    Allow specifying a Drush alias group name (and other minor drush alias features)

    This replaces fix-aliases with a drush-aliases command, usage:

    platform project:drush-aliases [-r|--recreate] [-g|--group[="..."]] [-p|--pipe]
    

    This allows you to specify a new group for all the project's Drush aliases, e.g. @mysite instead of @s0mel0ngPl4tf0rmpr0ject1d.

    Or, if you want to keep the obscure group name, you can use the pipe feature to run commands like drush @platform drush-aliases -p._local status inside any project.

    This PR also sets a 'uri' key on Drush aliases, useful for commands like drush @mysite.master uli.

    Unfortunately the Platform CLI doesn't distinguish between Drupal and non-Drupal applications - so it creates Drush aliases for any project - which is a problem for another day.

    opened by pjcdawkins 12
  • Mac M1 processor on Docker: Segmentation fault on db:dump and user:list

    Mac M1 processor on Docker: Segmentation fault on db:dump and user:list

    I'm seeing a SEGV on db:dump (Debian Buster, on ddev). It's worked fine for a few months with various versions of ddev and various versions of platformsh-cli, but now I just see the Segmentation Fault no matter what version of platformsh-cli I use. I've tried 3.66.3 (which is where I started getting it) but I manually installed 3.65.4 and saw the same thing with that. 3.66.1 has the same behavior, same SEGV, but it has definitely worked and passed tests before. Using same PHP version as previously, 7.4.18, same build.

    platform user:list also does a SEGV

    platform db:dump -vvv --yes --gzip --file=/var/www/html/.ddev/.downloads/db.sql.gz --project=lago3j23xu2w6 --environment=master
    DEBUG Selected project: lago3j23xu2w6
    Segmentation fault
    

    Is this a result of something on the server end perhaps? The project it's acting on is running fine.

    Suggestions how to debug a SEGV here?

    Edit: List of some commands that SEGV:

    • user:list
    • db:dump
    • route:list
    • environment:list
    • commit:list
    • domain:list
    opened by rfay 11
  • Build: allow to change the --contrib-destination

    Build: allow to change the --contrib-destination

    By now, when the "drush make" command is called, the --contrib-destination option is harcoded to the current directory. That might be good for production reasons but during the dev it would be better to be able to build all the contributed projects in the sites/all folder. It would avoid polluting the repository with things that don't need to be there.

    I don't know what's the best way to add this to the command line but I think it would only take a few minutes, so I hope you won't wait too long to code it. Alternatively, you can just advice me on how you would see this option and I'll make it.

    opened by DuaelFr 11
  • cURL error 60: SSL certificate problem: certificate has expired

    cURL error 60: SSL certificate problem: certificate has expired

    This is a duplicate of https://github.com/platformsh/platformsh-cli/issues/1079 but with new insights.

    TL;DR: please enable non-ECDHE ciphers on api.platform.sh

    While helping ppl migrate from SymfonyCloud to Platform.sh, I saw MANY ppl having this issue, "certificate has expired".

    This happens on both Windows and Mac, and the reason is an outdated openssl lib. Ppl using SymfonyCloud don't have this issue because the symfony binary embeds it's own SSL routines. But ppl that use the platform binary use the system's openssl, and :boom:

    While we might dream of telling ppl to upgrade, it's out of reach from a DX perspective. The current situation gives a terrible experience to those ppl.

    I dig a bit more to understand the root cause and here it is:

    First, I reproduced the issue on a wsl on Windows 10. Then, I realized that composer doesn't have the issue, which means that php is able to connect to both packagist.org and github.com.

    Here is why: api.platform.sh supports only ECDHE ciphers, while packagist and github both also allow non-ECDHE ciphers. See below for details.

    The solution is then simple: the TLS endpoint serving api.platform.sh should be reconfigured to allow the same ciphers as github.

    A workaround in the platform client could be to use openssl_get_cipher_methods() to disable SSL verification if php doesn't support ECDHE ciphers. But it'd be a shame to go this way.

    $> nmap --script ssl-enum-ciphers -p 443 api.platform.sh
    [...]
    ]| ssl-enum-ciphers: 
    |   TLSv1.2: 
    |     ciphers: 
    |       TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (ecdh_x25519) - A
    |       TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (ecdh_x25519) - A
    |       TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256 (ecdh_x25519) - A
    |       TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 (ecdh_x25519) - A
    |       TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384 (ecdh_x25519) - A
    |       TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA (ecdh_x25519) - A
    |       TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA (ecdh_x25519) - A
    |     compressors: 
    |       NULL
    |     cipher preference: server
    |_  least strength: A
    
    $> nmap --script ssl-enum-ciphers -p 443 api.github.com
    [...]
    ]| ssl-enum-ciphers: 
    |   TLSv1.2: 
    |     ciphers: 
    |       TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 (ecdh_x25519) - A
    |       TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (ecdh_x25519) - A
    |       TLS_ECDHE_ECDSA_WITH_CHACHA20_POLY1305_SHA256 (ecdh_x25519) - A
    |       TLS_ECDHE_RSA_WITH_CHACHA20_POLY1305_SHA256 (ecdh_x25519) - A
    |       TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 (ecdh_x25519) - A
    |       TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (ecdh_x25519) - A
    |       TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 (ecdh_x25519) - A
    |       TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 (ecdh_x25519) - A
    |       TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384 (ecdh_x25519) - A
    |       TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384 (ecdh_x25519) - A
    |       TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA (ecdh_x25519) - A
    |       TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA (ecdh_x25519) - A
    |       TLS_RSA_WITH_AES_128_GCM_SHA256 (rsa 2048) - A
    |       TLS_RSA_WITH_AES_256_GCM_SHA384 (rsa 2048) - A
    |       TLS_RSA_WITH_AES_128_CBC_SHA256 (rsa 2048) - A
    |       TLS_RSA_WITH_AES_256_CBC_SHA256 (rsa 2048) - A
    |       TLS_RSA_WITH_AES_128_CBC_SHA (rsa 2048) - A
    |       TLS_RSA_WITH_AES_256_CBC_SHA (rsa 2048) - A
    |     compressors: 
    |       NULL
    |     cipher preference: server
    |_  least strength: A
    
    
    opened by nicolas-grekas 10
  • RootNotFoundException when trying to ssh from outside a project

    RootNotFoundException when trying to ssh from outside a project

    Hey guys, noticed this Exception popping up nowadays. I used to run platform ssh from random terminals most of the times and it would bring up a list from where i could choose which project and branch to connect to. I've used project:set-remote to map my projects to the CLI tool, but I still enjoyed opening up a quick random terminal, running platform ssh and off i went. I get the reasoning for this, but wouldn't it be easier to add a short info message to use platform:set-remote if it's supposed to be a project root, instead of an Exception? That way everyone can use the commands however and wherever they wish.

    Thanks for this awesome tool! Kind regards, Alex.

    opened by alexthunder3 10
  • Cannot install behind firewall

    Cannot install behind firewall

    The CLI installer fails when attempting to install behind a corporate firewall. The installer does not recognize HTTP_PROXY and HTTPS_PROXY env vars.

    The issue seems to be with file_get_contents() -- which needs some special handling WRT proxies (See https://stackoverflow.com/questions/31634604/file-get-contents-with-https-requests-via-proxy )

    The manual install method detailed at https://github.com/platformsh/platformsh-cli#installing-manually does work (but this is not in the docs for installing the CLI)

    Can the installer be adjusted to recognize and use a proxy?

    opened by nightbeacons 9
  • Question: Is it possible to run platform auth:api-token-login non-interactively

    Question: Is it possible to run platform auth:api-token-login non-interactively

    Seems a silly question but I am missing something.

    When I run: platform auth:api-token-login --no-interaction I get:

    Non-interactive use of this command is not supported.
    
    To authenticate non-interactively, configure an API token using the PLATFORMSH_CLI_TOKEN environment variable.
    

    Which I expect.

    However if I set my environment variable first such as:

    export PLATFORMSH_CLI_TOKEN="xxxx"
    

    And then run platform auth:api-token-login --no-interaction I get:

    An API token is already set via config
    

    So when I run git fetch platform master for example I am greeted with:

    Hello user (UUID: xxxxx), you successfully authenticated, but could not connect to service xxx (reason: access requires MFA)
    [email protected]: Permission denied (publickey).
    fatal: Could not read from remote repository.
    
    Please make sure you have the correct access rights
    and the repository exists.
    

    Worth adding, I have all my SSH keys correctly added to PlatformSH ssh-keys section.

    Am I missing something here or is there a genuine bug.

    opened by GaxZE 2
  • Feature Request: Delete backups

    Feature Request: Delete backups

    Currently the only method of deleting an existing backup is to use the API.

    https://api.platform.sh/docs/#tag/Environment-Backups/operation/delete-projects-environments-backups

    Can a new backups command for backup:delete <backup_id> be implemented for self service management of backups?

    opened by raupie 0
  • Fix #1171: Autocompletion not working on Windows

    Fix #1171: Autocompletion not working on Windows

    Add quotes around the application executable before passing it to the autocomplete hook script. Quoting prevents issues with the path when containing special characters (WS and/or \).

    opened by lolautruche 4
  • Autocompletion not working on Windows with a fresh install

    Autocompletion not working on Windows with a fresh install

    On Windows 10, using Git Bash, after the regular setup, the autocompletion outputs the following message:

    $ platform bash: C:UsersIEUser.platformshbinplatform: command not found
    

    It seems that the \ character is stripped in the path. Having a look at the generated autocompletion.sh, I figured out that the path to the platform CLI is not quoted, and the \ are not doubled.

    I was able to fix the issue by replacing:

    RESULT=$(C:\Users\IEUser\.platformsh\bin\platform _completion --shell-type bash >/dev/null)
    

    by:

    RESULT=$("C:\Users\IEUser\.platformsh\bin\platform" _completion --shell-type bash >/dev/null)
    

    After this change, and after sourcing ~/.bashrc, the autocompletion works. It ouputs another error, but probably related to the Windows Bash implementation:

    __ltrim_colon_completions: command not found
    
    opened by lolautruche 1
Releases(v4.0.1)
  • v4.0.1(Jan 8, 2023)

    Changes since v4.0.0:

    • Exit the legacy CLI after deleting (during migration) to avoid Phar errors.
    • Clear the buffer when re-fetching the activity log.
      • Fixes a JSON decoding error (occurring mainly with longer and busier logs).
    • Parse the TZ environment variable according to the glibc format.
      • Fixes "Notice: date_default_timezone_set(): Timezone ID 'UTC0' is invalid".
      • Non-zero offsets are not supported.

    https://github.com/platformsh/legacy-cli/compare/v4.0.0...v4.0.1

    SHA-256 checksum for platform.phar: 6a5a0492c2def6fc3c9d89616aea8b3f621519385988afe054492293e4d43dd3

    Source code(tar.gz)
    Source code(zip)
    platform.phar(19.47 MB)
  • v4.0.0(Jan 6, 2023)

    Changes since v3.88.1:

    This release helps users migrate to the new CLI, which is now recommended.

    To install the latest version see: https://docs.platform.sh/administration/cli.html

    The new CLI is entirely backwards compatible with the "Legacy" CLI: features and usage are the same. However, it has a new installation method which no longer requires PHP; it embeds the Legacy CLI and a PHP runtime as part of the same binary.

    The Legacy CLI will now prompt to install the new one, when appropriate. A notice will be displayed if both CLIs are installed, with a suggestion to delete the Legacy one.

    The new CLI's version number will track the Legacy version that it wraps; in other words version numbers will be synchronized.

    Other changes:

    • Update ssh-key commands:
      • Use ed25519 instead of rsa by default.
      • Recommend SSH certificates instead of keys.
      • Otherwise, use ed25519 instead of rsa by default.
      • Support interactive selection in ssh-key:delete.
    • Allow the disk command to be used during crons/deployments.
    • Always print the selected project/environment in verbose mode.
    • Fix wildcard matching for environment:delete.
    • Support wildcards when filtering by activity type.
    • Describe which columns are available in help for the --columns option (affects commands that list data).
    • Re-fetch the activity log to ensure log items are not missed.
    • Fix "Cannot cast a filtered stream" error (on PHP 7.4+).
    • Reduce blank lines from shell commands in verbose mode.
    • Update library giggsey/libphonenumber-for-php from 8.13.1 to 8.13.3.

    https://github.com/platformsh/platformsh-cli/compare/v3.88.1...v4.0.0

    SHA-256 checksum for platform.phar: 2f2831c0dc319ceb889243409e196b83abd9c7d72a12784ef0f58071d0a7d779

    Source code(tar.gz)
    Source code(zip)
    platform.phar(19.47 MB)
  • v3.88.1(Dec 5, 2022)

    Changes since v3.88.0:

    • Avoid the self-install prompt in more situations:
      • In all cases where the self:install command previously exited successfully.
      • If environment variables are set: PLATFORMSH_CLI_APPLICATION_PROMPT_SELF_INSTALL=0 or PLATFORMSH_CLI_WRAPPED=1

    https://github.com/platformsh/platformsh-cli/compare/v3.88.0...v3.88.1

    SHA-256 checksum for platform.phar: ad9fb5bb88e6e984acad1688d255c773adc18b36b563715b6578280c7164126f

    Source code(tar.gz)
    Source code(zip)
    platform.phar(19.45 MB)
  • v3.88.0(Dec 4, 2022)

    Changes since v3.87.1:

    • Add support for automatic "self-installation" of shell configuration files.
    • Fix auto-login (broken in v3.87.0).

    https://github.com/platformsh/platformsh-cli/compare/v3.87.1...v3.88.0

    SHA-256 checksum for platform.phar: d57ec2a1cc2dd41fb8fd885a5385f278658a887c792134064eb1d8bb4dac879e

    Source code(tar.gz)
    Source code(zip)
    platform.phar(19.45 MB)
  • v3.87.1(Nov 30, 2022)

  • v3.87.0(Nov 30, 2022)

    Changes since v3.86.1:

    • Integrate with the phone number verification API:
      • Check if phone number verification is required in the project:create (create) command.
      • Add an auth:verify-phone-number command to verify the number interactively.

    https://github.com/platformsh/platformsh-cli/compare/v3.86.1...v3.87.0

    SHA-256 checksum for platform.phar: d359488ea7d24ef0dc81d9fce4b95cda46fd6f92942ce7ba105aafe55b4f1eb6

    Source code(tar.gz)
    Source code(zip)
    platform.phar(19.45 MB)
  • v3.86.1(Nov 24, 2022)

    Changes since v3.86.0:

    • Avoid a TypeError when reading invalid applications.yaml configuration
    • Clarify activity cannot be cancelled error
    • Fix "multi" command exiting after the first project

    https://github.com/platformsh/platformsh-cli/compare/v3.86.0...v3.86.1

    SHA-256 checksum for platform.phar: 50a673346ee9b912bf17541f2e5379beaf826060136b9dd0b41efe22b3c0dc0e

    Source code(tar.gz)
    Source code(zip)
    platform.phar(3.13 MB)
  • v3.86.0(Nov 16, 2022)

    Changes since v3.85.0:

    • Improve default options and their documentation:
      • Add a --no-interaction option (to match Symfony Console defaults a little more closely), with the same meaning as enabling the PLATFORMSH_CLI_NO_INTERACTION environment variable: disable interaction and pick the default answer to questions. The existing --yes (-y) option is similar in meaning and now the same in effect; the answer "yes" has been made the default for all confirmation questions.
      • Hide deprecated options from command help (still with no error if they are used). This includes --no (-n), which can be confused with --no-interaction though it is subtly different: it answers "no" to all confirmation questions, and picks the default answer for other questions. This also restores --ansi and --no-ansi as hidden options; they are present by default in Symfony Console but were previously omitted from this CLI for simplicity.
      • See platform help [cmd] for more information.
    • Improve the git tree cache for commands such as read.
    • Show the disk command in the list.
    • Two fixes to the multi command:
      • Fix dialog-based project selection (previously resulting in 0 projects)
      • Fix non-interactive use: e.g. the -y flag now works for the parent and child commands independently.

    https://github.com/platformsh/platformsh-cli/compare/v3.85.0...v3.86.0

    SHA-256 checksum for platform.phar: fd3292890d824c53a9742de4ea429f142abe40dd978fc42f45102cd986d57ca8

    Source code(tar.gz)
    Source code(zip)
    platform.phar(3.13 MB)
  • v3.85.0(Nov 8, 2022)

    Changes since v3.84.2:

    • Accept multiple arguments in the "multi" command. This means that the command to run multiple times can be specified after -- without needing to use quotes.
    • Fix listing custom schema (database) names for postgresql in the db:dump command.
    • Fix PHP 5.6 incompatibility in the db:size command.
    • Fix Dedicated environment detection in the logs command.
    • Fix inconsistency between -e and --environment in the variable:create command.

    https://github.com/platformsh/platformsh-cli/compare/v3.84.2...v3.85.0

    SHA-256 checksum for platform.phar: 97bad58e270aef712f2d1e842b5cf3d28c2aefb7fd5b0b764d16dcd32173fe22

    Source code(tar.gz)
    Source code(zip)
    platform.phar(3.13 MB)
  • v3.84.2(Oct 31, 2022)

    Changes since v3.84.1:

    • Hide unavailable integrations (per project) in the integration:create command
    • Simplify prompts for the syslog and other log integrations
    • Add clarity to the --yes flag in help

    https://github.com/platformsh/platformsh-cli/compare/v3.84.1...v3.84.2

    SHA-256 checksum for platform.phar: d52fcd8e54f7d95459b619887c167e93227c1a26bcaa62d2f514b0f07f4575fa

    Source code(tar.gz)
    Source code(zip)
    platform.phar(3.13 MB)
  • v3.84.1(Oct 26, 2022)

    Changes since v3.84.0:

    • Fix integration:create command: auth_token and auth_mode are only for syslog integrations

    https://github.com/platformsh/platformsh-cli/compare/v3.84.0...v3.84.1

    SHA-256 checksum for platform.phar: fb3f024ff35c994f580b6b326b3a64c7329681260dc1a5974b4a5c3bd8359391

    Source code(tar.gz)
    Source code(zip)
    platform.phar(3.12 MB)
  • v3.84.0(Oct 26, 2022)

    Changes since v3.83.1:

    New features:

    • Add support for third-party log forwarding integrations (API availability depends on the project): newrelic, sumologic, splunk, and syslog.
    • Add metrics:disk-usage (disk) command.

    Other changes:

    • Use the API URL consistently to fetch a project even if a direct hostname is supplied. This deprecates the --host option (the option is still there but will be ignored).
    • Bump composer/ca-bundle from 1.3.3 to 1.3.4 (#1170).
    • Disable docker credential helper inside a container (where it does not work).
    • Ensure Drush alias names only contain allowed characters. This fixes aliases for environment names containing a slash.
    • Find the correct app's SSH URL when no instance or default is given.

    https://github.com/platformsh/platformsh-cli/compare/v3.83.1...v3.84.0

    SHA-256 checksum for platform.phar: ec884906f8cb3fac88e1a75fa10a6313924ffa414f65b205dc8b52d8d132664b

    Source code(tar.gz)
    Source code(zip)
    platform.phar(3.12 MB)
  • v3.83.1(Oct 17, 2022)

    Changes since v3.83.0:

    • Quick fix for: 'The "instance" option does not exist' in tunnel commands

    https://github.com/platformsh/platformsh-cli/compare/v3.83.0...v3.83.1

    SHA-256 checksum for platform.phar: c8c6daa4dc6abca1dc960160034bf5e0c8ca3e4ebcb4da2d145867e1cd3c1803

    Source code(tar.gz)
    Source code(zip)
    platform.phar(3.09 MB)
  • v3.83.0(Oct 17, 2022)

    Changes since v3.82.2:

    New features:

    • Add --instance (-I) option to SSH commands.

    Other changes:

    • Disable the credential helper when running in a snap (e.g. an IDE on Ubuntu), as it appears to work inconsistently (reading yet not writing).
    • Allow interactive choice of workers for SSH to Dedicated environments.
    • Rework fetching projects
      • Separate project "stub" from full project representations to avoid using the stub information accidentally. Fixes inconsistent marking a user as the project "owner" in the users:list (users) command.
      • Fixes the validation error when asked for a project ID interactively.

    https://github.com/platformsh/platformsh-cli/compare/v3.82.2...v3.83.0

    SHA-256 checksum for platform.phar: 9059683cf3b79090d33be95f861b3dba0b864071dbfdcc88330474fdd9459090

    Source code(tar.gz)
    Source code(zip)
    platform.phar(3.09 MB)
  • v3.82.2(Sep 23, 2022)

    Changes since v3.82.1:

    • Display the error from Xcode in the project:get (get) command (#1159)
    • Clarify "switch remote" vs "set remote" in the project:create (create) command (#1161)
    • Fix env:delete command to respect --no-delete-branch in interactive mode (#1158)

    https://github.com/platformsh/platformsh-cli/compare/v3.82.1...v3.82.2

    SHA-256 checksum for platform.phar: 40d5853b958d30a895a884b1b062ea7ae5701063823b5dcb33c612e115311ac0

    Source code(tar.gz)
    Source code(zip)
    platform.phar(3.09 MB)
  • v3.82.1(Sep 7, 2022)

    Changes since v3.82.0:

    • Improve pagination description in the org:sub command.
    • Clarify --my option in project:list (projects) for organizations.
    • Add integration.health.webhook activity type.
    • Fix commit:list (commits) to respect --limit for commits with multiple parents.
    • Replace templated values when installing shell config files. This only affects alternative configurations, e.g. dev builds.

    https://github.com/platformsh/platformsh-cli/compare/v3.82.0...v3.82.1

    SHA-256 checksum for platform.phar: 74530796f070cceb8fb66968493514c4efc6c0406a2d8d73dde20ee211a09db2

    Source code(tar.gz)
    Source code(zip)
    platform.phar(3.08 MB)
  • v3.82.0(Aug 29, 2022)

    Changes since v3.81.1:

    • Support pagination in the organization:subscriptions command. Add --page and --count (-c) options. A 0 count disables pagination.
    • Adapt the project:list (projects) command for consistency:
      • Specifying a --page will work even if pagination had been otherwise disabled.
      • Remove terminal height detection, instead making the "items per page" count a configuration parameter defaulting to 20 items, overridden by --count.
    • Clarify environment variables when the home directory cannot be detected.
    • Remove now unnecessary webhook code in integration commands, fixing a bug where source code integration webhooks were added with the incorrect URL.

    https://github.com/platformsh/platformsh-cli/compare/v3.81.1...v3.82.0

    SHA-256 checksum for platform.phar: 94bcded000e301fc23a7254fc8920aa752864bb0a5222fc307cc5d5ee4fcba7d

    Source code(tar.gz)
    Source code(zip)
    platform.phar(3.08 MB)
  • v3.81.1(Aug 21, 2022)

    Changes since v3.81.0:

    • Fix: automatic update prompt not saving last check time if there is no update
    • Remove mbstring requirement from README and installer
    • Add environment.domain activities to the type filter
    • Allow use of --json option with lower curl versions

    https://github.com/platformsh/platformsh-cli/compare/v3.81.0...v3.81.1

    SHA-256 checksum for platform.phar: 7f45e7cb60f2b0c0cbacfa84c6989d5a72e1c01d13429cd8e6b6f9891b8a2080

    Source code(tar.gz)
    Source code(zip)
    platform.phar(3.09 MB)
  • v3.81.0(Aug 2, 2022)

    Changes since v3.80.3:

    New features:

    • Add --no-warn (-W) and --header (-H) options to the auth:token command.
    • Add --json option to curl commands.
    • Return a success (zero) exit code from self:update if there is no update.

    Other changes:

    • Fix "Property defined twice" error in the org:billing:address command.
    • Clarify no organization message in project:create (create) command.
    • Remove more now unnecessary checks for environment types. Improves performance in environment:list (env) command.
    • Fix example for user:get --level environment.

    https://github.com/platformsh/platformsh-cli/compare/v3.80.3...v3.81.0

    SHA-256 checksum for platform.phar: 3960b1cf697cb6d6c076bf02d4f5b7d0dcf2cdd9511ca75694545f29b86316e6

    Source code(tar.gz)
    Source code(zip)
    platform.phar(3.08 MB)
  • v3.80.3(Jul 18, 2022)

    Changes since v3.80.2:

    • Translate environment ID to type when adding or changing a user.
      Since around 1 year ago with the introduction of environment types, users should be given roles on the environment type, not on a specific environment ID. For those still using environment IDs, the CLI now translates these to types on the client side (before the API call), for more clarity in the output and when later listing project invitations.
    • Remove support for projects which do not have environment types (such projects no longer exist).

    More information on environment types: https://docs.platform.sh/administration/users.html#environment-types

    https://github.com/platformsh/platformsh-cli/compare/v3.80.2...v3.80.3

    SHA-256 checksum for platform.phar: 1b4ced76dd6dc4a68d2f09d5027069999512a6655e20040e5cab000adc27be52

    Source code(tar.gz)
    Source code(zip)
    platform.phar(3.08 MB)
  • v3.80.2(Jul 4, 2022)

    Changes since v3.80.1:

    • Filter by organization (--org) without needing direct access, in the project:list (projects) command.
    • Display the simpler version of the project directory in the project:get (get) command.

    https://github.com/platformsh/platformsh-cli/compare/v3.80.1...v3.80.2

    SHA-256 checksum for platform.phar: 713e558013f3a58465fabb118b758b8b69e02d52189257a28681a4623132b843

    Source code(tar.gz)
    Source code(zip)
    platform.phar(3.08 MB)
  • v3.80.1(Jun 22, 2022)

    Changes since v3.80.0:

    • Fix inverted --exclude in the environment:delete command (a bug introduced in v3.80.0)

    https://github.com/platformsh/platformsh-cli/compare/v3.80.0...v3.80.1

    SHA-256 checksum for platform.phar: 4faad688860fc95eb43280c2a592015a3df8489d7588d6839a14e9f5242b6933

    Source code(tar.gz)
    Source code(zip)
    platform.phar(3.08 MB)
  • v3.80.0(Jun 16, 2022)

    Changes since v3.79.8:

    • Support the --shared-key option for webhook as well as health.webhook integrations.
    • Fix SSL chain validation for files containing multiple certificates.
    • Improvements to the environment:delete command:
      • Only select the current environment if nothing else is specified. This may change behavior for existing scripts if they expect the currently checked-out environment to be always selected for deletion.

      • Avoid asking twice about deleting the same environment.

      • Add an --only-type option, to enforce only deleting environments of one or more types, e.g.

        platform env:delete --merged --only-type development
        

    https://github.com/platformsh/platformsh-cli/compare/v3.79.8...v3.80.0

    SHA-256 checksum for platform.phar: 7510e922f598532560a4fffd435449441d83090a298ceb394b0988aaf22253a5

    Source code(tar.gz)
    Source code(zip)
    platform.phar(3.08 MB)
  • v3.79.8(Jun 3, 2022)

    Changes since v3.79.7:

    • Add --if-exists to pg_dump, in the db:dump command, so that PostgreSQL dump files can be restored without errors on an empty database.
    • Avoid matching "-" as an environment ID when parsing a Console URL.
    • Fix legacy region detection in the backup:restore command, preventing accidental restore to the wrong environment on such regions.

    https://github.com/platformsh/platformsh-cli/compare/v3.79.7...v3.79.8

    SHA-256 checksum for platform.phar: 049047a2c133711e3a008766ee46b39297fe7e711be82bdb240bec9643440ff4

    Source code(tar.gz)
    Source code(zip)
    platform.phar(3.07 MB)
  • v3.79.7(May 18, 2022)

    Changes since v3.79.6:

    • Fix an additional bug introduced in v3.79.4: the activity log ending abruptly without refreshing the activity state.
    • Avoid errors caused by invalid config when processing environment variables.

    https://github.com/platformsh/platformsh-cli/compare/v3.79.6...v3.79.7

    SHA-256 checksum for platform.phar: cfe3b0ae7c3a2929fe7ddc51ed4619084c52924c3c6055826cd7c03da44a4d66

    Source code(tar.gz)
    Source code(zip)
    platform.phar(3.07 MB)
  • v3.79.6(May 17, 2022)

  • v3.79.5(May 17, 2022)

    Changes since v3.79.4:

    • Fix: "pagination" section in config.yaml could not override the default
    • Fix potentially not using the cache when a project hostname is known
    • Fix "Call to a member function setApiUrl() on bool"

    https://github.com/platformsh/platformsh-cli/compare/v3.79.4...v3.79.5

    SHA-256 checksum for platform.phar: 2b9ca65d52bb9d57b66fe081d9f92dd76e3b85cfeae5e532feeea162a50b54d4

    Source code(tar.gz)
    Source code(zip)
    platform.phar(3.07 MB)
  • v3.79.4(May 17, 2022)

    Changes since v3.79.3:

    • Handle the "cancelled" state in the activity:log command.

    • Allow manual override of the region ID in the project:create command.

    • Always use the API gateway URL ("external API proxy") when configured.

    • Error when a conditional field is used in the wrong context. For example, when the --fetch-branches option is used with the webhook integration type, previously it would have been silently ignored, now it will fail with an error message. Affected commands: integration:add, integration:update, variable:create, variable:update

    • Allow pagination to be disabled in the project:list (projects) command. Pagination for this command can be disabled using an environment variable:

        export PLATFORMSH_CLI_PAGINATION_ENABLED=0
      

      or by adding the following to $HOME/.platformsh/config.yaml:

        pagination:
          enabled: false
      
    • Return a 0 exit code from environment:delete if no error occurred.

    https://github.com/platformsh/platformsh-cli/compare/v3.79.3...v3.79.4

    SHA-256 checksum for platform.phar: 0a9e7e968f8c7f816f750d14f1c2b5757078c5bad401108a6e4709668794b576

    Source code(tar.gz)
    Source code(zip)
    platform.phar(3.07 MB)
  • v3.79.3(May 10, 2022)

    Changes since v3.79.2:

    • Fix organization support in the project:delete command. Removes the now inaccurate advice, "Only the project's owner can delete it".
    • Fix wildcard matching for environment IDs that contain a slash (/). Affected commands: environment:delete and user:add.
    • Print the current environment in the environment:delete command.

    https://github.com/platformsh/platformsh-cli/compare/v3.79.2...v3.79.3

    SHA-256 checksum for platform.phar: 7e5cf7e406c2e1b2f04b0990db8fcf88f0a62d42ff0dc9e553256f79108150a9

    Source code(tar.gz)
    Source code(zip)
    platform.phar(3.07 MB)
  • v3.79.2(May 3, 2022)

    Changes since v3.79.1:

    • Fix 'The "incomplete" option does not exist' in the integration:activities command

    https://github.com/platformsh/platformsh-cli/compare/v3.79.1...v3.79.2

    SHA-256 checksum for platform.phar: 49318c296808e02e9c720f0319485d9c410d381dbffe0b695349633387100972

    Source code(tar.gz)
    Source code(zip)
    platform.phar(3.06 MB)
Owner
Platform.sh
Continuous Deployment Cloud Hosting.
Platform.sh
Skeleton for creating a new Command Line Interface application with a minimum of dependencies.

Skeleton for creating a new Command Line Interface application with a minimum of dependencies.

Richard van Laak 1 Jan 17, 2022
Provides the equivalent of request ( Context ) and response ( Stdio ) objects for the command line interface

Provides the equivalent of request ( Context ) and response ( Stdio ) objects for the command line interface, including Getopt support, and an independent Help object for describing commands.

Aura for PHP 103 Sep 28, 2022
A powerful command line application framework for PHP. It's an extensible, flexible component, You can build your command-based application in seconds!

CLIFramework CLIFramework is a command-line application framework, for building flexiable, simple command-line applications. Commands and Subcommands

Yo-An Lin 428 Dec 13, 2022
Lovely PHP wrapper for using the command-line

ShellWrap What is it? It's a beautiful way to use powerful Linux/Unix tools in PHP. Easily and logically pipe commands together, capture errors as PHP

James Hall 745 Dec 30, 2022
A PHP library for command-line argument processing

GetOpt.PHP GetOpt.PHP is a library for command-line argument processing. It supports PHP version 5.4 and above. Releases For an overview of the releas

null 324 Dec 8, 2022
Another Command Line Argument Parser

Optparse — Another Command Line Argument Parser Install 1. Get composer. 2. Put this into your local composer.json: { "require": { "chh/optparse

Christoph Hochstrasser 18 Nov 1, 2019
👨🏻‍🚀 A command-line tool that gives you the Alpine Day 2021 schedule in your timezone. 🚀

Alpine Day Schedule a command-line tool that gives you the Alpine Day 2021 schedule in your timezone. ?? Quick start Requires PHP 7.4+ # First, instal

Nuno Maduro 11 Jun 10, 2021
PHP Interminal is a command-line tool that gives you access to PHP Internals discussions in your terminal.

PHP Interminal is a command-line tool that gives you access to PHP Internals discussions in your terminal. ??

Nuno Maduro 32 Dec 26, 2022
Patrol is an elegant command-line tool that keeps your PHP Project's dependencies in check.

Patrol is an elegant command-line tool that keeps your PHP Project's dependencies in check. Installation / Usage Requires PHP 8.0+ First, install Patr

Nuno Maduro 237 Nov 14, 2022
Twitter raffles in the command line, with PHP and minicli

Rafflebird Rafflebird is a highly experimental CLI application for giveaways / raffles on Twitter, built in PHP with Minicli. Disclaimer: The recent s

Erika Heidi 33 Nov 16, 2022
A command line code generator for Drupal.

Drupal Code Generator A command line code generator for Drupal. Installation Download the latest stable release of the code generator.

Ivan 227 Dec 14, 2022
A PHP command line tool used to install shlink

Shlink installer A PHP command line tool used to install shlink. Installation Install this tool using composer.

null 8 Nov 3, 2022
Laracon Schedule a command-line tool that gives you the Laracon Online schedule in your timezone.

Laracon Schedule a command-line tool that gives you the Laracon Online schedule in your timezone. ?? Quick start Requires PHP 7.4+ # First, install: c

Nuno Maduro 101 Sep 16, 2022
Command-line control panel for Nginx Server to manage WordPress sites running on Nginx, PHP, MySQL, and Let's Encrypt

EasyEngine v4 EasyEngine makes it greatly easy to manage nginx, a fast web-server software that consumes little memory when handling increasing volume

EasyEngine 2k Jan 4, 2023
Generic PHP command line flags parse library

PHP Flag Generic PHP command line flags parse library Features Generic CLI options and arguments parser. Support set value data type(int,string,bool,a

PHP Toolkit 23 Nov 13, 2022
A simple command-line tool whose aim is to facilitate the continous delivery of PHP apps

Deployer Simple command-line tool that aims to facilitate the continous delivery of PHP apps, particularly Laravel apps. Imagine you want to update yo

Fernando Bevilacqua 4 Sep 8, 2021
🍃 In short, it's like Tailwind CSS, but for the PHP command-line applications.

Termwind Termwind allows you to build unique and beautiful PHP command-line applications, using the Tailwind CSS API. In short, it's like Tailwind CSS

Nuno Maduro 1.8k Dec 30, 2022
A PHP Command Line tool that makes it easy to compile, concat, and minify front-end Javascript and CSS/SCSS dependencies.

Front End Compiler A PHP Command Line tool that makes it easy to compile, concat, and minify front-end Javascript and CSS/SCSS dependencies. The minif

Happy Medium 2 Nov 12, 2021
php command line script to DCA crypto from Coinbase Pro

dca.php A simple php script designed to be run via the command line via a cron job. This will connect to coinbase pro and buy the crypto coins specifi

Ben Suffolk 2 Oct 22, 2021