{"id":28495347,"url":"https://github.com/doganarif/portfinder","last_synced_at":"2025-06-11T14:02:04.602Z","repository":{"id":297321920,"uuid":"996407164","full_name":"doganarif/portfinder","owner":"doganarif","description":"A fast, lightweight Go-based CLI tool to detect and manage processes using network ports—featuring project awareness, Docker support, and an interactive terminal UI.","archived":false,"fork":false,"pushed_at":"2025-06-04T23:29:44.000Z","size":128,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-05T04:13:53.066Z","etag":null,"topics":["cli","go","networking","ports"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/doganarif.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-04T22:58:18.000Z","updated_at":"2025-06-05T03:18:03.000Z","dependencies_parsed_at":"2025-06-05T04:20:57.348Z","dependency_job_id":"088dd39c-1a8a-4b74-a5b6-951dc7784bcd","html_url":"https://github.com/doganarif/portfinder","commit_stats":null,"previous_names":["doganarif/portfinder"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doganarif%2Fportfinder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doganarif%2Fportfinder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doganarif%2Fportfinder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doganarif%2Fportfinder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/doganarif","download_url":"https://codeload.github.com/doganarif/portfinder/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/doganarif%2Fportfinder/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":258701949,"owners_count":22743733,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","go","networking","ports"],"created_at":"2025-06-08T11:10:20.876Z","updated_at":"2025-06-10T13:02:02.971Z","avatar_url":"https://github.com/doganarif.png","language":"Go","funding_links":[],"categories":["\u003ca name=\"networking\"\u003e\u003c/a\u003eNetworking"],"sub_categories":[],"readme":"# pf\n\nA modern CLI tool to identify and manage processes using network ports.  \nBuilt with Go for speed, clarity, and zero runtime dependencies.\n\n![Go Version](https://img.shields.io/badge/Go-1.21+-00ADD8?style=flat\u0026logo=go)\n![License](https://img.shields.io/badge/license-MIT-blue)\n![Platform](https://img.shields.io/badge/platform-macOS%20%7C%20Linux%20%7C%20Windows-lightgrey)\n\n## 🎬 Preview\n\n![pf in action](pf.gif)\n\n---\n\n## ✨ Features\n\n- 🔍 **Smart Process Detection** — Instantly find what's using your ports\n- 📁 **Project Awareness** — Shows which project/directory owns the process\n- 🐳 **Docker Support** — Identifies containerized processes\n- 🎯 **Quick Actions** — Kill processes interactively or directly\n- 📊 **Port Overview** — Check all common development ports\n- 🚀 **Fast \u0026 Lightweight** — Single binary, no runtime dependencies\n\n---\n\n## 📦 Installation\n\n### ✅ Using Homebrew (macOS/Linux)\n\n```bash\nbrew tap doganarif/tap\nbrew install pf\n```\n\n### 🪟 Windows\n\nDownload the latest `.exe` file from the [Releases Page](https://github.com/doganarif/portfinder/releases):\n\n- For 64-bit Windows: `pf-windows-amd64.exe`\n- For ARM64 Windows: `pf-windows-arm64.exe`\n\nRename it to `pf.exe` and add to your PATH.\n\n### 🧰 Using Go\n\n```bash\ngo install github.com/doganarif/portfinder/cmd/portfinder@latest\n```\n\nThis installs the binary as `pf`.\n\n### 📁 Download Binary\n\nGrab the latest release from the [Releases Page](https://github.com/doganarif/portfinder/releases).\n\n---\n\n## 🧪 Usage\n\n### 🔍 Check a specific port\n\n```bash\npf 3000\n```\n\nOutput:\n\n```\n🔍 Port 3000 is in use by:\n\nProcess     node\nPID         48291\nCommand     npm run dev\nProject     ~/projects/my-react-app\nStarted     3 hours ago\n\nKill this process? [y/n]\n```\n\n---\n\n### 📊 Check common development ports\n\n```bash\npf check\n```\n\nExample output:\n\n```\n📊 Common Development Ports:\n\nFrontend:\n  ❌ 3000: node (my-react-app)\n  ✅ 3001: free\n  ✅ 4200: free\n  ❌ 5173: vite (my-vue-app)\n  ✅ 8080: free\n\nBackend:\n  ✅ 4000: free\n  ❌ 5000: python (flask-api)\n  ✅ 8000: free\n  ✅ 9000: free\n\nDatabases:\n  ✅ 3306: free\n  ❌ 5432: postgres (docker)\n  ❌ 6379: redis\n  ✅ 27017: free\n```\n\n---\n\n### 📋 List all ports in use\n\n```bash\npf list\n```\n\n---\n\n### 💀 Kill a process\n\n```bash\npf kill 3000\n```\n\n---\n\n## ⚙️ Common Ports Reference\n\n| Port  | Common Use                |\n| ----- | ------------------------- |\n| 3000  | React, Node.js, Rails     |\n| 3001  | Create React App fallback |\n| 4200  | Angular                   |\n| 5173  | Vite                      |\n| 5000  | Flask, Python servers     |\n| 8000  | Django                    |\n| 8080  | General web development   |\n| 3306  | MySQL/MariaDB             |\n| 5432  | PostgreSQL                |\n| 6379  | Redis                     |\n| 27017 | MongoDB                   |\n| 9200  | Elasticsearch             |\n| 9090  | Prometheus                |\n| 3100  | Grafana Loki              |\n| 8983  | Solr                      |\n\n---\n\n## 🛠️ Configuration\n\nYou can override the default list of common ports by creating a config file at:\n\n```bash\n~/.config/portfinder/config.json\n```\n\nExample:\n\n```json\n{\n  \"common_ports\": [3000, 3001, 5173, 5000, 8000]\n}\n```\n\n---\n\n## 🧑‍💻 Development\n\n### Prerequisites\n\n- Go 1.21+\n- Make (optional)\n\n### Building from source\n\n```bash\n# Clone the repository\ngit clone https://github.com/doganarif/portfinder.git\ncd portfinder\n\n# Build\nmake build\n\n# Run tests\nmake test\n\n# Install locally\nmake install\n```\n\n---\n\n## 📁 Project Structure\n\n```\npf/\n├── cmd/\n│   └── portfinder/     # CLI entry point\n├── internal/\n│   ├── config/         # Configuration management\n│   ├── process/        # Process detection logic\n│   └── ui/             # Terminal UI components\n├── Makefile            # Build automation\n└── README.md           # This file\n```\n\n---\n\n## 🤝 Contributing\n\nContributions are welcome! Please open an issue or pull request.\n\n1. Fork the repository\n2. Create your feature branch (`git checkout -b feature/amazing-feature`)\n3. Commit your changes (`git commit -m 'Add amazing feature'`)\n4. Push to the branch (`git push origin feature/amazing-feature`)\n5. Open a Pull Request\n\n---\n\n## 📜 License\n\nThis project is licensed under the MIT License — see the [LICENSE](LICENSE) file.\n\n---\n\n## 🙌 Acknowledgments\n\n- Inspired by the frustration of \"port already in use\" errors\n- Built using [Cobra](https://github.com/spf13/cobra) for CLI\n- Terminal UI powered by [Bubbletea](https://github.com/charmbracelet/bubbletea)\n\n---\n\n## 🧑 Author\n\n**Arif Doğan**\n\n- GitHub: [@doganarif](https://github.com/doganarif)\n- Twitter: [@arifcodes](https://twitter.com/arifcodes)\n\n\u003e If you find this tool useful, please consider giving it a ⭐️ on GitHub!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdoganarif%2Fportfinder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdoganarif%2Fportfinder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdoganarif%2Fportfinder/lists"}