start-local runs a forwarded dev command and automatically infers a port from
the current folder name when it ends with ___<port>.
Example:
- Folder:
my-app___3010 - Command:
start-local --forward-cmd="next dev" - Effective command:
next dev --port 3010
npm i -D start-local{
"scripts": {
"dev": "start-local --forward-cmd=\"next dev\""
}
}--forward-cmd="<command and args>": required command to execute--port-flag="<flag>": flag used when injecting inferred port (default:--port)
Example with Vite:
start-local --forward-cmd="vite"start-local only injects <port-flag> <port> when all are true:
- Folder suffix matches
___<port> PORTenv var is not set- No explicit port argument is passed (
-p,--port, or your custom--port-flag)
All additional args are forwarded to the forwarded command.