Перейти к содержанию
SoulFire LogoSoulFire

SDK versions and installation

Install the released TypeScript and Python SDKs with their matching runtimes.

Это руководство доступно только на английском.

The examples use SoulFire SDK 2.10.8. The TypeScript SDK requires Effect v4. The Python SDK requires CPython 3.14 or newer and uses effect-py.

Install the TypeScript SDK

Create an application with Bun:

mkdir soulfire-tutorial
cd soulfire-tutorial
bun init -y
bun add @soulfiremc/sdk@2.10.8 effect@^4

For Node.js 22 or newer, create an ES module project and install the Node runtime too. The examples use top-level await, which needs "type": "module":

mkdir soulfire-tutorial
cd soulfire-tutorial
npm init -y
npm pkg set type=module
npm install @soulfiremc/sdk@2.10.8 effect@^4 @effect/platform-node@^4
npm install --save-dev tsx

Choose the entry point for your application:

RuntimeImportManaged local server
Bun@soulfiremc/sdk/bunYes
Node.js 22+@soulfiremc/sdk/nodeYes
Browser@soulfiremc/sdk/browserNo
Workers, Deno, or custom transport@soulfiremc/sdkNo

A managed local server means the SDK can download and start SoulFire for you. The other entry points connect to a SoulFire server that is already running. See the TypeScript runtime guide to supply your own HTTP client.

Continue with your first TypeScript program.

Install the Python SDK

Create a virtual environment with CPython 3.14 or newer:

mkdir soulfire-python-tutorial
cd soulfire-python-tutorial
python3.14 -m venv .venv
.venv/bin/python -m pip install soulfire==2.10.8

On Windows, use py -3.14 -m venv .venv and .venv\Scripts\python for the remaining commands. The SDK also installs effect-python==0.1.0a2, which you import as effect_py. Do not upgrade it separately.

Continue with your first Python program.

Choose a SoulFire server

For a local script, SoulFire.createBot or Python SoulFire.create_bot downloads SoulFire and Java when needed. It creates or reuses the instance and account, starts the bot, and waits for its initial player snapshot. The tutorials pin the managed SoulFire server with installation.version or Python installation={"version": "2.10.8"}. Without a version, managed installation selects the latest release.

For an existing SoulFire server, use SoulFire.connect with its API URL and token. The handshake checks API versions, capabilities, and required plugins. Named instance provisioning requires the instance.provisioning.v1 capability. See named setup and existing bots.

Check the installed version

TypeScript:

bun pm ls

Python:

.venv/bin/python -c "from importlib.metadata import version; print(version('soulfire'))"

Expect SDK version 2.10.8. A matching version label alone does not prove SoulFire server compatibility. The SoulFire server must also pass the connection handshake.

Migrate older applications

The TypeScript high-level API uses Effect operations, streams, and scopes. Compose calls with yield* inside Effect.gen and run the complete workflow once at the application boundary. Use Effect v4 imports such as effect/http/FetchHttpClient instead of Effect v3 platform modules.

The Python high-level API uses lazy effects instead of the older async/sync client API. Compose calls with yield from inside @gen or @fn. Run the workflow with run_async(scoped(program).or_die()) at the application boundary. Stream callbacks return effects; consumers use run_for_each, run_collect, or other effect-based operations. Generated protocol clients remain available for direct transport integration. Read the TypeScript runtime and Python runtime guides for details.

Which version each page describes

Different parts of this site follow different SoulFire versions. Compare the version with your SoulFire server before you copy an example.

ContentVersionWhy
SDK guides, recipes, and tutorials2.10.8The examples are tested against this release
Node reference2.10.8 sourceGenerated from the same revision
HTTP API reference2.11.0Generated from the development branch, which is ahead of the latest release
App labels in the guidesAfter 2.10.7The guides use the updated names. Each page names the earlier label.
Plugin template2.10.1The first-plugin guide explains how to align it

A newer SoulFire server can add or rename a field that an older page does not show. The connected server is the authority for its own commands, nodes, and capabilities.

Source and generated reference

The documentation uses the 2.10.8 release source. The node reference links to that revision. The TypeScript API and Python API show their SDK version and source. The HTTP schema reports its own version and covers unary JSON operations. The connected SoulFire server's metadata and node palette describe its installed capabilities.

For SDK development, clone the same revision, run bun install --frozen-lockfile, and build from sdk/typescript. For a Python source install, use:

.venv/bin/python -m pip install "soulfire @ git+https://github.com/soulfiremc-com/SoulFire.git@eb2b29fb0a4190d759135270a63344d53fdcf819#subdirectory=sdk/python"

Последнее обновление:

Полезна ли эта страница?