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.1

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.1
File Size Uploaded Provenance Actions
leafish-0.1.1.tar.gz 4.0 MB Without provenance Details for leafish-0.1.1.tar.gz

Built distribution (wheel)

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

Total release size: 8.1 MB

Release files / leafish-0.1.1.tar.gz

Download URL leafish-0.1.1.tar.gz
Size 4.0 MB
Tags Source
SHA-256 checksum
How to use checksums
091b120676e304eeefb0217cf2a7bf9cc989c338cc6ef2aebc3ba26ec629f58b
BLAKE2b-256 checksum
How to use checksums
a7b16318cad305437b21ff89c9b9cd10ed41664be9592e1fef00c7cecea18f24
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.1-py3-none-any.whl

Download URL leafish-0.1.1-py3-none-any.whl
Size 4.1 MB
Tags Python 3
SHA-256 checksum
How to use checksums
7b21c1f75f63642933e655aa7777ae4d56db8e8d52b90efd6ce0d3cff3be3ee4
BLAKE2b-256 checksum
How to use checksums
3d80e8764d7663e0f87350600a82c9cedd71bfecb2edf129dbfbb3428f547681
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.1

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.

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