To update the script class cache:
godot --headless --quit project.godot
Run GDScript:
# Or just -s instead of --script
godot --headless --quit --script gddemo/main.gd
Or for a SceneTree with internal quit:
godot --headless -s gddemo/main.gd
Run Python with:
python -m pydemo