/vercel-labs:portlessfrom vercel-labs
Set up and use portless for named local dev server URLs (e.g. http://myapp.localhost instead of http://localhost:3000). Use when integrating portless into a project, configuring dev server names, setting up the local proxy, working with .localhost domains, or troubleshooting port/proxy issues.
Ships in vercel-labs. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Replace port numbers with stable, named .localhost URLs. For humans and agents.
EADDRINUSE when two projects default to the same portlocalhost bleed across apps; localStorage lost when ports shift.env files break when ports changelocalhost:3000 history is a mix of unrelated projectsportless is a global CLI tool. Do NOT add it as a project dependency (no npm install portless or pnpm add portless in a project). Do NOT use npx or pnpm dlx.
Install globally:
npm install -g portless
# Install globally
npm install -g portless
# Start the proxy (once, no sudo needed)
portless proxy start
# Run your app (auto-starts the proxy if needed)
portless run next dev
# -> http://<project>.localhost:1355
# Or with an explicit name
portless myapp next dev
# -> http://myapp.localhost:1355
The proxy auto-starts when you run an app. You can also start it explicitly with portless proxy start.
{
"scripts": {
"dev": "portless run next dev"
}
}
The proxy auto-starts when you run an app. Or start it explicitly: portless proxy start.
portless myapp next dev # http://myapp.localhost:1355
portless api.myapp pnpm start # http://api.myapp.localhost:1355
portless docs.myapp next dev # http://docs.myapp.localhost:1355
Wildcard subdomain routing: any subdomain of a registered route routes to that app automatically (e.g. tenant1.myapp.localhost:1355 routes to the myapp app without extra registration). Exact matches take priority over wildcards.
portless run automatically detects git worktrees. In a linked worktree, the branch name is prepended as a subdomain prefix so each worktree gets a unique URL:
# Main worktree -- no prefix
portless run next dev # -> http://myapp.localhost:1355
# Linked worktree on branch "fix-ui"
portless run next dev # -> http://fix-ui.myapp.localhost:1355
No config changes needed. Put portless run in package.json once and it works in all worktrees.
Set PORTLESS=0 to run the command directly without the proxy:
PORTLESS=0 pnpm dev # Bypasses proxy, uses default port
portless proxy start starts an HTTP reverse proxy on port 1355 as a background daemon (configurable with -p / --port or the PORTLESS_PORT env var). The proxy also auto-starts when you run an app.portless <name> <cmd> assigns a random free port (4000-4999) via the PORT env var and registers the app with the proxyhttp://<name>.localhost:1355 on the proxy port; the proxy forwards to the app's assigned port.localhost domains resolve to 127.0.0.1 natively in Chrome, Firefox, and Edge. Safari relies on the system DNS resolver, which may not handle .localhost subdomains on all configurations. Run sudo portless hosts sync to add entries to /etc/hosts if needed.
Most frameworks (Next.js, Express, Nuxt, etc.) respect the PORT env var automatically. For frameworks that ignore PORT (Vite, Astro, React Router, Angular, Expo, React Native), portless auto-injects the correct --port and --host CLI flags.
Portless stores its state (routes, PID file, port file) in a directory that depends on the proxy port:
/tmp/portless~/.portlessOverride with the PORTLESS_STATE_DIR environment variable.
| Variable | Description |
|---|---|
PORTLESS_PORT | Override the default proxy port (default: 1355) |
PORTLESS_APP_PORT | Use a fixed port for the app (skip auto-assignment) |
PORTLESS_HTTPS | Set to 1 to always enable HTTPS/HTTP/2 |
PORTLESS_TLD | Use a custom TLD instead of localhost (e.g. test) |
PORTLESS_SYNC_HOSTS | Set to 1 to auto-sync /etc/hosts (auto-enabled for custom TLDs) |
PORTLESS_STATE_DIR | Override the state directory |
PORTLESS=0 | Bypass the proxy, run the command directly |
Use --https for HTTP/2 multiplexing (faster page loads for dev servers with many files):
portless proxy start --https # Auto-generate certs and trust CA
portless proxy start --cert ./c.pem --key ./k.pem # Use custom certs
sudo portless trust # Add CA to trust store later
First run generates a local CA and prompts for sudo to add it to the system trust store. After that, no prompts and no browser warnings. Set PORTLESS_HTTPS=1 in .bashrc/.zshrc to make it permanent.
On Linux, portless trust supports Debian/Ubuntu, Arch, Fedora/RHEL/CentOS, and openSUSE (via update-ca-certificates or update-ca-trust).
| Command | Description |
|---|---|
portless run <cmd> [args...] | Infer name from project, run through proxy (auto-starts) |
portless run --name <name> <cmd> | Override inferred base name (worktree prefix still applies) |
portless <name> <cmd> [args...] | Run app at http://<name>.localhost:1355 (auto-starts proxy) |
portless list | Show active routes |
portless trust | Add local CA to system trust store (for HTTPS) |
portless proxy start | Start the proxy as a daemon (port 1355, no sudo) |
portless proxy start --https | Start with HTTP/2 + TLS (auto-generates certs) |
portless proxy start -p <number> | Start the proxy on a custom port |
portless proxy start --tld test | Use .test instead of .localhost (requires /etc/hosts sync) |
portless proxy start --foreground | Start the proxy in foreground (for debugging) |
portless proxy stop | Stop the proxy |
portless alias <name> <port> | Register a static route (e.g. for Docker containers) |
portless alias <name> <port> --force | Overwrite an existing route |
portless alias --remove <name> | Remove a static route |
portless hosts sync | Add routes to /etc/hosts (fixes Safari) |
portless hosts clean | Remove portless entries from /etc/hosts |
portless <name> --app-port <n> <cmd> | Use a fixed port for the app instead of auto-assignment |
portless <name> --force <cmd> | Override an existing route registered by another process |
portless --name <name> <cmd> | Force <name> as app name (bypasses subcommand dispatch) |
portless <name> -- <cmd> [args...] | Stop flag parsing; everything after -- is passed to child |
portless --help / -h | Show help |
portless run --help | Show help for a subcommand (also: alias, hosts) |
portless --version / -v | Show version |
Reserved names: run, alias, hosts, list, trust, and proxy are subcommands and cannot be used as app names directly. Use portless run <cmd> to infer the name, or portless --name <name> <cmd> to force any name including reserved ones.
The proxy auto-starts when you run an app with portless <name> <cmd>. If it doesn't start (e.g. port conflict), start it manually:
portless proxy start
Another process is bound to the proxy port. Either stop it first, or use a different port:
portless proxy start -p 8080
Portless auto-injects --port and --host flags for frameworks that ignore the PORT env var: Vite, Astro, React Router, Angular, Expo, and React Native. SvelteKit uses Vite internally and is handled automatically.
For other frameworks that don't read PORT, pass the port manually:
--port $PORTprocess.env.PORT and listen on itPorts below 1024 require sudo. The default port (1355) does not need sudo. If you want to use port 80:
sudo portless proxy start -p 80 # Port 80, requires sudo
portless proxy start # Port 1355, no sudo needed
portless proxy stop # Stop (use sudo if started with sudo)
Safari relies on the system DNS resolver for .localhost subdomains, which may not resolve them on all macOS configurations. Chrome, Firefox, and Edge have built-in handling.
Fix:
sudo portless hosts sync # Adds current routes to /etc/hosts
sudo portless hosts clean # Remove entries later
Auto-syncs /etc/hosts for custom TLDs (e.g. --tld test). For .localhost, set PORTLESS_SYNC_HOSTS=1 to enable.
The local CA may not be trusted yet. Run:
sudo portless trust
This adds the portless local CA to your system trust store. After that, restart the browser.
If your dev server proxies requests to another portless app (e.g. Vite proxying /api to api.myapp.localhost:1355), the proxy must rewrite the Host header. Without this, portless routes the request back to the original app, creating an infinite loop.
Fix: set changeOrigin: true in the proxy config (Vite, webpack-dev-server, etc.):
// vite.config.ts
proxy: {
"/api": {
target: "http://api.myapp.localhost:1355",
changeOrigin: true,
ws: true,
},
}
openssl (for --https cert generation; ships with macOS and most Linux distributions)What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
36 skills in this plugin
/agent-browserBrowser automation CLI for AI agents. Use when the user needs to interact with websites, including navigating pages, filling forms, clicking buttons, taking screenshots, extracting data, testing web apps, or automating any browser task. Triggers include requests to "open a website", "fill out a form", "click a button", "take a screenshot", "scrape data from a page", "test this web app", "login to a site", "automate browser actions", or any task requiring programmatic web interaction./ai-sdkAnswer questions about the AI SDK and help build AI-powered features. Use when developers: (1) Ask about AI SDK functions like generateText, streamText, ToolLoopAgent, embed, or tools, (2) Want to build AI agents, chatbots, RAG systems, or text generation features, (3) Have questions about AI providers (OpenAI, Anthropic, Google, etc.), streaming, tool calling, structured output, or embeddings, (4) Use React hooks like useChat or useCompletion. Triggers on: "AI SDK", "Vercel AI SDK", "generateText", "streamText", "add AI to my app", "build an agent", "tool calling", "structured output", "useChat"./autoshipCLI tool for automated changeset-based releases with AI-generated descriptions. Use when the user needs to release a package, create changesets, bump versions, or automate npm publishing workflows. Triggers include requests to "release a package", "create a changeset", "publish to npm", "bump the version", "automate releases", or any task involving version management and package publishing for repositories using the changesets workflow./before-and-afterCaptures before/after screenshots of web pages or elements for visual comparison. Use when user says "take before and after", "screenshot comparison", "visual diff", "PR screenshots", "compare old and new", or needs to document UI changes. Accepts two URLs (file://, http://, https://) or two image paths./coreCore package for defining schemas, catalogs, and AI prompt generation for json-render. Use when working with @json-render/core, defining schemas, creating catalogs, or building JSON specs for UI/video generation./cra-to-next-migrationComprehensive guide for migrating Create React App (CRA) projects to Next.js. Use when migrating a CRA app, converting React Router to file-based routing, or adopting Next.js patterns like Server Components, App Router, or image optimization.npx claudepluginhub ulpi-io/plugin-marketplace --plugin vercel-labs