PHPackages                             terra/cli - 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. terra/cli

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

terra/cli
=========

Terra Command Line Interface

2.x-dev(9y ago)498915[49 issues](https://github.com/terra-ops/terra-cli/issues)[6 PRs](https://github.com/terra-ops/terra-cli/pulls)PHP

Since Sep 25Pushed 8y ago11 watchersCompare

[ Source](https://github.com/terra-ops/terra-cli)[ Packagist](https://packagist.org/packages/terra/cli)[ RSS](/packages/terra-cli/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (3)Versions (9)Used By (0)

Terra
=====

[](#terra)

[![Terra command line interface](https://camo.githubusercontent.com/6702af5db8e60d917d400404b6322edc973e444923a7b981ec2e1635d4fc8c16/68747470733a2f2f7062732e7477696d672e636f6d2f6d656469612f43486a3248767955594141616976792e706e673a6c61726765)](https://camo.githubusercontent.com/6702af5db8e60d917d400404b6322edc973e444923a7b981ec2e1635d4fc8c16/68747470733a2f2f7062732e7477696d672e636f6d2f6d656469612f43486a3248767955594141616976792e706e673a6c61726765)

About
-----

[](#about)

Terra is a suite of tools for the purpose of quickly and easily standing up web apps with Docker.

It is designed to be as simple as possible for developers, while being powerful enough to use in production at scale.

With Terra, all you care about is your site's code. Stop wasting time setting up environments. Let terra and docker do all the work for you.

.terra.yml
----------

[](#terrayml)

Your .terra.yml file gives you tons of power.

Check out a [sample .terra.yml file](https://github.com/terra-ops/terra-cli/blob/master/docs/.terra.yml) and put one in your app's source code.

Community
---------

[](#community)

Please join the chat on Gitter. We want as much feedback as possible!

[![Join the chat at https://gitter.im/terra-ops/terra-cli](https://camo.githubusercontent.com/abe08b740a4156153736f791393ec4da6619c4be73212e75769f52edacc0e2b5/68747470733a2f2f6261646765732e6769747465722e696d2f4a6f696e253230436861742e737667)](https://gitter.im/terra-ops/terra-cli)

Documentation &amp; Issues
--------------------------

[](#documentation--issues)

[Read the Docs](http://terra.readthedocs.org/) or help [improve the docs](https://github.com/terra-ops/terra-cli/edit/master/docs/index.md).

[Issues](https://github.com/terra-ops/terra-cli/issues) and [Story Boarding](https://huboard.com/terra-ops/terra-cli/)

Origin
------

[](#origin)

Terra was created as a proof of concept. Symfony CLI had proven itself worthy with projects like

-
-
-
-

The creator of Terra, Jon Pugh, is also the creator of [OpenDevShop](http://getdevshop.com). He was brought on as a maintainer of the [Aegir Project](http://aegirproject.org) by Christopher Gervais.

Jon wanted to create a new CLI that could replace the [Provision](http://drupal.org/project/provision.org) project, and service as the backbone of products like Aegir and DevShop.

The goal is to be more than just a simple CLI, more than a great local dev tool, but to also attempt to solve the bigger problems of scaling, testing, deploying, and monitoring web software.

Purpose
-------

[](#purpose)

To make having a website as easy as possible throughout it's entire lifetime, from localhost through large scale production, through entirely open source software.

Terra is a human interface for working on, deploying, testing, and scaling web software projects.

Terra makes it quick and painless to manage your projects and environments.

Push a button to get a testing infrastructure.

"Apps"
------

[](#apps)

An "App" is your website. It is the source code for your project. Terra knows the git URL and (will) know the available branches and tags. Terra will help you update your app from it's upstream repository using git.

"Environment"
-------------

[](#environment)

The Environment is all of the systems needed to run the source code.

The "EnvironmentFactory" class will be pluggable. Out of the box it provides a working docker cluster, but we can extend it to work with a "multiple apache vhost" model or with a different container provider.

Users will be able to use terra to control environments hosted by multiple hosting providers, including localhost all through the same interface.

Community &amp; Collaboration is Key
------------------------------------

[](#community--collaboration-is-key)

We wish to make this tool work for everyone. We wish to get feedback from all parties interested in solving these problems in order to prioritize what to work on.

Please join us in the Issue Queues on GitHub and the chat rooms on gitter.

Scalable Out of the Box
-----------------------

[](#scalable-out-of-the-box)

We wanted to start from scalable. Terra's purpose is to make scaling a push button affair.

Currently Terra uses Docker and Docker compose to stand up and scale websites.

This makes it easy to get environments running quickly on hosted servers or on local computers for development.

Planning
--------

[](#planning)

See  for the user story board.

I am going to direct planning in an agile way as much as possible. Please post as much feedback as you can in the issue queues.

Requirements
------------

[](#requirements)

- **docker**
- **docker-compose**

Commands
--------

[](#commands)

#### `terra status`

[](#terra-status)

List all apps on this system.

#### `terra app:add`

[](#terra-appadd)

Add a new app to the system.

Currently only Drupal sites are supported.

#### `terra app:remove`

[](#terra-appremove)

Remove an app from the system

#### `terra environment:add`

[](#terra-environmentadd)

Add an environment for an app.

#### `terra environment:remove`

[](#terra-environmentremove)

Remove an environment.

#### `terra environment:enable`

[](#terra-environmentenable)

Runs `docker-compose up` to initiate an environment.

#### `terra environment:disable`

[](#terra-environmentdisable)

Runs `docker-compose stop` to disable an environment.

#### `terra environment:rebuild`

[](#terra-environmentrebuild)

Looks in your app's .terra.yml file for `rebuild_source: @drushalias`. Syncs the database, copies the files, then runs the rebuild hooks.

#### `terra environment:status`

[](#terra-environmentstatus)

Provides status information about an environment, including path and URL.

#### `terra environment:scale`

[](#terra-environmentscale)

Set the number of "app" containers. This command is a wrapper for `docker compose app=5`.

Vagrant
=======

[](#vagrant)

There is a Vagrantfile in the repo that can be used to fire up a linux server with Terra installed.

Use the Vagrant plugin "vagrant-hostsupdater" to automatically set your /etc/hosts file for the VM:

```
$ vagrant plugin install vagrant-hostsupdater

```

Tweak the Stack
---------------

[](#tweak-the-stack)

Since the beginning we knew we had to let users tweak the stack.

We also wanted it to just work, out of the box, so we created "Default" docker-compose stack that you can see here:

We allow your app's source code to change its `docker-compose.yml` stack right now:

```
# Specific settings for docker compose go here
docker_compose:

  # Overrides will replace any item in the entire docker-compose array.
  overrides:
    app:
      image: wordpress
      links:
        - storage
      environment:
        WORDPRESS_DB_HOST: database
        WORDPRESS_DB_USER: drupal
        WORDPRESS_DB_NAME: drupal
        WORDPRESS_DB_PASSWORD: drupal
    storage:
      image: mongo
```

This snippet, if put in your apps `.terra.yml` file, will replace the drupal container with wordpress, and add &amp; link a MongoDB container.

Anything under "docker\_compose: overrides:" is merged with the stock stack, which you can see here:

Example Apps
------------

[](#example-apps)

### Drupal 7 Core

[](#drupal-7-core)

### Drupal 7 Makefile

[](#drupal-7-makefile)

### Drupal 8

[](#drupal-8)

### Wordpress

[](#wordpress)

Replaces the `terra/drupal` docker image with `wordpress`

### Scaler

[](#scaler)

Simply prints the IP address to test scaling.

**Symfony**Terra API is a symfony app. Use it as an example.

Coding Standards
----------------

[](#coding-standards)

As a symfony app, we are following PSR-2 Coding Standards.

Use 4 spaces for indentation, and follow all the other rules specified at

Example Project: 18F Agile BPA Prototype
----------------------------------------

[](#example-project-18f-agile-bpa-prototype)

NuCivic submitted a working prototype for the 18F Agile BPA.

We used Terra as the recommended method for recreating the site on another server.

See the [instructions](example-setup.md) on setting up  on another server using Terra.

Terra Apps
----------

[](#terra-apps)

Each app you run with terra should have a `.terra.yml` file in the root.

To see an example file, see

Terra API
---------

[](#terra-api)

The "Terra API" project serves as a web based interface for Terra. It is built on Drupal 8.

See the [terra-api](https://github.com/terra-ops/terra-api/blob/master/README.md) GitHub repo for more information.

History
=======

[](#history)

Some of the R&amp;D for Terra happened in a project called "director":

Director is now deprecated.

Comparisons to Kalabox
======================

[](#comparisons-to-kalabox)

There is a striking similarity to this project and Kalabox.

We love Kalabox and the Kalamuna team, but there are a few key differences:

1. Terra is designed for all things: local development, testing, and production.
2. Terra is written in PHP &amp; Symfony: Kalabox is written in Node JS
3. Terra is a proposed platform to power the future of Aegir &amp; Devshop. We hope to recruit a large community from those tools.
4. Terra currently extends the kalabox/drush container to offer a container to SSH into.

We hope to collaborate with them on as much as possible.

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community25

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 84.6% of commits — single point of failure

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

3318d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/10539fb9e887c35b626eba70c97dd9d53ba14e987d4f129b55a488664a834eca?d=identicon)[jonpugh](/maintainers/jonpugh)

---

Top Contributors

[![jonpugh](https://avatars.githubusercontent.com/u/106420?v=4)](https://github.com/jonpugh "jonpugh (389 commits)")[![jlyon](https://avatars.githubusercontent.com/u/550909?v=4)](https://github.com/jlyon "jlyon (15 commits)")[![jmolivas](https://avatars.githubusercontent.com/u/366275?v=4)](https://github.com/jmolivas "jmolivas (14 commits)")[![proofoftom](https://avatars.githubusercontent.com/u/3009533?v=4)](https://github.com/proofoftom "proofoftom (9 commits)")[![EclipseGc](https://avatars.githubusercontent.com/u/105393?v=4)](https://github.com/EclipseGc "EclipseGc (8 commits)")[![badri](https://avatars.githubusercontent.com/u/41959?v=4)](https://github.com/badri "badri (4 commits)")[![xendk](https://avatars.githubusercontent.com/u/229422?v=4)](https://github.com/xendk "xendk (3 commits)")[![theodorosploumis](https://avatars.githubusercontent.com/u/1315321?v=4)](https://github.com/theodorosploumis "theodorosploumis (3 commits)")[![jameswilson](https://avatars.githubusercontent.com/u/243532?v=4)](https://github.com/jameswilson "jameswilson (3 commits)")[![sheldonrampton](https://avatars.githubusercontent.com/u/2838758?v=4)](https://github.com/sheldonrampton "sheldonrampton (2 commits)")[![ergonlogic](https://avatars.githubusercontent.com/u/380362?v=4)](https://github.com/ergonlogic "ergonlogic (2 commits)")[![nateswart](https://avatars.githubusercontent.com/u/839888?v=4)](https://github.com/nateswart "nateswart (2 commits)")[![mackensen](https://avatars.githubusercontent.com/u/553370?v=4)](https://github.com/mackensen "mackensen (1 commits)")[![jacintocapote](https://avatars.githubusercontent.com/u/838381?v=4)](https://github.com/jacintocapote "jacintocapote (1 commits)")[![asgorobets](https://avatars.githubusercontent.com/u/869079?v=4)](https://github.com/asgorobets "asgorobets (1 commits)")[![mglaman](https://avatars.githubusercontent.com/u/3698644?v=4)](https://github.com/mglaman "mglaman (1 commits)")[![prachetasp](https://avatars.githubusercontent.com/u/3642289?v=4)](https://github.com/prachetasp "prachetasp (1 commits)")[![rabellamy](https://avatars.githubusercontent.com/u/1263878?v=4)](https://github.com/rabellamy "rabellamy (1 commits)")

### Embed Badge

![Health badge](/badges/terra-cli/health.svg)

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

###  Alternatives

[drush/drush

Drush is a command line shell and scripting interface for Drupal, a veritable Swiss Army knife designed to make life easier for those of us who spend some of our working hours hacking away at the command prompt.

2.4k60.6M803](/packages/drush-drush)[jolicode/castor

A lightweight and modern task runner. Automate everything. In PHP.

54743.1k4](/packages/jolicode-castor)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.6M574](/packages/shopware-core)[2lenet/crudit-bundle

The easy like Crud'it Bundle.

1616.4k14](/packages/2lenet-crudit-bundle)[open-dxp/opendxp

Content &amp; Product Management Framework (CMS/PIM)

9421.6k61](/packages/open-dxp-opendxp)[rcsofttech/audit-trail-bundle

Enterprise-grade, high-performance Symfony audit trail bundle. Automatically track Doctrine entity changes with split-phase architecture, multiple transports (HTTP, Queue, Doctrine), and sensitive data masking.

1189.8k](/packages/rcsofttech-audit-trail-bundle)

PHPackages © 2026

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