← Catalog

@ghosthvj/gentle-canvas-lan

Fixed LAN endpoint for the Gentle Design canvas: guarded proxy, stable short link and copyable URLs for the Pi coding agent.

Extension

Install

Install with PiG

pig install npm:@ghosthvj/gentle-canvas-lan

Install with Pi

pi install npm:@ghosthvj/gentle-canvas-lan
Review before installing

Packages run code with your permissions and influence agent behavior. Catalog inclusion is not a security audit. Review the source before installing a third-party package.

Pi manifest JSON

The pi field of package.json.

{
  "extensions": [
    "./extensions/canvas-lan.js"
  ]
}

README

Written by the package's publisher, shown as published in version 0.1.2 (README.md). PiG does not review it.

Gentle Canvas LAN

Open the Gentle Design canvas from your phone or laptop on the same network while Gentle Shell runs on a headless machine. No tunnels, no Tailscale, one stable address.

The Canvas LAN card in the Gentle Shell sidebar

What it does

  • Keeps one fixed LAN address for a canvas whose real port and token change every time you reopen it.
  • Shows a short, stable link (http://LAN_IP:PORT/s/<16-hex>) in the sidebar card that redirects to the current canvas. The full tokenized URL is still printed by /canvas-lan:status and in tool output.
  • Proxies the canvas over the LAN with guarded upstream forwarding: exact Host/Origin rules, token paths, SSE streaming, and no forwarded-header trust.
  • Never advertises a dead link. The registration is probed before a link is shown; a canvas that stopped answering is revoked.
  • Explains an empty port. With nothing live, a request shows a short page saying the canvas is not running instead of a bare Bad Gateway.

Requirements

  • Gentle Shell (gentle-pi) and Node.js 22+.
  • Gentle Design running in that session — the canvas it serves locally is what gets exposed.
  • The other device on the same trusted network.

Install

pi install npm:@ghosthvj/gentle-canvas-lan

From a git checkout instead:

pi install git:github.com/ghosthvj/gentle-canvas-lan

To try it once without touching your settings: pi -e npm:@ghosthvj/gentle-canvas-lan.

Configure

Run /canvas-lan:setup.

The Canvas LAN setup modal with IP, port and public origin fields

It writes ~/.config/gentle-canvas-lan/config.json (mode 0600, atomic replace) and rebuilds the proxy. The two optional caps can also be saved there as plain JSON keys, e.g. { "ip": "192.168.1.20", "port": "34316", "maxBodyBytes": "10485760" }.

SettingEnvironment variableNotes
Bind IPGENTLE_CANVAS_LAN_IPRequired. A concrete IPv4/IPv6 address of this host, never 0.0.0.0, :: or a hostname.
PortGENTLE_CANVAS_LAN_PORTDefaults to 34316.
Public originGENTLE_CANVAS_LAN_PUBLIC_ORIGINOptional exact http(s)://host[:port] origin when a reverse proxy terminates TLS.
Max body sizeGENTLE_CANVAS_LAN_MAX_BODY_BYTESOptional cap in bytes for request bodies forwarded to the canvas. Defaults to 52428800 (50 MB).
Max connectionsGENTLE_CANVAS_LAN_MAX_CONNECTIONSOptional cap on concurrent client connections. Defaults to 64.

Environment variables win per key over saved values.

Commands

CommandWhat it does
/canvas-lan:setupConfigure the bind IP, port and optional public origin.
/canvas-lan:startEnable the listener. The card appears only while the registered canvas answers.
/canvas-lan:statusShow the effective IP and port with their source (env/saved), the listener state and the current LAN link.
/canvas-lan:stopStop listening and disable automatic start until you start it again.

In the TUI, command results and errors stay in the transcript instead of the one-line status slot that the next notification would replace.

Troubleshooting

  • The browser shows "Gentle Design canvas is not running". The port is still reserved but the local canvas stopped. Open a design in Gentle Shell and reload the page.
  • No card, and status says the proxy is running with no URL. There is no live canvas registration yet; opening a design registers it and starts the listener.
  • Port already in use. Pick another port in /canvas-lan:setup; a conflict is reported without killing the other process.

Security

Traffic is plain HTTP and there is no authentication. Tokenized URLs and the short link are capabilities: anyone on your network who has one can view the canvas and send comments to the agent. Use it only on a trusted network, never forward the port to the internet, and stop the listener when you are done.

Docs

Configuration · Public origin trust · Proxy · Controller · Sidebar adapter · Card · Changelog

License

MIT. See LICENSE and THIRD_PARTY_NOTICES.md for the upstream attribution.

Built with Gentle-AI