Stagepass

Guide

Move an Existing Project to Stagepass

Two short ways to bring existing Webflow custom code into Stagepass, by hand or with the help of an AI editor.

Checked against loader 2.5.2 CLI 2.7.0 macOS
Custom JavaScript and CSS move from an intact website into a structured local workspace through a Stagepass session.
On this page

1. Start fresh and migrate by hand

Set the project up empty, in parallel, on your system. Run stagepass new in a new folder (the CLI docs list the options), then copy one feature at a time into src/. Leave production online while you do it.

2. Make a backup and use your AI editor

Make a backup, open the AI IDE you already trust, and work through these five steps.

  1. Back up what you have. Save a copy of your current Custom Code, or commit the project in Git, or both. If something goes wrong, you should be able to restore the previous tags without rebuilding the whole site.

  2. Add the Stagepass scaffold. In the project folder, run stagepass new my-project --dir . (use a DNS-safe name). This writes the scaffold beside the code you already have and never overwrites files that are already there. If it reports a conflict, stop and merge by hand. Use stagepass upgrade only if the folder already has a package.json and this is already a Stagepass project. If you are not sure, ask your editor to check before it runs a command.

  3. Move one feature into src/. Pick something small and self-contained, such as a menu or a form helper. Ask your editor: Move this one feature into the Stagepass scaffold (src/, then the compiled files in dist/). Keep the same selectors, globals and behavior. Use only the Stagepass APIs listed in AGENTS.md and stagepass.json. Do not change Webflow production tags or add secrets.

  4. Build. Run npm install if you have not already, then stagepass build. You should get compiled files in dist/, typically dist/main.js and dist/styles.css.

  5. Connect the loader. Add the Stagepass loader in Webflow (Project Settings, Custom Code, Head Code), tag the compiled file you are migrating, run stagepass setup and stagepass start once on your Mac, link the project, and open your live URL with ?stagepass=my-project.sp. The getting started docs have the snippets. Visitors without a session still see the production files.

To keep working live, run stagepass watch.

Reload the live URL with your session to see the result.

More detail: CLI reference, Where do I put my files?.

Frequently asked questions

Does stagepass new import my Webflow site?

No. stagepass new creates a scaffold. Your Webflow site stays in Webflow. What you bring over is your custom JavaScript and CSS, one feature at a time.

Will stagepass new overwrite my existing code?

No. With stagepass new my-project --dir . the scaffold goes beside your code and never overwrites files that are already there. If it reports a conflict, stop and merge by hand. See the CLI reference.

Can an AI editor migrate my Webflow custom code?

It can help, on a short leash. Back up first, move one feature at a time, keep it to the Stagepass APIs listed in AGENTS.md and stagepass.json, and read every diff before you accept it.

Why doesn't stagepass watch pick up my changes?

Watch mode rebuilds on script imports, but it doesn't watch SCSS partials on their own. After editing a partial, save src/styles.scss again or run stagepass build, then reload the live URL with your session.

Does my live site change while I migrate?

No. Leave production online while you work. Visitors without a session still see the production files. See Getting started.