DEDUPED Hot AI repos, turned into use cases Get 5 a day

How to preview a static site on localhost with Pixelcrabs

Serve a static site folder on a localhost URL with one command and stop it with Ctrl+C.

Who it is forA web designer or developer who has a plain HTML site folder and wants to see it running locally without building a framework setup.

The problemOpening HTML files directly from disk often breaks relative links and does not mirror how the site will be served.

The outcomeThe site loads at a localhost URL printed in the terminal, and the user can stop the preview cleanly.

What you need first

  • A computer with Node.js 24 or later installed
  • Bun 1.3.14 installed, for the pinned OpenCode engine
  • A local copy of the johnzhaors-bit/pixelcrabs repository
  • A static site folder containing index.html, or a project directory to point OpenCode at

Steps

  1. Download or clone the Pixelcrabs repository and open a terminal in its root folder.
  2. Confirm Node.js 24 or later is installed.
  3. Run node packages/local-runtime/bin/static-preview.mjs /absolute/path/to/your/site
  4. Open the localhost URL printed in the terminal.
  5. Press Ctrl+C in the terminal to stop the preview.

Prompt for your agent

In the pixelcrabs repository root, run `node packages/local-runtime/bin/static-preview.mjs <absolute-path-to-site>`. Expected output: a localhost URL printed in the terminal. Verify first that the target folder contains index.html before starting the server.

Caveat. The README says this preview is for trusted static sites only, and framework projects such as React, Vue, Next.js, Nuxt and Astro should use their own development server.

Share: X LinkedIn Hacker News Email Copy link

Disclaimer

Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked "Seen in the wild", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email [email protected] and we will look at it promptly. Full disclaimer page