| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
The Legacy CLI is the legacy version of the command-line interface for Upsun (formerly Platform.sh).
For the current Upsun CLI, check this repository.
To install the CLI, use either Homebrew (on Linux, macOS, or the Windows Subsystem for Linux) or Scoop (on Windows):
brew install platformsh/tap/platformsh-cliscoop bucket add platformsh https://github.com/platformsh/homebrew-tap.git
scoop install platformFor manual installation, you can also download the latest binaries.
This installation method is considered legacy and is discouraged, use one of the methods above instead. Starting with version 5.x, this installation method will not be supported.
In order to use the Legacy installer, you need to have an operating system supported by PHP (Linux, OS X, or Windows) and PHP 5.5.9 or higher, with the following extensions: curl, json, pcre, and phar.
Run this command to install the CLI using the legacy installer, given that you have PHP already installed:
curl -sS https://platform.sh/cli/installer | phpIn some Windows terminals you may need php.exe instead of php.
Upgrade using the same tool:
brew upgrade platformsh-cliscoop update platformYou can run this CLI in your shell by typing platform.
platform
Use the 'list' command to get a list of available options and commands:
platform list
There are two ways to authenticate:
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.
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.
You can configure the CLI via the user configuration file ~/.platformsh/config.yaml.
The possible keys that can be overridden are in the config-defaults.yaml and config.yaml files.
Other customization is available via environment variables, including:
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).
See CONTRIBUTING.md for how to contribute to the CLI.
| Back | FazBrowse Home | New Git URL |