Skip to content

lovstudio/project-port-skill

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

lovstudio-project-port

Version

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

Install

npx lovstudio skills add project-port -g -y

Usage

./scripts/hashport.sh
./scripts/hashport.sh my-project

The script prints the port to stdout and reports occupancy to stderr when lsof is available.

Algorithm

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.

Common Targets

File Update
.env / .env.local PORT=<port>
package.json add or update --port <port> in dev scripts
vite.config.ts set server.port

License

MIT

About

Generate stable unique dev port (3000–8999) from project name.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors

Languages