# How to automate/Trigger local CLI though BitBucket

**URL:** <https://discuss.bitrise.io/t/how-to-automate-trigger-local-cli-though-bitbucket/2250>\
**Category:** Question & Answer\
**Created:** [July 13, 2017, 12:25pm UTC](https://discuss.bitrise.io/t/how-to-automate-trigger-local-cli-though-bitbucket/2250 "2017-07-13T12:25:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![vivek12585](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/vivek12585/32/690_2.png) [@vivek12585](https://discuss.bitrise.io/u/vivek12585)\
**Post date:** [July 13, 2017, 12:25pm UTC](https://discuss.bitrise.io/t/how-to-automate-trigger-local-cli-though-bitbucket/2250/1 "2017-07-13T12:25:17Z")

</div>

hi @viktorbenei

I need your help to configure my local CLI (Which is working fine) to automate, So that if any developer commit code on Master branch my local CLI runs automatically.

Currently to run I have to go to Terminal and then need to run bitrise --ci run deploy to start the process and Now I want to automate this or trigger when we have any commit on master branch just like [Bitrise.io](http://Bitrise.io)

---

<div class="post-metadata">

**Author:** ![viktorbenei](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.bitrise.io/viktorbenei/32/18_2.png) [@viktorbenei](https://discuss.bitrise.io/u/viktorbenei)\
**Post date:** [July 13, 2017, 12:33pm UTC](https://discuss.bitrise.io/t/how-to-automate-trigger-local-cli-though-bitbucket/2250/2 "2017-07-13T12:33:10Z")

</div>

Hi @vivek12585,

The CLI itself is not enough for that; to detect code changes you need a server which either polls the code periodically or handles webhooks.

For more info please see this related discussion:

> [@How to Install Bitrise.cli as a CI server](http://discuss.bitrise.io/t/how-to-install-bitrise-cli-as-a-ci-server/630):
>
> Does BitRise CLI listen on a port? Can it be used as a CI server? Or do I need to wrap it with another web server? Maybe wrap it with Jenkins jobs (ugh)?

If you have any questions just let us know!
