Generate a stable project-specific development port in the 3000-8999 range, then help wire it into .env, package scripts, Vite, or other dev-server config.
Part of lovstudio dev skills — by lovstudio.ai
npx lovstudio skills add project-port -g -y./scripts/hashport.sh
./scripts/hashport.sh my-projectThe script prints the port to stdout and reports occupancy to stderr when lsof is available.
port = 3000 + (sum(ord(c) * (i + 1) for i, c in enumerate(project_name)) % 6000)The same project name always maps to the same port.
| File | Update |
|---|---|
.env / .env.local |
PORT=<port> |
package.json |
add or update --port <port> in dev scripts |
vite.config.ts |
set server.port |
MIT