# find cli-modules path

**URL:** <https://discourse.slicer.org/t/find-cli-modules-path/29999>\
**Category:** Development\
**Created:** [June 13, 2023, 2:54am UTC](https://discourse.slicer.org/t/find-cli-modules-path/29999 "2023-06-13T02:54:02Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kening\_Zhang](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/kening_zhang/32/65641_2.png) [@Kening\_Zhang](https://discourse.slicer.org/u/Kening_Zhang)\
**Post date:** [June 13, 2023, 2:54am UTC](https://discourse.slicer.org/t/find-cli-modules-path/29999/1 "2023-06-13T02:54:03Z")

</div>

FiberTractMeasurementsCLI = “/Applications/Slicer.app/Contents/Extensions-31382/SlicerDMRI/lib/Slicer-5.2/cli-modules/FiberTractMeasurements”  
This is the path I need to use in the later code, but for other users, the path changes depends on the version of the Slicer they installed. So I use a command:  
FiberTractMeasurementsCLI = glob.glob(“ **/SlicerDMRI/lib/** /cli-modules/FiberTractMeasurements”, recursive=True)[0] to search the path in the computer, but it takes too long time to find. I wonder if there are any command in Slicer which can find the path of the module installed.  
By the way, the module is contained in DMRI.  
Best wishes,  
Joshua

---

<div class="post-metadata">

**Author:** ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)\
**Post date:** [June 13, 2023, 11:41am UTC](https://discourse.slicer.org/t/find-cli-modules-path/29999/2 "2023-06-13T11:41:30Z")

</div>

I don’t have DMRI installed on this machine, but since the module you are running is a CLI, you should be able to do something like this:

```auto
>>> slicer.modules.modelmaker.path
'/Applications/Slicer-5.2.1.app/Contents/lib/Slicer-5.2/cli-modules/ModelMaker'

```

Replace modelmaker with fibertractmeasurements.
