Host your Minecraft server on BisectHosting - get 25% off your first month with code MODRINTH.

Minescript is a platform for controlling and interacting with Minecraft using scripts written in the Python programming language.

Join the Minescript Discord Server for announcements and to engage with the Minescript community.

Check out Minescript documentation for details about commands and APIs.

Download Python scripts developed for use with Minescript.

Setup

  1. Download and install the Minescript mod for either Fabric (requires Fabric API) or Forge.

  2. Download and install Python 3 if you don't already have it: https://www.python.org/downloads/ (or from the Microsoft Store on Windows)

  3. Run Minecraft with the Minescript mod installed. The first time the Minescript mod runs, it will automatically create a minescript folder inside the minecraft folder.

  4. Create Python scripts in the minescript folder.

  5. Run Python scripts from the Minecraft in-game chat by entering backslash ("\") followed by the script name without the ".py" extension.

Minescript expects Python to be installed at the following location:

  • on Windows: %userprofile%\AppData\Local\Microsoft\WindowsApps\python3.exe
  • on Mac, Linux, etc: /usr/bin/python3

If Python is installed somewhere else on your system, you can point Minescript at it by changing the python variable in the file config.txt in the minescript folder.

Example

See this example script that demonstrates how to access the player's coordinates, read blocks at a given location, and create blocks like signs with custom text all from a Python script.

Compatibility Tested on the following platforms:

  • Fabric mod loader with Fabric API
  • Forge mod loader
  • Python 3.7 through 3.10
  • macOS up to Monterey (x86 and Apple Silicon)
  • Linux (Pop!_OS 22.04 x86_64)
  • Windows 10 and 11 (x86)

External resources



Project members

maxuser

Owner


Technical information

Client side
required
Server side
unsupported
Project ID