# Rancher-cli & cross environment operations

**URL:** <https://forums.suse.com/t/rancher-cli-cross-environment-operations/5757>\
**Category:** General\
**Created:** [March 6, 2017, 2:10pm UTC](https://forums.suse.com/t/rancher-cli-cross-environment-operations/5757 "2017-03-06T14:10:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![cabrinoob](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/cabrinoob/32/1343_2.png) [@cabrinoob](https://forums.suse.com/u/cabrinoob)\
**Post date:** [March 6, 2017, 2:10pm UTC](https://forums.suse.com/t/rancher-cli-cross-environment-operations/5757/1 "2017-03-06T14:10:39Z")

</div>

Hi,  
Iam using Rancher-CLI (beta) and i’d like to know if there’s a way to use the rancher-cli in a cross environment way? I would like to automate some deployment operations between environments.

I have 2 rancher environments : dev and prod. I’d like to export docker-compose.yaml from dev and import it to prod. But, with rancher CLI, I have to launch a “rancher config” to select the environment I want to work on. Even if I’am using an “account API key”, I only see stacks of one environment at a time. So ti’s not very easy to automate things.

I expected to see everything my API account can access without have to switch environment.

For example, it would be nice to have something like :

```
rancher up -s <env>/<stack>
```

---

<div class="post-metadata">

**Author:** ![superseb](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/superseb/32/2424_2.png) [@superseb](https://forums.suse.com/u/superseb)\
**Post date:** [July 25, 2017, 9:45pm UTC](https://forums.suse.com/t/rancher-cli-cross-environment-operations/5757/2 "2017-07-25T21:45:27Z")

</div>

Not sure which version you were using, but in the global options you have `--environment`

````auto
  --environment value, --env value Environment name or ID [$RANCHER_ENVIRONMENT] ```
````
