Kit Core comes with a python interpreter and a scripting system. It is mainly used to write extensions in python, but it can also be used to make simple python scripts. Each extension can register a set of script search folders. Scripts can be run via command line or API.

How to add a script folder

Multiple ways:

  1. Use the /app/python/scriptFolders setting. As with any setting it can be changed in the core config, in the app config, via the command line or at runtime using settings API.

  2. Use IAppScripting API, e.g. carb::getCachedInterface<omni::kit::IApp>()->getPythonScripting()->addSearchScriptFolder("myfolder").

  3. Specify in the extension.toml, in the [[python.scriptFolder]] section:

path = "scripts"

How to run a script

  1. Command line:

Example: > kit.exe --exec " arg1 arg2"  --exec "open_stage"

  1. Settings:

Example: > kit.exe --app/exec/0=" arg1"

  1. API:

C++ Example: carb::getCachedInterface<omni::kit::IApp>()->getPythonScripting()->executeFile("")

Python Example:"") see ( for more details.


The script extension (.py) can be omitted.