Getting Started
- Download the
editorbased on your OS and select an JS engine (we recommendv8for a start) and unzip it - Rename the downloaded file based on your OS:
- Linux:
godot.linuxbsd.editor.x86_64➡️godot - MacOS: no rename required
- Windows:
godot.windows.editor.x86_64.exe➡️godot.exe - Add Godot to your PATH
- Linux:
/usr/local/bin - MacOS:
echo ~/your-path/Godot.app/Contents/MacOS|sudo tee /etc/paths.d/godot;bash -l;echo $PATH - Windows:
setx /M path "%path%;C:\your-path\windows-editor-v8" - Open a terminal
- Test if you can use Godot via terminal and run:
Note: The
Godot.appisn't signed for MacOS you need to allow to open it.
Create a new project
Automatically with godot-ts
- Run
npx -y @godot-js/godot-ts init(new project will be crated at your current terminal path) - Follow the prompts
- Run
cd <your-project> - Run
npm i - Run
npm run dev- this will enable typescript watch mode and opens the editor - Inside the editor install preset files via
Project > Tools > GodotJS > Install Preset files - Click
OKto confirm a list of files will be generated in the project. - Attach the
example.tsscript to a node and run the project
Manually
- Run
godot -pand create a new project - Inside the editor install preset files via
Project > Tools > GodotJS > Install Preset files - Click
OKto confirm a list of files will be generated in the project. - Run
cd <your-project> - Run
npm i - Run
npx tscto compile the typescript files
Install Preset Files


Create Scripts
To create new scripts, press select GodotJSScript as language:

Use the Node: Node.Ts template:

Open the project folder in you IDE, you should see full TypeScript support!

Compile TypeScript Sources without godot-ts
Before your scripts runnable in Godot, run tsc to compile typescript sources into javascript.
Also, you can simply click the tool button on GodotJS bottom panel in the godot editor. It'll do the same thing for you.
