getting the code of Python

I want to know if someone knows how to see all commands that I’m executing in 3D slicer.
I mean doing an action and seen the code of that accion.

There’s no direct mapping between user actions and python code.

You can look at some of the Self Tests will give you some ideas about how to control the application via python. Other than that the process is basically to study the source code to find how any particular feature is implemented and follow the same pattern. Sometimes this means mapping from C++ to Python, but usually that part is obvious.

We also provide code snippets for all commonly needed tasks in the script repository and if you don’t find something then you can just ask here.

thanks for the information,
I’m trying to work with pure python command lines, I don’t want to use the Qt
the idea is to run everything from a script.

You can use everything from a script, including using Qt classes. Rendering may require an application window (it can be hidden, but it has to exist). You can also use Slicer as Jupyter notebook kernel.