Most active commenters
  • lexokoh(7)
  • userbinator(6)
  • phplovesong(4)

125 points lexokoh | 50 comments | | HN request time: 2.178s | source | bottom
1. password4321 ◴[] No.45001289[source]
Interesting idea ("manages development processes running on ports 2000-6000"), and props for hitting the front page though technically this is a "Show HN". Screenshot(s)?
replies(1): >>45001308 #
2. lexokoh ◴[] No.45001308[source]
Not sure I can add images here, but if you check the repo, I'll be adding one shortly.
3. nbbaier ◴[] No.45001525[source]
Neat! There's also a raycast extension for this kind of thing for anyone who wants to go that route:

https://www.raycast.com/lucaschultz/port-manager

4. dsab ◴[] No.45001575[source]
What is "development process" ??? What is "business use case" of this tool? Such a big readme and no introduction to why I should be interested in this tool.
replies(3): >>45001639 #>>45001691 #>>45004084 #
5. _def ◴[] No.45001594[source]
I'm not looking forward to the near future where it will become harder and harder to distinguish little projects like this from AI generated tools.
replies(3): >>45001694 #>>45001697 #>>45001732 #
6. faangguyindia ◴[] No.45001634[source]
On macOS i've this in my zshrc file:

`killport() { kill -9 $(lsof -t -i :$1 -sTCP:LISTEN) }`

i use it like killport 8000

replies(2): >>45001695 #>>45002400 #
7. motorest ◴[] No.45001639[source]
> Such a big readme and no introduction to why I should be interested in this tool.

This.

Why in the hell would anyone want to kill random processes that open a port in the tange 2000-6000? And why is this need so pressing as to require a full blown monitor integrated in a task bar?

Without context, this sounds like a complete random silly project that makes no sense and serves no purpose at all.

replies(1): >>45001708 #
8. lexokoh ◴[] No.45001691[source]
It's just a tool I built for myself. There's no business case. It just helps me
replies(1): >>45002454 #
9. userbinator ◴[] No.45001694[source]
The README already has a rather repugnant LLM-ish feel to it; lots of lists and verboseness, while saying very little.

Also, this is a perplexing choice (which also serves to illustrate the above point regarding verboseness):

    White background with red center: 1-9 processes (some development servers) 
    White background with orange center: 10+ processes (many development servers)
replies(2): >>45001706 #>>45002047 #
10. lexokoh ◴[] No.45001695[source]
Nice. I have this too. I wanted something more visual and expansive.
11. AbuAssar ◴[] No.45001697[source]
the ascii tree in "Project Structure" is a dead giveaway that AI is used in this project
12. incanus77 ◴[] No.45001703[source]
These would be good additions to SwiftBar/BitBar.
replies(1): >>45002676 #
13. lexokoh ◴[] No.45001706{3}[source]
A lot of ReadMe's are generated with AI. Doesn't really mean anything.
replies(2): >>45001729 #>>45005315 #
14. bigyabai ◴[] No.45001708{3}[source]
Without context, it sounds like something someone vibe-coded and git push-ed up to the internet. Which is fine, but it's just unusually precise and verbose for something that would end up being a shell alias for most developers.
replies(1): >>45001733 #
15. userbinator ◴[] No.45001729{4}[source]
You're right. A lot of words that don't really mean anything; and that's exactly why you should not do it if you want actual humans to read it.
16. pacifika ◴[] No.45001732[source]
Why would you need to do that?
replies(1): >>45001748 #
17. todotask2 ◴[] No.45001733{4}[source]
The author also posted it on Reddit. He used it for himself, but some people use it even though it’s bad practice.
18. userbinator ◴[] No.45001748{3}[source]
To filter out the spam.
19. hbbio ◴[] No.45001820[source]
Didn't expect to see the FSL for that kind of project :)

The part I'm interested in is the tray_icon crate but I'll look at the package directly https://docs.rs/tray-icon/latest/tray_icon/.

replies(1): >>45014678 #
20. nojs ◴[] No.45002047{3}[source]
> Quit: Exits the application
replies(1): >>45006284 #
21. donatj ◴[] No.45002054[source]
Ports 2000 - 6000?

I know I am getting old but when did we stop running things on 8xxx? The more 8's the more dev it was. 8000, 8080, 8088, 8888

