---
title: "How to set the dependency of a plan using Bamboo CLI"
canonical: "https://support.appfire.com/space/SUPPORT/89141963/How%20to%20set%20the%20dependency%20of%20a%20plan%20using%20Bamboo%20CLI"
format: markdown
---
<span style="color: #000000">This article explains how to set a plan's dependency using the </span>*<span style="color: #000000">Bamboo Command Line Interface </span>*<span style="color: #000000">app.</span>

## Instructions

<span style="color: #000000">Use the</span><span style="color: #000000"> </span>[**<span style="color: #000000">s</span>**](https://appfire.atlassian.net/wiki/spaces/BCLI/pages/65934618/addStage)[**<span style="color: #000000">etDependencyOptions</span>**](https://appfire.atlassian.net/wiki/spaces/BCLI/pages/65936469/setDependencyOptions)<span style="color: #000000"> </span><span style="color: #000000">action to set a plan's dependency. Trigger a plan build when another plan build has completed </span><span style="color: #000000">successfully</span><span style="color: #000000">.</span>

- <span style="color: #000000">Execute the following command to set the </span><span style="color: #000000">plan </span><span style="color: #000000">dependency:</span>
  <span style="color: #000000">The output of the CLI action is as shown:</span>
  Plan before adding the dependency:
  Plan after executing the CLI action to set the dependency:
- <span style="color: #000000">Execute the following CLI action to set more than one plan dependency:</span>
  <span style="color: #000000">Plan after executing the CLI action to set the dependency:</span>

<span style="color: #000000">The parameters used with the action are:</span>

- *<span style="color: #000000">--plan</span>*<span style="color: #000000"> value refers to the plan key.</span>
- *<span style="color: #000000">--childPlans</span>*<span style="color: #000000"> value refers to the plan key to be set as a dependency.</span>

> ℹ️ - <span style="color: #000000">It is recommended to test the action in a non-production environment before running in production</span><span style="color: #000000">, </span><span style="color: #000000">or, run the action with </span>[*<span style="color: #000000">--simulate</span>*](https://appfire.atlassian.net/wiki/spaces/BCLI/pages/65933894/--simulate)<span style="color: #333333"> </span><span style="color: #000000">parameter to verify the behavior before deploying.</span>