# Using Slicer and Slicer Modules from Command-Line

**URL:** https://discourse.slicer.org/t/using-slicer-and-slicer-modules-from-command-line/8162
**Category:** Support
**Created:** [August 24, 2019, 6:28pm UTC](https://discourse.slicer.org/t/using-slicer-and-slicer-modules-from-command-line/8162 "2019-08-24T18:28:13Z")
**Posts on this page:** 1
**Showing post:** 2

<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: [August 26, 2019, 2:45pm UTC](https://discourse.slicer.org/t/using-slicer-and-slicer-modules-from-command-line/8162/2 "2019-08-26T14:45:27Z")

</div>

Hi Matt -

It sounds like you are on the right track - we try to support many different ways of accessing Slicer functionality but sometimes you do need to investigate a bit to decide what’s the most streamlined way to accomplish what you need. Some of these practices are changing a bit now that we have Python3 support.

For streamlined batch processing and command line use, the python interpreter (`PythonSlicer`) can be used to access all the packages installed in Slicer, but won’t have the application context so many things won’t be available (e.g. rendering etc). You can use `slicer.util.pip_install()` to add custom packages.

From a shell, you can run many of the CLI modules as commands, using Slicer’s launcher (e.g. `Slicer --launch BRAINSFit`), which is a very lightweight way to access the ITK based C++ code.

Or if you need a full environment where you can access any of the code you can use the full Slicer application and pass it whatever startup script you want (the expense is a little extra startup overhead).

Hope that helps,  
Steve

---

_[View the full topic](https://discourse.slicer.org/t/using-slicer-and-slicer-modules-from-command-line/8162)._
