godot
Run the Godot game engine
TLDR
Run a project if the current directory contains a project.godot file, otherwise open the project manager
Edit a project (the current directory must contain a project.godot file)
Open the project manager even if the current directory contains a project.godot file
Export a project for release using a given export preset (the preset must be defined in the project)
Execute a standalone GDScript file (the script must inherit from SceneTree or MainLoop)
SYNOPSIS
godot [OPTIONS] [PROJECT_PATH]
godot --editor
godot --export <PRESET_NAME> <EXPORT_PATH>
PARAMETERS
--help
Displays a comprehensive list of all available command-line options and their descriptions.
--version
Prints the installed Godot Engine version to the console.
--path <path>
Specifies the absolute or relative path to a Godot project folder. If provided, the engine will attempt to run or operate on this project.
--export <preset_name> <path>
Exports the currently loaded project using the specified export preset name to the given output path. The preset name must match one defined in the project's export manager.
--export-debug <preset_name> <path>
Similar to --export, but exports a debug version of the project, often including console output and debug symbols.
--editor
Forces the Godot editor to launch, even if a project path is provided or if the engine would normally run the project directly.
--quit
Exits the engine automatically after completing any specified tasks, such as exporting a project or running a script.
--headless
Starts the Godot engine in a headless mode, meaning it runs without a graphical interface. This is crucial for dedicated servers, automated tests, or CI/CD environments.
--verbose
Enables verbose logging output, providing more detailed information about the engine's operations, which can be useful for debugging.
DESCRIPTION
The godot command refers to the command-line interface for the Godot Engine, a free and open-source game engine renowned for its 2D and 3D game development capabilities. While Godot primarily features a graphical editor, its command-line tool is indispensable for various automated tasks, continuous integration (CI/CD) pipelines, and headless operations. Developers can use the command to run projects directly, export games for different platforms (e.g., Windows, macOS, Linux, Web, Android), launch the editor with specific settings, or perform batch operations without user interaction. It offers a powerful way to integrate game development workflows into scripting environments, enabling efficient project management and deployment.
CAVEATS
The availability and exact behavior of the godot command depend on whether the Godot Engine is installed on your system and its executable is accessible in the system's PATH. Command-line options can vary between different major and minor versions of the Godot Engine. It's primarily a specialized developer tool and not a general-purpose system utility.
RUNNING A PROJECT FROM THE CLI
To quickly test a Godot project without opening the editor, you can navigate to the project's root directory and simply type godot. Alternatively, you can specify the project path directly: godot --path /home/user/my_game_project. This is ideal for rapid iteration or running game servers.
AUTOMATED EXPORTS FOR CI/CD
The godot command-line export functionality is fundamental for continuous integration and continuous deployment pipelines. By running commands like godot --export 'Linux/X11' ./build/my_game.x86_64 --quit, developers can automate the build process, ensuring consistent and reproducible game releases without manual intervention.
HISTORY
Godot Engine was conceived by Juan Linietsky and Ariel Manzur in 2007 as an in-house engine for various game development projects. It was publicly released as open-source software under the MIT license in 2014, gaining significant traction due to its flexibility, feature set, and active community. The command-line interface has been a core component from early versions, continuously evolving to support more complex automation and integration needs as the engine matured.