Skip to content

turner/panodisplay

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

panodisplay

A custom slash command for Claude Code that displays equirectangular panorama images as interactive 360-degree spherical viewers in your browser.

Type /panodisplay myimage.png and Claude will spin up a local viewer using Pannellum — no installs, no config, no leftover files.

What it looks like

Once launched, you get a full-screen interactive panorama in your browser. Click and drag to look around, scroll to zoom.

Requirements

  • Claude Code (CLI, desktop app, or IDE extension)
  • Python 3 (used to run a lightweight local HTTP server)
  • A modern web browser

Image requirements

The panorama image should be in equirectangular projection with a 2:1 aspect ratio (e.g. 8000x4000, 4096x2048). This is the standard format produced by 360-degree cameras and panorama stitching software. Common file formats: PNG, JPG, TIFF.

If your image is not in equirectangular format (e.g. it's a set of cube faces or a partial panorama), you'll need to convert it first using tools like Hugin, PTGui, or similar panorama software.

Installation

Copy panodisplay.md into your Claude Code commands directory:

# Create the commands directory if it doesn't exist
mkdir -p ~/.claude/commands

# Copy the command file
cp panodisplay.md ~/.claude/commands/

That's it. The /panodisplay command is now available in all your Claude Code sessions.

Alternative: project-scoped installation

If you only want the command available within a specific project, copy it into that project's .claude/commands/ directory instead:

mkdir -p /path/to/your/project/.claude/commands
cp panodisplay.md /path/to/your/project/.claude/commands/

Usage

In any Claude Code session, run:

/panodisplay your-panorama.png

Claude will:

  1. Clean up any previous viewer instances
  2. Create a temporary directory with the HTML viewer
  3. Symlink your image into it
  4. Start a local HTTP server on port 8765
  5. Open the viewer in your default browser

Examples

/panodisplay beach-sunset.jpg
/panodisplay /Users/me/Photos/panoramas/mountain-view.png
/panodisplay ../stitched-output/result.jpg

You can pass a filename in the current directory or a relative/absolute path.

How it works

The command creates a minimal HTML page that loads Pannellum (an open-source panorama viewer) from a CDN. It symlinks your image into a temporary directory under /tmp/pano_viewer_*/ and serves it with Python's built-in HTTP server. Everything is ephemeral — the temp directory and server are cleaned up each time you run the command.

No files are created in your project directory.

Troubleshooting

Port 8765 is already in use: The command automatically kills previous instances, but if something else is using that port, free it with:

kill $(lsof -i :8765 -t)

Image doesn't load: Make sure the file path is correct and the image is a valid equirectangular panorama with a 2:1 aspect ratio.

Browser doesn't open: The command uses open (macOS). On Linux, you may need to edit the command to use xdg-open instead.

License

MIT

About

A Claude Code slash command for viewing equirectangular 360-degree panoramas in the browser

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors