It has been a while since we told you about the evolution of the Platform.sh CLI.. and much has happened. We worked hard on its usability for you, the developer, but also as a chain in your automation workflow. The CLI has become Jenkins’ best friend.
Patrick has been working really really hard on making it better each day. And he has been doing some tremendous work. Not only making it advance by leaps and bounds, but also supporting users on the public github issue queue.. on our own support systems.. through chat.. by parachuting into enemy territory (not sure about the last one). And doing all of that between concerts (if you are in London, you are in luck! You can catch his Quartet’s next concert on the 14th of February).
It is now at its 113th release! There were countless optimizations (well, yes, and some bugfixes) but also a bunch of new features … by the reverse order of their appearance here are some of newest features for the Platform.sh Command Line Interface:
You can now create local SSH tunnels to any environment ! which makes working locally so much more fun and productive! you can tunnel to any Platform.sh service (for example MySQL) so you can use desktop tools to easily work with the Platform.sh services.
platform tunnel:open and you will see something like:
SSH tunnel opened on port 30000 to relationship: redis SSH tunnel opened on port 30001 to relationship: solr SSH tunnel opened on port 30002 to relationship: database Logs are written to: /Users/the_user/.platformsh/tunnels.log List tunnels with: platform tunnels View tunnel details with: platform tunnel:info Close tunnels with: platform tunnel:close
You can now run locally on your terminal
redis-cli -h localhost -p 30000 which will connect to the remote redis server on your current Platform.sh environment.
The CLI can now process submodules in
platform get which is really great when you are doing multiple applications in the same project.
platform app:config-get command now allows you to read the remote application config ! This opens so many new venues for interesting automation!
platform apps allows you to list all the apps in the local repository.. And there is generally much better support for multiple applications in SSH-related commands such as better support for Drush aliases where there are multiple applications: aliases will be generated separately for every Drupal application, with the correct URL and document root.
The CLI has learnt a new trick and checks for updates automatically (there were many other improvements to the install/update process).
Some of you manage many, many projects on Platform.sh (there are clients with more than a hundred separate instances..). So we added the
platform project:delete which goes a long way when you have to manage dozens of projects some of them just test ones.
A small but nice addition, was to allow setting the
restrict_robots property via
platform environment:info . People who manage many site appreciate being able to automate go-live operations.
platform users, user:add, user:role, user:delete is an incredible addition… you can now fully automate all user-related operations … so you can programmatically control which user has which access to which project and which environment. Other people would call this an enterprise feature.
platform sql allows you to run SQL on the remote environment, while
platform sql-dump makes a local dump of the remote environment’s database.
And more … and more .. making a full account will take pages and pages. So I invite you to make sure you have recently updated your CLI (afterwards it will auto-update…). And run
platform list - it will give you the list of commands the CLI understands. And then you can ask it for help.. it is nice.
For example you can try typing
platform help integration:add .
Oh yeah. One last thing. You can also try the most important feature ever introduced to Platform.sh (the team here has total consensus on this). Running
platform bot .