Repository navigation
Rename to cross-port-kill and release 2.0.0 - #4
Open
Majid-Ali-Watto wants to merge 1 commit into
Open
Majid-Ali-Watto wants to merge 1 commit into
Majid-Ali-Watto wants to merge 1 commit into
Conversation
The package is now published unscoped as cross-port-kill, so `npx cross-port-kill 3000` replaces `npx @majidev-org/port-kill-cli 3000`. It continues the 1.x line of @majidev-org/port-kill-cli at 2.0.0. - Commands: add cpk, ckp, cross-port-kill and cross-kill-port next to pk, kp, port-kill and kill-port, plus pk-udp and pk-tcp, which preset the protocol (separate entry files, since npm's Windows shims lose the typed name). - UDP: --udp / -u and --tcp / -t flags, and a protocol on the port (5353/udp, udp:5353). TCP stays the default, so a plain port never touches a UDP socket. Listing covers ss, lsof (one call per protocol, as a TCP state filter drops UDP files) and netstat. - Fix: docker ps mappings such as 5455->53/udp were read as TCP ports, so pk 5455 could stop a container that only published UDP 5455. - Forgiving input: :3000, host:port, [::1]:3000, :::3000, pasted URLs, 3000,5173 lists, 3000..3005 ranges, combined short flags, case-insensitive options, kill-port's --port/--method syntax, and did-you-mean suggestions for mistyped options and words. - Plain words: pk kill 3000 frees, pk port 3000 shows info, questions (pk what is on 3000, pk is 3000 free) only ever look, and pk udp / pk tcp udp ports list those ports. - --info now ends with the command that frees what it showed. - Docs: README reordered by priority, new USAGE.md guide with a cheat sheet, and nine animated terminal SVGs generated from the CLI's own output helpers by scripts/make-demo.mjs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Renames the package to the unscoped
cross-port-killand prepares the 2.0.0 release. npm can't rename packages, so this continues the 1.x line of@majidev-org/port-kill-clias a new package. The old one gets deprecated after the first publish.Changes
Commands. Ten in total.
cpk,ckp,cross-port-killandcross-kill-portjoinpk,kp,port-killandkill-port.pk-udpandpk-tcppreset the protocol. They are separate entry files because npm's Windows shims drop the typed command name.UDP support.
--udp/-uand--tcp/-t, plus a protocol on the port itself (5353/udp,udp:5353).lsofis now called once per protocol. Combining-sTCP:LISTENwith-iUDPmade it drop every UDP socket, so macOS never saw UDP ports.Bug fix.
docker psmappings like5455->53/udpwere read as TCP.pk 5455could stop a container that only published UDP.Forgiving input.
:3000,localhost:3000,[::1]:3000,:::3000(fromEADDRINUSEerrors) or a pasted URL.3000,5173and3000..3005.-ui) and case-insensitive options.--port/--methodsyntax.Plain words.
pk kill 3000frees the port.pk port 3000shows info.pk udpandpk tcp udp portslist those ports.pk what is on 3000,pk is 3000 free) only ever show info, even when a kill word is present.--infohint. It now ends with the command that frees what it showed, e.g.To free it: pk 3000.Docs.
USAGE.mdguide with a cheat sheet.scripts/make-demo.mjsfrom the CLI's own output helpers.Testing
npm test: 44 pass on Linux, 1 Windows-only test skipped./udpfrees it.pk-udpandpk-tcp.localhost:PORTand a URL.pk port N/pk what is on N/pk is N freenever kill, andpk kill Ndoes.lsoffallback path, run withsshidden.Release steps after merge
Also documented in CONTRIBUTING.md under "The rename to
cross-port-kill":NPM_TOKEN. The current token is limited to the old package and can't create a new one.v2.0.0onmainand push it. The workflow publishes with provenance.cross-port-kill.npm deprecate @majidev-org/port-kill-cli "Renamed to cross-port-kill: …".🤖 Generated with Claude Code