Claude Code plugin that automatically detects port conflicts before server startup commands or config file writes. When a conflict is found, it blocks the action and suggests the nearest available port.
In Claude Code, run:
/plugin marketplace add gtpgg1013/gtpgg1013-plugins
/plugin install port-saver@gtpgg1013-plugins
/reload-plugins
Clone this repo and add the hook to ~/.claude/settings.json:
{
"hooks": {
"PreToolUse": [
{
"matcher": "Bash|Write|Edit",
"hooks": [
{
"type": "command",
"command": "/path/to/port-saver/port-saver.sh",
"timeout": 10
}
]
}
]
}
}
lsof for conflicts| Ecosystem | Commands |
|---|---|
| Node.js | npm run dev/start/serve, npm start, yarn dev/start/serve, pnpm dev/start/serve |
| npx | npx serve/http-server/next/vite/nuxt/expo |
| Bun | bun run dev/start/serve, bun dev, bunx |
| Deno | deno serve/run/task |
| Frameworks | next dev, nuxi dev, astro dev, gatsby develop, remix dev, ng serve, storybook dev |
| Bundlers | webpack serve, webpack-dev-server |
| Python | python manage.py runserver, python -m http.server/flask/uvicorn, flask run, gunicorn, uvicorn, streamlit run, gradio, jupyter notebook/lab, sanic |
| Ruby | rails server/s, bundle exec puma/thin/unicorn/rails, puma, thin start, unicorn |
| PHP | php -S, php artisan serve, symfony serve/server:start |
| Java | java -jar, ./gradlew bootRun, ./mvnw spring-boot:run, mvn/gradle bootRun |
| .NET | dotnet run/watch |
| Go | go run |
| Rust | cargo run |
| Docker | docker-compose up, docker compose up, docker run |
| SSG | hugo server/serve, jekyll serve/s, hexo server/s, mkdocs serve, pelican --listen, eleventy --serve |
| Other | caddy run/start, expo start, flutter run, consul agent |
| File | Port Pattern |
|---|---|
.env, .env.local, .env.development, .flaskenv | PORT=N, *_PORT=N |
docker-compose.yml, compose.yml | "N:N" port mappings |
package.json | --port N, -p N in scripts |
angular.json | "port": N |
vite.config.*, next.config.*, nuxt.config.* | port: N |
astro.config.*, vue.config.*, remix.config.*, svelte.config.* | port: N |
webpack.config.* | port: N |
application.properties | server.port=N |
application.yml / application.yaml | port: N |
Procfile | --port N, -p N, --bind :N |
Extracts ports from these CLI patterns:
PORT=3000 npm start (env var)--port 3000 / --port=3000 / -p 3000python -m http.server 8080python manage.py runserver 0.0.0.0:8000docker run -p 3000:80php -S localhost:8000gunicorn --bind 0.0.0.0:8000 / -b :8000--server.port 8501 / --server.port=8501-Dserver.port=8081 (Spring Boot)dotnet run --urls http://*:5100mkdocs serve --dev-addr=0.0.0.0:8000flutter run --web-port 8080brew install jq on macOS)MIT
Executes bash commands
Hook triggers when Bash tool is used
Modifies files
Hook triggers on file write and edit operations
Own this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimBased on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
npx claudepluginhub gtpgg1013/gtpgg1013-plugins --plugin port-saverBootstrap - Developer onboarding accelerator. Analyzes project requirements, detects missing dependencies, generates Docker/docker-compose configs, creates .env templates, sets up pre-commit hooks, configures IDE settings (VSCode/Cursor), and troubleshoots 'it works on my machine' issues. Gets developers productive in minutes, not hours.
Manage parallel project instances — plant, adopt, uproot, and monitor isolated copies of your codebase
Debugging specialist for errors, test failures, and unexpected behavior. Use proactively when encountering any issues.
Set up and validate environment configurations across environments
Network diagnostics, reconnaissance, monitoring, and HTTP load testing - trippy, gping, ss, RustScan, nmap, bandwhich, sniffnet, oha
Ask Claude Code to help you debug an issue