# Programaticaly control Appium sessions

**URL:** <https://discuss.appium.io/t/programaticaly-control-appium-sessions/34119>\
**Category:** Support\
**Created:** [July 1, 2021, 1:44pm UTC](https://discuss.appium.io/t/programaticaly-control-appium-sessions/34119 "2021-07-01T13:44:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![min\_htet\_oo](https://discuss.appium.io/user_avatar/discuss.appium.io/min_htet_oo/32/8693_2.png) [@min\_htet\_oo](https://discuss.appium.io/u/min_htet_oo)\
**Post date:** [July 1, 2021, 1:44pm UTC](https://discuss.appium.io/t/programaticaly-control-appium-sessions/34119/1 "2021-07-01T13:44:30Z")

</div>

Hello,

I want to create the program ( Node.js, golang ) that

- start a new Appium session with desired port number and configurations

- track currently running Appium sessions on the machine

- close desired Appium session

- detect crashes in the Appium session.

Is there any existing libraries and resources I can reference to build the tool with those requirements? Do I need to fork and modify existing Appium codebase? I have found the article that explain how to start the Appium server automatically from Node.js and java [here](https://appiumpro.com/editions/71-starting-an-appium-server-programmatically-using-appiumservicebuilder) . But it only cover how to start appium session programmatically.

---

<div class="post-metadata">

**Author:** ![wreed](https://discuss.appium.io/letter_avatar_proxy/v4/letter/w/919ad9/32.png) [@wreed](https://discuss.appium.io/u/wreed)\
**Post date:** [July 1, 2021, 3:25pm UTC](https://discuss.appium.io/t/programaticaly-control-appium-sessions/34119/2 "2021-07-01T15:25:11Z")

</div>

Seems like you might be looking for something like this:

[https://appium.io/docs/en/advanced-concepts/grid/](https://appium.io/docs/en/advanced-concepts/grid/)
