Stagepass

Features

Everything between your editor and the live site.

A local SSL proxy, a small loader and optional modules. Each part does one job and stays out of the way of your visitors.

loader 2.3.0modules 2.2.0cli 2.2.1MIT

Zero config SSL

Local .sp domains with trusted certificates. No manual certificate setup.

Smart injection

Swaps production scripts and styles for local versions, only when you ask for it.

CSS and JS

Works with scripts and stylesheets, tagged with data-src or data-href.

Intelligent loading

Scripts load with defer, so the page parses without blocking.

Auto path detection

Without data-stagepass-path, the filename comes from the production URL.

Debug mode

Logging only, no swapping. Inspect what would happen first.

Console suppression

Stagepass logs stay silent in production when no session is active.

Modular

A small core loader. Injector, cookies and maintenance come as optional modules.

Programmatic API

Reach the runtime as sp, stagepass or window.stagepass.

Lean

Caddy and native Node.js. No Docker, no heavy containers.

Works with your build

Vite or Webpack output, and legacy PHP setups.

Security first

Origin whitelist for .sp and localhost. Production URLs without a session.

Runtime API

Know where your code runs.

The loader exposes session state, client info and a logger that stays quiet for visitors.

  • sp.vars isLocal, env, domain, timestamp, version and client.
  • sp.resolveLocalUrl() builds URLs to your local files.
  • sp.log, sp.warn, sp.error print only during a session.
app.js
sp.vars.isLocal      // true while a session is on
sp.vars.domain       // "my-project.sp"
sp.vars.client.theme // live updates for theme and viewport

const url = sp.resolveLocalUrl("js/app.js")
sp.log("ready")      // silent in production

Version pinning

Nothing changes until you say so.

Reproducible

Every environment loads the same major version.

No breaking changes in v2

The major pin @2 gets fixes and features, never a breaking change.

Exact pins if you want

Pin an exact version or host the files yourself for full control.

Deliberate updates

Read the changelog, then bump the version.

Head Code
<script src="https://cdn.jsdelivr.net/npm/@stagepass/loader@2/dist/loader.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@stagepass/modules@2/dist/all.min.js"></script>

Good to know

Before you install.

Requirements

macOS, Node.js 18+ and Homebrew. Windows and Linux are not supported yet.

For coding agents

AGENTS.LOADER.md and AGENTS.MODULES.md in the repo describe the loader and modules for coding agents. See the docs.

Open source

MIT licensed. Issues and pull requests are welcome on GitHub.