chgeuer

chgeuer / phx-port

Public

Stable port assignments for Phoenix projects

10
0
100% credibility
Found Mar 06, 2026 at 10 stars -- GitGems finds repos before they trend. Get early access to the next one.
Sign Up Free
AI Analysis
Rust
AI Summary

A command-line tool that automatically assigns and manages unique local development ports for different projects to avoid collisions.

How It Works

1
😩 Port Conflicts Frustrate You

You're excited to run multiple web projects at once, but they all fight over the same connection number, causing crashes and confusion.

2
💡 Discover phx-port

You learn about a simple helper that gives each project its own unique connection number automatically, so no more memorizing or clashes.

3
📥 Add the Helper

You easily place this port manager on your computer, ready to use anywhere.

4
📁 Open Your Project Folder

You navigate to one of your project folders where you want to run your app.

5
Grab Your Port Number

You ask the helper for your project's number—it creates a new one if needed or recalls the saved one, printing it right away.

6
🚀 Launch Your App

You tell your app to use that special number, and it starts up smoothly on its own spot.

7
📋 View All Your Ports

You check a neat list or tree of all projects and their numbers, with easy links to open them in your browser.

🎉 Projects Run Happily Together

Now all your projects live side-by-side without conflicts, and you never worry about which number belongs to which.

Sign up to see the full architecture

6 more

Sign Up Free

Star Growth

See how this repo grew from 10 to 10 stars Sign Up Free
Repurpose This Repo

Repurpose is a Pro feature

Generate ready-to-use prompts for X threads, LinkedIn posts, blog posts, YouTube scripts, and more -- with full repo context baked in.

Unlock Repurpose
AI-Generated Review

What is phx-port?

phx-port is a Rust CLI tool that auto-assigns stable, unique port numbers to projects based on their directory path, eliminating collisions when spinning up multiple local servers. Run `PORT=$(phx-port) mix phx.server` in any Phoenix app—or Node.js, Livebook, whatever—and it grabs or allocates a port from 4001 up, persisting assignments in a TOML config at ~/.config/phx-ports.toml. Originally for phoenix port code in Elixir workflows, it supports named roles like "debug" or "metrics" via `phx-port debug`.

Why is it gaining traction?

Unlike manual port juggling in multi-repo setups like github stable diffusion webui or github stable diffusion automatic1111, phx-port delivers instant consistency with zero config upfront—first run registers, repeats reuse. Features like `phx-port list` tree views with clickable localhost URLs, `phx-port open`, and delete by name/port make management visual and script-friendly. Cross-platform piped output fits shell aliases perfectly, hooking devs tired of ad-hoc 4000 tweaks.

Who should use this?

Phoenix and Elixir devs running parallel LiveView apps or livebook-dev instances. Full-stack teams with side projects in Node or Rails needing phx port stability. Local devops scripting github stable diffusion cpp or phx portal flights without port fights.

Verdict

Grab it via `cargo install` for a frictionless local dev boost—excellent README and commands make it production-ready despite v0.1.0. With 10 stars and 1.0% credibility score, it's early but battle-tested enough for polyglot workflows; fork if needed.

(187 words)

Sign up to read the full AI review Sign Up Free

Similar repos coming soon.