Clone Template repositories


When you create an Environment from a Template, the Component repositories from the Environment point to the repositories the Template contains. This is the desired outcome when you are working with your own Templates on a given project.

But whenever starting a new project, you need to "break free" of the Template repositories, so that you can test things out, and eventually create a new, distinct Template out of the resulting bunnyshell.yaml.


  1. Clone/fork the original Template repositories, so you have the code separated, in a new, distinct repository.
  2. Modify the gitRepo properties, for each of the Components, so they point to your new repositories.


You can use the Bunnyshell CLI to help you with this.


Use the CLI to find the repositories

First, you need to list the Environments, and find the ID of the Environment you're targetting.

$ bns env list
EnvironmentID | ProjectID  | Name                       | Namespace | Type    | OperationStatus
b1XarqzE8Y    | DEKr5YlrPp | Demo Books                 | v4h6fa    | primary | stopped
70xNn2Jxz1    | DEKr5YlrPp | Demo Books Dev             | k3uylq    | primary | stopped
zqx8BkeXkM    | DEKr5YlrPp | Express + React + Postgres | 7zjzcg    | primary | stopped

Once you have the Environment ID, you can run bns git info to retrieve the Git information.

$ bns git info --environment b1XarqzE8Y
EnvironmentID | ComponentID | Name     | Repository                                        | Branch    | Sha                                      | DeployedSha
b1XarqzE8Y    | KQ0r8DqGYw  | backend  | | main      | fa565d504a461f3fc2fa78017137eacdc091de73 | fa565d504a461f3fc2fa78017137eacdc091de73
b1XarqzE8Y    | gWzl8DNz3Q  | db       | | main      |                                          |
b1XarqzE8Y    | A50Arg3z98  | frontend | | main      | fa565d504a461f3fc2fa78017137eacdc091de73 | fa565d504a461f3fc2fa78017137eacdc091de73