English | 简体中文
A Python-based development tool for the Dora SSR game engine that supports TypeScript, Rust, and Wa workflows from one CLI.
This tool provides a streamlined workflow for Dora SSR projects. It handles TypeScript API generation and compilation, plus Rust and Wa WASM build/upload/run flows through one command-line interface.
- Dora SSR Game Engine: Must be running locally on your machine
- Web IDE: The Dora SSR Web IDE must be open and running in the background
- uv: Recommended for installing and running the CLI as a tool
-
Start the Dora SSR Game Engine
- Launch the Dora SSR game engine on your local machine
- Ensure it's running and accessible
-
Open the Web IDE
- Open the Dora SSR Web IDE in your browser
- Keep it running in the background during development
- The Web IDE provides the development environment and handles the TypeScript compilation
-
Install the CLI
uv tool install Dora-SSR/Tools/dora-cli
Or run it without installing:
uvx --from Tools/dora-cli dora --help
The tool supports the following command groups:
dora ts: TypeScript project initialization, build, and rundora rust: Rust WASM build/upload/run helpersdora wa: Wa WASM build/upload/run helpersdora stop: Stop the currently running Dora SSR target
Initialize a project:
dora ts init [options]Build a project:
dora ts buildRun a project:
dora ts runBuild and run:
dora ts buildrunStop:
dora stopBuild a Rust WASM project:
dora rust buildBuild, upload, and run it in Dora SSR:
dora rust run Hello --host 192.168.3.1Hello is the destination folder name in the Dora SSR resource tree. The generated .wasm file will be uploaded there and run from that location.
Upload the latest built .wasm without rebuilding:
dora rust upload Hello --host 192.168.3.1Build a Wa project:
dora wa buildBuild, upload, and run it in Dora SSR:
dora wa run Hello --host 192.168.3.1Hello is the destination folder name in the Dora SSR resource tree. The generated .wasm file will be uploaded there and run from that location.
Upload the latest built .wasm without rebuilding:
dora wa upload Hello --host 192.168.3.1Sets up a new TypeScript project with all necessary API definitions.
dora ts init [options]Options:
-l, --language: API language for initialization (zh-Hans|en, default: zh-Hans)
Example:
dora ts init -l enCompiles the TypeScript project and reports compilation status.
dora ts buildOptions:
-f, --file: File or directory to build (optional, default: current directory)-p, --project: Project directory (optional, default: current directory)
Starts the project in the Dora SSR engine.
dora ts runCompiles the TypeScript project and then immediately starts it in the Dora SSR engine. This is a convenience command that combines build and run in sequence.
dora ts buildrunOptions:
-f, --file: File or directory to build (optional, default: current directory)--entry: Lua entry file used for running (optional, default:init.lua)
Example:
# If you specify a target file, only the target file will be built, not the entire project. Then the project will be run from the init program entry.
# This allows faster building and running when the project is large.
dora ts buildrun -f src/module.ts-p, --project: Explicit project directory. This makes the tool usable from anywhere, which is important when installed throughuv tool.--host: Dora SSR host (default:127.0.0.1)--port: Dora SSR port (default:8866)--timeout: HTTP timeout in seconds
Command-specific options:
init:-l, --languagebuild:-f, --filerun:--entrybuildrun:-f, --file,--entry
These can also be configured with environment variables:
export DORA_PROJECT=/path/to/my-game
export DORA_HOST=127.0.0.1
export DORA_PORT=8866
export DORA_TIMEOUT=10You can inspect command-specific help with:
dora ts build --help
dora rust run --help-
Initialize your project:
dora ts init
-
Write TypeScript code in your project directory. Your project should at least have a
init.ts(orinit.tsx) file. -
Build your project:
dora ts build
-
Run your project:
dora ts run
Or use buildrun to build and run in one step:
dora ts buildrun
-
Iterate: Make changes, rebuild, and run again
-
Stop when done running:
dora stop
-
Build your Rust WASM project:
dora rust build
-
Build, upload and run it in Dora SSR:
dora rust run Hello --host 192.168.3.1
Hellois the destination folder name in the Dora SSR resource tree. -
Upload without rebuilding when needed:
dora rust upload Hello --host 192.168.3.1
-
Stop when done running:
dora stop
-
Build your Wa project:
dora wa build
-
Build, upload and run it in Dora SSR:
dora wa run Hello --host 192.168.3.1
Hellois the destination folder name in the Dora SSR resource tree. -
Upload without rebuilding when needed:
dora wa upload Hello --host 192.168.3.1
-
Stop when done running:
dora stop
After initialization, your project will have the following structure:
my-game/
├── API/ # Generated TypeScript API definitions
│ ├── Dora.d.ts
│ ├── Platformer.d.ts
│ ├── UI/
│ └── ...
├── tsconfig.json # TypeScript configuration
├── init.ts # Your TypeScript entry
└── init.lua # Generated Lua entry after build
The CLI itself can live anywhere once installed with uv tool. It now operates on the current working directory by default instead of the tool's own installation directory.
The tool supports two API languages:
- zh-Hans: Chinese (Simplified) API documentation
- en: English API documentation
Choose your preferred language during initialization using the -l flag.
- Connection Refused: Ensure the Dora SSR engine is running and the Web IDE is open
- Port 8866 Unavailable: Check if the engine's running port is available
- Command Not Responding: Verify the Web IDE is running
- Compilation Errors: Check your TypeScript code for syntax errors
Copyright (c) 2016-2026 Li Jin dragon-fly@qq.com
This software is provided under the MIT License. See the license header in dora.py for full details.
For issues and questions related to the Dora SSR engine, please refer to the Dora SSR documentation and community resources.