h hopperCode

Install

Install hoppercode as a Pi extension, or clone the repo to develop on it.

Install via Pi

terminal
pi install npm:hopper-pi

The postinstall script builds the C# plugin and copies it into your Grasshopper Libraries/hopper-pi/ folder.

  • Restart Rhino / Grasshopper.
  • On the canvas, add the Hopper Code Backend component (GHZMQ, under Params → Util).
  • Start Pi and talk to the agent about Grasshopper or Rhino — the extension registers gh_* and rh_* tools automatically.

Clone and develop

terminal
git clone https://github.com/tsoumdoa/hoppercode.git
cd hoppercode
pnpm install          # builds & installs the GH plugin unless skipped
pnpm run pi           # run Pi with this extension loaded

Skip the plugin build

When you are iterating on TypeScript only, you can skip the (slower) C# plugin build step entirely.

terminal
export HOPPER_SKIP_GH_PLUGIN=1
pnpm install
pnpm run dev

Rebuild or reinstall the plugin manually

After a git pull that changes the C# plugin, or whenever the installed .gha seems stale, force a full rebuild and copy.

terminal
pnpm run build:gh-plugin
# or force a full rebuild + copy:
node scripts/install-grasshopper-plugin.mjs --force
If the plugin did not install, install the .NET 7 SDK, then run pnpm run build:gh-plugin. On Windows, set HOPPER_GH_LIBRARIES if auto-detect of the Libraries path fails.