:article_outdated: True .. _doc_command_line_tutorial: Command line tutorial ===================== .. highlight:: shell Some developers like using the command line extensively. Godot is designed to be friendly to them, so here are the steps for working entirely from the command line. Given the engine relies on almost no external libraries, initialization times are pretty fast, making it suitable for this workflow. .. note:: On Windows and Linux, you can run a Godot binary in a terminal by specifying its relative or absolute path. On macOS, the process is different due to Godot being contained within an ``.app`` bundle (which is a *folder*, not a file). To run a Godot binary from a terminal on macOS, you have to ``cd`` to the folder where the Godot application bundle is located, then run ``Godot.app/Contents/MacOS/Godot`` followed by any command line arguments. If you've renamed the application bundle from ``Godot`` to another name, make sure to edit this command line accordingly. Command line reference ---------------------- **General options** +----------------------------+----------------------------------------------------------------------+ | Command | Description | +----------------------------+----------------------------------------------------------------------+ | ``-h``, ``--help`` | Display the list of command line options. | +----------------------------+----------------------------------------------------------------------+ | ``--version`` | Display the version string. | +----------------------------+----------------------------------------------------------------------+ | ``-v``, ``--verbose`` | Use verbose stdout mode. | +----------------------------+----------------------------------------------------------------------+ | ``-q, --quiet`` | Quiet mode, silences stdout messages. Errors are still displayed. | +----------------------------+----------------------------------------------------------------------+ **Run options** +------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ | Command | Description | +------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``--`` | Separator for user-provided arguments. Following arguments are not used by the engine, but can be read from ``OS.get_cmdline_user_args()``. | +------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``-e``, ``--editor`` | Start the editor instead of running the scene (:ref:`target=editor ` must be used). | +------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``-p``, ``--project-manager`` | Start the Project Manager, even if a project is auto-detected (:ref:`target=editor ` must be used). | +------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``--debug-server `` | Start the editor debug server (``://[:]``, e.g. ``tcp://127.0.0.1:6007``) | +------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``--quit`` | Quit after the first iteration. | +------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``-l``, ``--language `` | Use a specific locale. ```` follows the format ``language_Script_COUNTRY_VARIANT`` where language is a 2 or 3-letter language code in lower case | | | and the rest is optional. See :ref:`doc_locales` for more details. | +------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``--path `` | Path to a project (```` must contain a 'project.godot' file). | +------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``-u``, ``--upwards`` | Scan folders upwards for 'project.godot' file. | +------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``--main-pack `` | Path to a pack (.pck) file to load. | +------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``--render-thread `` | Render thread mode ('unsafe', 'safe', 'separate'). See :ref:`Thread Model ` | | | for more details. | +------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``--remote-fs
`` | Remote filesystem (``[:]`` address). | +------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``--remote-fs-password `` | Password for remote filesystem. | +------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``--audio-driver `` | Audio driver. Use ``--help`` first to display the list of available drivers. | +------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``--display-driver `` | Display driver (and rendering driver). Use ``--help`` first to display the list of available drivers. | +------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``--rendering-method `` | Renderer name. Requires driver support. | +------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``--rendering-driver `` | Rendering driver (depends on display driver). Use ``--help`` first to display the list of available drivers. | +------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``--gpu-index `` | Use a specific GPU (run with ``--verbose`` to get available device list). | +------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``--text-driver `` | Text driver ('Fonts', 'BiDi', 'shaping') | +------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``--tablet-driver `` | Pen tablet input driver. | +------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``--headless`` | Enable headless mode (``--display-driver headless --audio-driver Dummy``). Useful for servers and with ``--script``. | +------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``--write-movie `` | Run the engine in a way that a movie is written (by default .avi MJPEG). Fixed FPS is forced when enabled, but can be used to change movie FPS. | | | Disabling vsync can speed up movie writing but makes interaction more difficult. | +------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ | ``--disable-vsync`` | Force disabling of vsync. Run the engine in a way that a movie is written (by default .avi MJPEG). | | | Fixed FPS is forced when enabled, but can be used to change movie FPS. | +------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------+ **Display options** +------------------------------------+----------------------------------------------------------------------------+ | Command | Description | +------------------------------------+----------------------------------------------------------------------------+ | ``-f``, ``--fullscreen`` | Request fullscreen mode. | +------------------------------------+----------------------------------------------------------------------------+ | ``-m``, ``--maximized`` | Request a maximized window. | +------------------------------------+----------------------------------------------------------------------------+ | ``-w``, ``--windowed`` | Request windowed mode. | +------------------------------------+----------------------------------------------------------------------------+ | ``-t``, ``--always-on-top`` | Request an always-on-top window. | +------------------------------------+----------------------------------------------------------------------------+ | ``--resolution x`` | Request window resolution. | +------------------------------------+----------------------------------------------------------------------------+ | ``--position ,`` | Request window position. | +------------------------------------+----------------------------------------------------------------------------+ | ``--single-window`` | Use a single window (no separate subwindows). | +------------------------------------+----------------------------------------------------------------------------+ | ``--xr-mode `` | Select XR mode (default/off/on). | +------------------------------------+----------------------------------------------------------------------------+ **Debug options** .. note:: Debug options are only available in the editor and debug export templates (they require ``debug`` or ``release_debug`` build targets, see :ref:`doc_introduction_to_the_buildsystem_target` for more details). +------------------------------+---------------------------------------------------------------------------------------------------------+ | Command | Description | +------------------------------+---------------------------------------------------------------------------------------------------------+ | ``-d``, ``--debug`` | Debug (local stdout debugger). | +------------------------------+---------------------------------------------------------------------------------------------------------+ | ``-b``, ``--breakpoints`` | Breakpoint list as source::line comma-separated pairs, no spaces (use %20 instead). | +------------------------------+---------------------------------------------------------------------------------------------------------+ | ``--profiling`` | Enable profiling in the script debugger. | +------------------------------+---------------------------------------------------------------------------------------------------------+ | ``--gpu-profile`` | Show a GPU profile of the tasks that took the most time during frame rendering. | +------------------------------+---------------------------------------------------------------------------------------------------------+ | ``--gpu-validation`` | Enable graphics API :ref:`validation layers ` for debugging. | +------------------------------+---------------------------------------------------------------------------------------------------------+ | ``--gpu-abort`` | Abort on GPU errors (usually validation layer errors), may help see the problem if your system freezes. | +------------------------------+---------------------------------------------------------------------------------------------------------+ | ``--remote-debug `` | Remote debug (``://[:]``, e.g. ``tcp://127.0.0.1:6007``). | +------------------------------+---------------------------------------------------------------------------------------------------------+ | ``--debug-collisions`` | Show collision shapes when running the scene. | +------------------------------+---------------------------------------------------------------------------------------------------------+ | ``--debug-paths`` | Show path lines when running the scene. | +------------------------------+---------------------------------------------------------------------------------------------------------+ | ``--debug-navigation`` | Show navigation polygons when running the scene. | +------------------------------+---------------------------------------------------------------------------------------------------------+ | ``--debug-stringnames`` | Print all StringName allocations to stdout when the engine quits. | +------------------------------+---------------------------------------------------------------------------------------------------------+ | ``--frame-delay `` | Simulate high CPU load (delay each frame by milliseconds). | +------------------------------+---------------------------------------------------------------------------------------------------------+ | ``--time-scale `` | Force time scale (higher values are faster, 1.0 is normal speed). | +------------------------------+---------------------------------------------------------------------------------------------------------+ | ``--disable-render-loop`` | Disable render loop so rendering only occurs when called explicitly from script. | +------------------------------+---------------------------------------------------------------------------------------------------------+ | ``--disable-crash-handler`` | Disable crash handler when supported by the platform code. | +------------------------------+---------------------------------------------------------------------------------------------------------+ | ``--fixed-fps `` | Force a fixed number of frames per second. This setting disables real-time synchronization. | +------------------------------+---------------------------------------------------------------------------------------------------------+ | ``--print-fps`` | Print the frames per second to the stdout. | +------------------------------+---------------------------------------------------------------------------------------------------------+ **Standalone tools** +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ | Command | Description | +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------+ | ``-s``, ``--script