Skip to content

Getting Started

  1. Download the editor based on your OS and select an JS engine (we recommend v8 for a start) and unzip it
  2. Rename the downloaded file based on your OS:
  3. Linux: godot.linuxbsd.editor.x86_64 ➡️ godot
  4. MacOS: no rename required
  5. Windows: godot.windows.editor.x86_64.exe ➡️ godot.exe
  6. Add Godot to your PATH
  7. Linux: /usr/local/bin
  8. MacOS: echo ~/your-path/Godot.app/Contents/MacOS|sudo tee /etc/paths.d/godot;bash -l;echo $PATH
  9. Windows: setx /M path "%path%;C:\your-path\windows-editor-v8"
  10. Open a terminal
  11. Test if you can use Godot via terminal and run:
godot --version

Note: The Godot.app isn't signed for MacOS you need to allow to open it.

Create a new project

Automatically with godot-ts

  1. Run npx -y @godot-js/godot-ts init (new project will be crated at your current terminal path)
  2. Follow the prompts
  3. Run cd <your-project>
  4. Run npm i
  5. Run npm run dev - this will enable typescript watch mode and opens the editor
  6. Inside the editor install preset files via Project > Tools > GodotJS > Install Preset files
  7. Click OK to confirm a list of files will be generated in the project.
  8. Attach the example.ts script to a node and run the project

Manually

  1. Run godot -p and create a new project
  2. Inside the editor install preset files via Project > Tools > GodotJS > Install Preset files
  3. Click OK to confirm a list of files will be generated in the project.
  4. Run cd <your-project>
  5. Run npm i
  6. Run npx tsc to compile the typescript files

Install Preset Files

Install Presets

Prompt

Create Scripts

To create new scripts, press select GodotJSScript as language:

Select Language

Use the Node: Node.Ts template:

Create a Script

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

Type Hint

Compile TypeScript Sources without godot-ts

Before your scripts runnable in Godot, run tsc to compile typescript sources into javascript.

npx tsc

# or watch if you want
npx tsc -w

Also, you can simply click the tool button on GodotJS bottom panel in the godot editor. It'll do the same thing for you.

TSC Watch