nodebpy

| nodebpy | Blender 5.2 | Blender 5.3 |
|---|
530 (main) |  |  |
520 (5.2) |  |  |
Build node trees in Blender more elegantly with Python code. Geometry Nodes, Shader Nodes and Compositor nodes are all fully supported, with type hints and IDE auto-completion throughout.
pip install nodebpy
A text-based version of nodes should bring the convenience of writing code with IDE auto-completion, type hinting, with overall compactness and readability, while staying as close as possible to what building a node tree via the GUI feels like.
from nodebpy import geometry as g
with g.tree("AnotherTree", collapse=True, is_modifier=True) as tree:
rot = (
g.RandomValue.vector(min=-1, seed=2)
>> g.AlignRotationToVector()
>> g.RotateRotation(rotate_by=g.AxisAngleToRotation(angle=0.3))
)
pos = g.Position() * 2.0 + (0, 0.2, 0.3)
(
tree.inputs.integer("Count", 10)
>> g.Points(position=g.RandomValue.vector(min=-1))
>> g.InstanceOnPoints(instance=g.Cube(), rotation=rot)
>> g.SetPosition(position=pos, offset=(0, 0, 0.1))
>> g.RealizeInstances()
>> g.InstanceOnPoints(g.Cube(), instance=...)
>> tree.outputs.geometry("Instances")
)

- Every node is a typed class named after the node it creates — 'Random Value' becomes
g.RandomValue() — and node subtypes are class methods: g.RandomValue.vector().
- Trees are built inside a
with g.tree(...): context; instantiating a node class adds it to the current tree, and the tree's interface is declared with tree.inputs.* / tree.outputs.*.
- Nodes are linked with the
>> operator, which picks the most compatible socket pair automatically (much like Node Wrangler's Alt + Right Click drag) — or address sockets explicitly through the .i.* / .o.* accessors.
- Python's arithmetic, comparison and boolean operators create the matching
Math / VectorMath / Compare / BooleanMath nodes: g.Value(1.0) * 2 + (0, 0, 1).
- Existing node trees — including ones wired up by hand in the GUI — can be exported back to
nodebpy source with to_python().
Agent skill
nodebpy ships an Agent Skill that teaches AI coding agents to
write, check and port node trees with it. Install it into any skills-aware agent
(Claude Code, Codex, Cursor, Copilot, OpenCode and others) from the repository:
npx skills add BradyAJohnston/nodebpy
Claude Code can also take it as a plugin (/plugin marketplace add BradyAJohnston/nodebpy,
then /plugin install nodebpy@nodebpy), and the installed package carries the same
skill, matched to its version: nodebpy skill install copies it into ~/.claude/skills
and nodebpy skill path prints where it is. nodebpy lookup search|show|socket is the
lookup the skill uses to find classes, sockets and options.
Documentation
Guides and the full node reference live at bradyajohnston.github.io/nodebpy: