Skip to main content

Leafish

License: MIT

A pure Python, asynchronous Minecraft Java Edition bot framework inspired by Mineflayer.

Leafish lets you programmatically control Minecraft Java Edition clients from Python: join servers, chat, move, mine, build, craft, fight, and automate — all through a modern asyncio API with an event-driven architecture.

Features (planned / in progress)

See IMPLEMENTATION_STATUS.md for the honest, current state of every subsystem.

  • Native Minecraft Java Edition protocol implementation (no Node.js, no external bot process)
  • Offline and Microsoft authentication
  • Async, event-driven API with plugin support
  • World, chunk, entity, and inventory tracking
  • Pathfinding, digging, placing, crafting, combat, containers
  • Multi-version protocol support driven by vendored minecraft-data

Requirements

  • Python 3.11+

Installation

pip install leafish

For development:

git clone https://github.com/leafish/leafish
cd leafish
pip install -e ".[dev]"

Quick start

import asyncio
from leafish import Leafish

async def main():
    bot = await Leafish.create_bot(
        host="localhost",
        port=25565,
        username="Leafish",
        auth="offline",
    )

    @bot.on("spawn")
    async def on_spawn():
        print("Leafish joined the world!")

    @bot.on("chat")
    async def on_chat(username, message):
        print(f"<{username}> {message}")

    await bot.wait_until_disconnected()

asyncio.run(main())

Status

Leafish is under active development. The protocol layer, bot API, world model, and automation modules are implemented incrementally — check ROADMAP.md and IMPLEMENTATION_STATUS.md for details. Features are not advertised until they are implemented and tested.

License

MIT — see LICENSE.

Metadata

Release files for leafish 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for leafish 0.1.0
File Size Uploaded Provenance Actions
leafish-0.1.0.tar.gz 802.1 kB Without provenance Details for leafish-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for leafish 0.1.0
File Interpreter ABI Platform Actions
leafish-0.1.0-py3-none-any.whl Python 3 none any Details for leafish-0.1.0-py3-none-any.whl

Total release size: 1.6 MB

Release files / leafish-0.1.0.tar.gz

Download URL leafish-0.1.0.tar.gz
Size 802.1 kB
Tags Source
SHA-256 checksum
How to use checksums
39774f91300c0228748aa8049bc406620f2069cdd851a31559fe47fceb070ef0
BLAKE2b-256 checksum
How to use checksums
44640f698dc6e19601cf00dd0d6b3933b5a97979ce0e4b42e1645d0e579b7434
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release files / leafish-0.1.0-py3-none-any.whl

Download URL leafish-0.1.0-py3-none-any.whl
Size 814.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6f81946803cf7b8c03a6b1995f12c943159dc1a5cfa521452478890e5334502b
BLAKE2b-256 checksum
How to use checksums
c784cff4c87a3580b7963d74bdecc01e4a58bb90c4b96af11c388dd4e81c875d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Security for leafish 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page