replies(3): >>45002663 #>>45003241 #>>45013583 #
22. porridgeraisin ◴[] No.45002400[source]
Yeah, I have a function `whoseport` which is just your subcommand. I usually manually type kill or whatever I want with `$(whoseport 3000)`
23. hit8run ◴[] No.45002454{3}[source]
Which is perfectly fine and a fun thing to do. I personally use the terminal but such a little monitoring tool can be quite fun and we should embrace the fun in doing things more. People over here are so soaked up by the Open Source as a business model VC-Pitch that they can't believe it when someone builds a little hobby tool with no business plan for a multi billion dollar exit. You're doing it right buddy. Don't let these Crypto-SaaS-AI-Bros ruin the fun for you.
24. userbinator ◴[] No.45002663[source]
To me, 8xxx is for proxy servers.
25. npretto ◴[] No.45002676[source]
a couple of prompts of claude code gave me this, works well enough, but while I agree that this is sometimes useful, it may indeed better served by a couple of aliases in the terminal ``` #!/bin/bash

# SwiftBar Port Monitor # Monitors processes on TCP ports 2000-6000

# Menu bar title echo " Ports" echo "---"

# Get processes listening on TCP ports 2000-6000 processes=$(lsof -iTCP:2000-6000 -sTCP:LISTEN -n -P 2>/dev/null | awk 'NR>1 {print $2 "|" $1 "|" $9}' | sort -t'|' -k3 -n)

if [ -z "$processes" ]; then echo "No processes found on ports 2000-6000" exit 0 fi

# Process each line while IFS='|' read -r pid name port_info; do if [ -n "$pid" ] && [ -n "$name" ] && [ -n "$port_info" ]; then # Extract port number from format like :3000 port=$(echo "$port_info" | sed 's/.://')

        # Menu item with port and process name
        echo "[$port] $name | color=blue"
        
        # Submenu items
        echo "--Kill (TERM) | shell=kill param1=$pid terminal=false refresh=true"
        echo "--Kill Force (KILL) | shell=kill param1=-9 param2=$pid terminal=false refresh=true"
        echo "--Process Info | shell=ps param1=-p param2=$pid param3=-o param4=pid,ppid,user,command terminal=true"
        echo "-----"
    fi
done <<< "$processes"

# Refresh option echo "---" echo "Refresh | refresh=true

26. sgt ◴[] No.45002869[source]
lsof is a bit heavy, I wouldn't want that running every 5 seconds to be honest.
27. ◴[] No.45003241[source]
28. phplovesong ◴[] No.45003800[source]
This has 10 additional deps. 10! Rust is the new Javascript.
replies(1): >>45004136 #
29. vahid4m ◴[] No.45004084[source]
can't a guy just create something anymore? :D They have to have a business model or a grand plan ?
30. crote ◴[] No.45004136[source]
Complaining about the number of dependencies is completely meaningless if you don't take into account what those dependencies do, and what the ecosystem looks like.

For example, `tray-icon` looks pretty useful for a lightweight app which basically is a tray icon: rewriting that library from scratch would be a massive waste of time.

On the other end of the spectrum, `log` and `serde` provide basic functionality which most languages will have in their standard library. Rust intentionally keeps a small standard library to avoid ossifying potentially bad ideas. The crates have tens of millions of users, rewriting that yourself would be stupidity.

It's very easy to criticize the length of their dependency list, but could you point to a specific one which you deem unnecessary? Which one do you consider to be a "leftPad", and what trivial code fragment would you replace it with?

replies(2): >>45005039 #>>45008652 #
31. phplovesong ◴[] No.45005039{3}[source]
I mean this entire thing is doable in a one-liner bash script. This tool has 10 deps (and every one of them also includes a big list of deps, so in practice i probably have over 200 deps).

How is this acceptable?

replies(2): >>45005603 #>>45014777 #
32. jelder ◴[] No.45005315{4}[source]
Whenever I see a README or worse, PR description that was obviously generated by an LLM, my immediate response is "if you couldn't be bothered to write this, why should I bother reading this?"
replies(1): >>45005445 #
33. sdotdev ◴[] No.45005406[source]
If only I was on mac, something like this probably exists on windows I just need to find it. great idea however
replies(1): >>45030603 #
34. 1gn15 ◴[] No.45005445{5}[source]
Because it provides useful information, and is easier to read compared to reading the code directly.
replies(2): >>45006248 #>>45006683 #
35. sghiassy ◴[] No.45005603{4}[source]
Even if the app used the bash script as the backend, the UI would require dependencies (aka tray icon)
replies(1): >>45006167 #
36. phplovesong ◴[] No.45006167{5}[source]
You dont need a UI for things like this.
replies(1): >>45007093 #
37. ◴[] No.45006248{6}[source]
38. johnisgood ◴[] No.45006284{4}[source]
I would have never figured that one out, had to ask an LLM! Thank god for LLMs.
39. naikrovek ◴[] No.45006656[source]
Green -> Red -> Orange

That is an odd progression

40. jelder ◴[] No.45006683{6}[source]
Except, no it doesn’t.

In the case of a pull request, I am not about to trust some LLM that has no business context and can only pretend to guess at the “why” of a change.

To understand the “what” of a change, you have to actually read the code. This doesn’t belong in the pull request description most of the time.

replies(1): >>45008992 #
41. E39M5S62 ◴[] No.45007093{6}[source]
Maybe you don't, but the author did/wanted one. It's a good thing your exact needs don't control how other people use their computer.
replies(1): >>45008684 #
42. userbinator ◴[] No.45008652{3}[source]
I haven't had to do Mac GUI development, but on Windows managing a tray icon is a single system library function: https://learn.microsoft.com/en-us/windows/win32/api/shellapi...
43. phplovesong ◴[] No.45008684{7}[source]
Its also reckless that you install 200 deps that can in theory read/write and do anything to your OS. How do i know this thing is not listening to my keyboard? Etc...

A uI tray icon is usually a few os calls away. I does not require 200 deps.

44. e-clinton ◴[] No.45008992{7}[source]
You’re implying that if someone uses AI to write something, the person doesn’t then read it/iterate on it to ensure correctness. Serious “get off my lawn” vibes here.
replies(1): >>45009367 #
45. userbinator ◴[] No.45009367{8}[source]
the person doesn’t then read it/iterate on it to ensure correctness.

As someone who has had to deal with drive-by PRs on open-source projects, which were a problem before but have now gotten much worse in volume as they are mostly AI-generated, yes.

46. lexokoh ◴[] No.45013583[source]
i made an update to specify ports like these. You can check.
47. cdaringe ◴[] No.45014678[source]
What’s FSL?
48. cdaringe ◴[] No.45014777{4}[source]
A macos status bar gui with user interaction is doable in a one liner bash script? Show me.

Spoiler: no it isnt.

49. lexokoh ◴[] No.45030603[source]
If you open an issue or feature request, could look at it.