Claim
A claim names a TCP port on this machine. It writes a lease to ~/.localslip/. It does not call bind() for your app and does not lock the port at the OS. Default stored bind is 127.0.0.1.
localslip claim foo --port 5173
localslip claim foo --port 5173 --lan
localslip release foo
Flags
| Flag | What it does |
|---|---|
--port N |
Request this TCP port. Omit it and LocalSlip picks the next free port from the always pool (46000โ46999). |
--bind ADDR |
Listen address. Default 127.0.0.1. |
--lan |
Bind 0.0.0.0 and sync an inbound firewall allow. Do not pass --bind with this. |
--ephemeral |
Scratch lease. Pool is 47000โ47999 if you omit --port. |
--notes TEXT |
Stored on the lease. |
--or-next |
If --port is already leased or something is already listening, take the next free pool port instead. |
--force |
Name a port even when the process listening there belongs to another project. |
A second name cannot take a port another lease already owns. You can claim a port that is already listening when that process belongs to the directory you claimed from (its cwd, or a node_modules path in the command). That names an app that is already up. It does not evict the listener. A dev script that re-claims its own port still succeeds when the process matches.
If the listener is another project, the claim fails. Pass --force to name it anyway, or --or-next for a free port. The CLI tells you when it fell back.
Occupied-port outcome: if foo already owns 5173, localslip claim bar --port 5173 fails. If Vite is already on 5173 and you claim from that app's directory, claim foo --port 5173 names that listener. From a different project it fails unless you pass --force. The Vite helper with strictPort: true then refuses to start a second process on 5173.
localslip claim scratch --port 5173 --or-next
localslip release scratch
localslip itself is reserved on 54321. Release it only with --force.