Skip to main content

Unified GIMP automation tool for Hanzo AI (HIP-0300) — clean-room BSD-3 client for the GIMP PDB bridge

Project description

hanzo-tools-gimp

Unified GIMP automation tool for Hanzo AI (HIP-0300).

Drives GIMP 3.0 through the Hanzo GIMP bridge — a clean-room, BSD-3 GIMP plug-in (see hanzo/gimp-mcp) that exposes GIMP's Procedural Database (PDB) over a line-oriented JSON TCP socket. This package is the Python client for that bridge.

This is a clean-room implementation with no GPL lineage: both the bridge and this client use GIMP's documented, public PDB / GObject-Introspection API.

Install

pip install hanzo-tools-gimp

Prerequisites

The Hanzo GIMP bridge plug-in must be running inside GIMP. Briefly:

  1. Copy hanzo_gimp_bridge.py (from hanzo/gimp-mcp) into your GIMP 3.0 plug-ins directory (one folder per plug-in, script made executable).
  2. Start GIMP and run Filters → Hanzo → Start Hanzo Bridge.
  3. The bridge listens on 127.0.0.1:9876 by default (override with HANZO_GIMP_PORT / HANZO_GIMP_HOST).

See the gimp-mcp repo's README.md and PROTOCOL.md for full details.

Usage

from hanzo_tools.gimp import GimpTool, register_tools, TOOLS

# Register with a FastMCP server
register_tools(mcp_server)            # optional host=..., port=...

# Or use the tool directly
tool = GimpTool(host="127.0.0.1", port=9876)

The tool exposes the same action surface as the Hanzo MCP TypeScript gimp tool:

Action Params Result
version {bridge, gimp, protocol}
open path {image_id, width, height}
export image_id, path {image_id, path, saved}
pdb_call procedure, args the procedure's return value(s)
new_image width, height {image_id, width, height}
image_info image_id {image_id, width, height, ...}
list_procedures prefix? {count, procedures}
flatten image_id {image_id, layer_id}

Every action also accepts host / port overrides.

pdb_call is the generic escape hatch — it can invoke any PDB procedure, so anything GIMP can do is reachable.

License

BSD-3-Clause. Copyright (c) 2026 Hanzo AI.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hanzo_tools_gimp-1.0.0.tar.gz (6.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hanzo_tools_gimp-1.0.0-py3-none-any.whl (6.8 kB view details)

Uploaded Python 3

File details

Details for the file hanzo_tools_gimp-1.0.0.tar.gz.

File metadata

  • Download URL: hanzo_tools_gimp-1.0.0.tar.gz
  • Upload date:
  • Size: 6.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.25 {"installer":{"name":"uv","version":"0.11.25","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for hanzo_tools_gimp-1.0.0.tar.gz
Algorithm Hash digest
SHA256 f587d42c753ff50e101c268f9c525981d423a953390c4f19ecf241449d0983e9
MD5 93e0346434f0429e289da9c276505cd9
BLAKE2b-256 784f3e297ebbd7ab10fbefec455a6aeed5d2c9503b8bdc912ab48c0fda4cd7ae

See more details on using hashes here.

File details

Details for the file hanzo_tools_gimp-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: hanzo_tools_gimp-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 6.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.25 {"installer":{"name":"uv","version":"0.11.25","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for hanzo_tools_gimp-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 61218e23c644e46ff5723f01f6d6eb05a9e91c260bed21f9c147f1d4113a52c6
MD5 351f452557f5bc5be244bf2770e2afb0
BLAKE2b-256 8cc8f113d10224bdf9bfa247fbd91a54f69c84349528482beab771d9471abc5a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page