Publish a Meta Display Glasses webapp to Vercel for live HTTPS access on device. Use when the developer is ready to publish, host, ship, or release a webapp to a stable production URL for everyone. Handles server setup, Vercel project creation, and direct deploys without GitHub.
Publish a Meta Display Glasses webapp to Vercel for live HTTPS access on device. Use when the developer is ready to publish, host, ship, or release a webapp to a stable production URL for everyone. Handles server setup, Vercel project creation, and direct deploys without GitHub.
argument-hint
[app-directory]
Publish to Vercel
Publish a Meta Display Glasses webapp to Vercel for live HTTPS hosting at a stable production URL. This enables loading the webapp directly on Meta Display Glasses, which require HTTPS URLs.
Use this skill only when the webapp is ready to ship to everyone. For iterating on uncommitted changes during development, use /test-on-device instead — it deploys to a stage-<project-name> URL without affecting production.
No GitHub repo required — code is pushed directly from local to Vercel.
Why Vercel?
Meta Display Glasses load webapps via HTTPS URLs. Vercel provides instant static hosting with HTTPS out of the box, making it the fastest path from local development to on-device access.
Prerequisites
1. Vercel-Compatible Node Server
The app directory must have these three files. If they don't exist, create them before proceeding.
package.json:
{"name":"<app-name>","version":
"1.0.0"
,
"private"
:
true
,
"scripts"
:
{
"start"
:
"node server.js"
}
}
server.js — lightweight static file server:
var http = require('http');
var fs = require('fs');
var path = require('path');
varPORT = process.env.PORT || 3000;
var mimeTypes = {
'.html': 'text/html',
'.css': 'text/css',
'.js': 'application/javascript',
'.json': 'application/json',
'.png': 'image/png',
'.jpg': 'image/jpeg',
'.svg': 'image/svg+xml',
};
var server = http.createServer(function(req, res) {
var filePath = '.' + (req.url === '/' ? '/index.html' : req.url);
var ext = path.extname(filePath);
var contentType = mimeTypes[ext] || 'application/octet-stream';
fs.readFile(filePath, function(err, content) {
if (err) {
res.writeHead(404, { 'Content-Type': 'text/html' });
res.end('<h1>404 Not Found</h1>');
return;
}
res.writeHead(200, { 'Content-Type': contentType });
res.end(content);
});
});
server.listen(PORT, function() {
console.log('Server running at http://localhost:' + PORT);
});
If a server already exists, verify Vercel compatibility:
Port must use process.env.PORT || 3000 (not hard-coded)
vercel.json must exist with rewrites config
Server must only serve static files (no Express routes or SSR)
package.json must have a start script
2. Existing Webapp
Existing webapp with index.html (created via /create-webapp or manually)
Steps
0. Verify Vercel Setup
Run vercel whoami to detect the user's current state, then branch:
a. Authenticated — vercel whoami returns a username. Skip to Step 0.5.
b. CLI not installed — command returns vercel: command not found (or similar). Tell the user:
Publishing to Meta Display Glasses needs a public HTTPS URL. I can set this up for you via Vercel — it's free and takes a couple of minutes. You'll need to create a Vercel account at https://vercel.com/signup (free tier is fine), and then I'll handle installing the CLI and walking you through the rest.
If you'd rather host this yourself on any HTTPS server, you can skip this skill entirely.
Want me to proceed with Vercel?
If yes, wait for the user to confirm they've created the Vercel account, then run npm i -g vercel yourself. After install completes, proceed to the login branch below.
c. Not logged in — CLI is installed but vercel whoami returns an auth error. Tell the user:
Vercel CLI is installed but not logged in. vercel login is interactive and needs your input — please type ! vercel login in this prompt to run it in this session.
After they complete login, re-run vercel whoami to confirm. Only proceed once it returns a valid user.
0.5. Detect and Offer to Disable Existing Passcode
If lock.html exists in the app directory, the app was previously gated by /test-on-device's passcode lock. Production releases shouldn't require visitors to enter a passcode, so ask the user:
This app has a passcode lock screen from /test-on-device. For a public production release, do you want to disable it? (default: yes)
I'll only disable the routing — lock.html, lock.css, and lock.js will stay in the directory in case you re-test later.
If yes, revert only the routing wiring (leave lock.html/lock.css/lock.js files in place):
server.js — change the root path back to serve index.html:
Replace <project-name> with the actual project name (from package.json or .vercel/project.json). For example, if the project is my-glasses-app, the stable URL becomes https://my-glasses-app.vercel.app.
This is the URL to share with everyone. It never changes between deploys.
5. Generate QR Code for Easy Device Setup
Generate a QR code that users can scan from their phone to automatically add the webapp — no manual URL typing needed.
The PNG is saved to the app directory. If your environment supports rendering images inline (e.g. Claude Code's Read tool), display the QR code directly. Otherwise, provide the file path and tell the user to open it and scan from their phone.
6. Give the User the Stable URL and Setup Instructions
After deploy, alias, and QR generation, present the user with:
Stable URL:
https://<project-name>.vercel.app
Option A — Scan QR code (recommended):
Scan the generated QR code with your phone camera. It will open the Meta AI app and automatically add the webapp.
Option B — Manual setup:
Open the Meta AI app on your phone
Go to Devices > Display Glasses settings
Navigate to App connections > Web apps
Tap Add a web app
Enter the name: <app-name>
Enter the URL: https://<project-name>.vercel.app
7. After Each Update — Republish
After making changes, republish, re-alias, and regenerate the QR code every time: