# Starting Lens from command line and using a defined cluster

**URL:** https://forums.k8slens.dev/t/starting-lens-from-command-line-and-using-a-defined-cluster/2219
**Category:** Lens General
**Created:** [November 16, 2023, 9:10am UTC](https://forums.k8slens.dev/t/starting-lens-from-command-line-and-using-a-defined-cluster/2219 "2023-11-16T09:10:37Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![dave.pilditch-2](https://forums.k8slens.dev/user_avatar/forums.k8slens.dev/dave.pilditch-2/32/825_2.png) [@dave.pilditch-2](https://forums.k8slens.dev/u/dave.pilditch-2)
#### Post date: [November 16, 2023, 9:10am UTC](https://forums.k8slens.dev/t/starting-lens-from-command-line-and-using-a-defined-cluster/2219/1 "2023-11-16T09:10:37Z")

</div>

Hi,

I’m wondering if anyone can help or point me in the right direction, I am writing a Bash script that currently starts up Lens (if the correct option is selected). Is there a way from command line to start Lens and use a selected cluster?

Thanks!

---

<div class="post-metadata">

### Author: ![phorsmalahti](https://forums.k8slens.dev/user_avatar/forums.k8slens.dev/phorsmalahti/32/560_2.png) [@phorsmalahti](https://forums.k8slens.dev/u/phorsmalahti)
#### Post date: [December 18, 2023, 7:10pm UTC](https://forums.k8slens.dev/t/starting-lens-from-command-line-and-using-a-defined-cluster/2219/2 "2023-12-18T19:10:56Z")

</div>

You can use the “lens” cli tool to connect to a cluster, e.g. “lens clusters connect ”.
