• Overview
    Key features
    • Observability
    • Auto-scaling
    • Multiframework
    • Security
    Frameworks
    • Django
    • Next.js
    • Drupal
    • WordPress
    • Symfony
    • Magento
    • See all frameworks
    Languages
    • PHP
    • Python
    • Node.js
    • Ruby
    • Java
    • Go
  • Industries
    • Consumer Goods
    • Media/Entertainment
    • Higher Education
    • Government
    • Ecommerce
  • Pricing
  • Featured articles
    • Switching to Platform.sh can help IT/DevOps organizations drive 219% ROI
    • Organizations, the ultimate way to manage your users and projects
  • Support
  • Docs
  • Login
  • Request a demo
  • Free Trial
Meet Upsun. The new, self-service, fully managed PaaS, powered by Platform.sh.Try it now
Blog

Platform.sh CLI developments

symfonydrupal
16 March, 2015
Patrick Dawkins
Patrick Dawkins
Product Engineer

The command line has always been the most flexible and powerful way for us humans to communicate with their computers. For web developers, command-line tools have proliferated over recent years: many developers spend most of their time typing commands in a shell.

Our command-line interface, the Platform.sh CLI, is based on the Symfony Console component. It’s convenient to use alongside other command-line tools: you need to use  git  to manage the project’s code, so  platform  is a natural way to manage the project itself. The CLI also helps you build projects for local development, particularly if you use Drupal.

To install or upgrade, you can use Composer:

composer global require 'platformsh/cli:@stable'

Recent new features (over the past two months) include:

  • Activity commands, for viewing recent activities on an environment - activity:list  ( activities ) and  activity:log .

  • An  environment:metadata  command for reading additional environment properties - this also lets you update the environment’s title, and its ‘parent’ and ‘enable_smtp’ properties.

  • The  ssh-key:add  command can now generate an SSH public key for you, before uploading it to your Platform.sh account.

  • Integration commands, for adding GitHub, HipChat, and other integrations -  integration:list  ( integrations ),  integration:addintegration:update , and  integration:delete .

    <p>A GitHub integration allows you to create Platform.sh environments for every pull request (and/or every branch) in your GitHub repository:</p>
    
    <pre>

    platform integration:add --type github --repository example/example --token ExampleToken

    <p>A HipChat integration will report Platform.sh activity to your private HipChat room.</p>
    
    <pre>

    platform integration:add --type hipchat --room 123456 --token ExampleToken

    <p>There is also a generic ‘webhook’ integration: Platform.sh will post information about every activity to your own webhook URL.</p>
    
    <pre>

    platform integration:add --type webhook --url [https://example.com/webhook](https://example.com/webhook)

  • A new  environment:restore  command for restoring a backup. You can also now list recent backups using:  platform environment:backup --list

  • Commands which trigger remote operations on Platform.sh now wait for the operation to complete: branch, activate, deactivate, backup, restore, merge, and synchronize. Or if you are impatient, you can pass a  --no-wait  option. You can use  platform activity:list  to check the state of previous operations.

Other improvements:

  • Improved usability (validation and feedback) for the  httpaccess  command.
  • Install Drush automatically when required (provided that Composer is available globally).
  • Check for ‘vanilla-mode’ Drupal without requiring  COPYRIGHT.txt .
  • Changed Drupal ‘profile-mode’ builds so that Drush Make no longer builds inside the repository.
  • Many other small bug fixes.

For more information about the CLI (and to file issues) see the public GitHub repository. We accept pull requests!

Get the latest Platform.sh news and resources
Subscribe

Related Content

Running with FrankenPHP on Platform.sh

Running with FrankenPHP on Platform.sh

Company
AboutSecurity and complianceTrust CenterCareersPressContact us
Thank you for subscribing!
  •  
Field required
Leader Winter 2023
System StatusPrivacyTerms of ServiceImpressumWCAG ComplianceAcceptable Use PolicyManage your cookie preferencesReport a security issue
© 2024 Platform.sh. All rights reserved.
Supported by Horizon 2020's SME Instrument - European Commission 🇪🇺