# proc: 포트 점유 프로세스를 한 명령으로 종료
# proc: freeing a port in one command

- Site: https://select1.dev/2026-10-27 (English), https://select1.dev/ko/2026-10-27 (Korean)
- Entry: 017
- Published: 2026-10-27 (KST). Launch date: 2026-10-26
- Pick: proc <https://proc-cli.com/> (source: Show HN)
- Verified: ran
- What: proc 은 포트, PID, 이름으로 프로세스를 찾아 종료하고, 결과를 JSON 과 종료 코드로 반환하는 프로덕트다.
- What (en): proc is a product that finds and stops processes by port, PID or name, and returns the result as JSON with an exit code.
- Why: 오늘의 픽으로 선정한 이유는 코딩 에이전트가 프로세스를 종료하기 전에 대상을 확인하고, 결과를 종료 코드로 판단할 수 있게 하기 때문이다.
- Why (en): It is today’s pick because it lets a coding agent check the target before it stops a process, and judge the result by the exit code.
- Verdict: 작동한다. 포트 조회, 미리 보기, 종료 명령이 JSON 과 종료 코드를 반환했다.
- Verdict (en): It works. The lookup, preview and stop commands returned JSON and exit codes.
- Tags: cli, process, ports, ai-agents, rust, ai-built

## Checked against the README

- [pass] --json 을 붙이면 모든 명령이 action 과 success 가 든 JSON 문서 하나를 출력하고, 잘못된 옵션 같은 오류도 JSON 으로 출력한다(With --json, every command prints one JSON document with action and success. Errors, including invalid flags, are JSON too) — proc 의 on, kill --dry-run, kill, free 명령에 --json 을 붙여 실행하고, 오류가 나는 입력 네 가지(사용하는 프로세스가 없는 포트와 잘못된 입력 세 가지: 잘못된 옵션, 범위를 벗어난 포트 번호, 잘못된 시그널 이름)로도 실행했다. 모두 JSON 문서 하나를 출력했다. 문서마다 action 과 success 필드가 있었다
- [pass] 종료 코드는 성공 0, 오류 1, 찾지 못함 2, 권한 없음 3, 잘못된 입력 4 이고, success 가 false 이면 종료 코드는 항상 0 이 아니다 — ss 가 없으면 종료 코드 1, ss 를 설치한 뒤 성공하면 0, 사용하는 프로세스가 없는 포트를 지정하면 2, 잘못된 입력 세 가지에서는 모두 4 가 반환됐다. 권한 없음(3)은 시험하지 않았다
- [fail] free 는 --yes 가 없으면 확인을 요청한다(Asks for confirmation unless --yes, docs/commands/free.md) — script 명령으로 가상 터미널을 만들고, 그 안에서 proc free :3000 을 실행하자 [y/N] 확인 질문이 출력됐다. 같은 명령에 --json 을 붙이자 확인 없이 프로세스를 종료했다. src/ui/output.rs 의 ask_confirm 은 --json 이면 확인을 건너뛴다

## Measured

- proc on :3000 --json 을 10번 실행했을 때 실제 경과 시간의 중앙값(측정용 셸 스크립트로 실행했다. lsof 도 같은 방법으로 측정했다): 18 ms (date +%s%N 으로 측정. 16~21 ms)

## 한국어

## 무엇이 문제인가

개발 서버가 "address already in use" 오류를 출력하고 시작되지 않으면, 같은 포트를 사용하는 프로세스를 찾아 종료해야 한다. 코딩 에이전트도 같은 일을 한다. Hacker News 의 한 사용자는 댓글에서, Claude 가 이름 패턴으로 프로세스를 찾아 종료하는 명령을 실행하면 그 명령도 같은 패턴과 일치해 대상보다 먼저 종료되는 일이 여러 번 있었다고 했다.

proc 의 제작자는 README 에서 작업마다 proc 명령과 lsof, kill 같은 명령의 조합을 표로 비교했다. lsof 에 `-i` 로 포트를 지정하면 그 포트를 사용하는 프로세스 목록이 출력되고, `-t` 를 붙이면 프로세스 ID 만 출력된다. 그래서 포트를 다시 사용하려면 lsof 로 프로세스 ID 를 찾아 kill 에 넘기고, 다시 lsof 로 그 포트를 사용하는 프로세스가 없는지 확인해야 한다.

## 어떻게 해결했나

proc 은 2026년 10월 26일 Hacker News 에 Show HN 글로 올라왔다. proc 은 찾기, 종료, 확인을 명령 하나로 묶는다. 대상은 포트(`:3000`), PID, 이름, 파일 경로로 지정한다. `proc free :3000` 은 그 포트의 프로세스를 종료한 뒤 그 포트를 사용하는 프로세스가 없는지 확인한다. `proc why :3000` 은 그 프로세스를 실행한 부모 프로세스들을 차례로 보여 준다. 이름으로 프로세스를 찾을 때는 proc 자신과 proc 을 실행한 셸 같은 상위 프로세스를 대상에서 제외한다.

`--json` 을 붙이면 결과를 JSON 으로 출력한다. 종료 코드는 다섯 가지로 구분한다. 저장소에는 Claude Code, Codex 같은 코딩 에이전트에게 proc 사용법을 알려 주는 에이전트 스킬 파일도 있다.

## 무엇이 다른가

첫째, 결과를 읽는 방법이 다르다. lsof 의 기본 출력은 눈으로 읽기 위한 표이고, `-t` 나 `-F` 를 붙이면 다른 프로그램이 읽기 쉬운 형식으로 바뀐다. proc 은 `--json` 을 붙이면 모든 명령이 JSON 문서 하나를 출력한다. 명령과 관계없이 문서에는 action 과 success 필드가 있다. 대상을 찾지 못하면 종료 코드 2, 잘못된 입력이면 4 를 반환하므로, 에이전트는 출력을 파싱하지 않고 종료 코드로 다음 행동을 결정할 수 있다. 트레이드오프는 proc 을 따로 설치해야 하고, 리눅스에서는 포트를 조회하는 데 ss 명령이 필요하다는 점이다.

둘째, 종료 전에 확인하는 방법이 다르다. lsof 의 결과를 kill 에 넘기는 명령은 실행하는 즉시 프로세스를 종료한다. proc 의 `--dry-run` 은 종료할 프로세스를 보여 주고 아무것도 종료하지 않는다. 사용자가 터미널에서 `proc kill` 이나 `proc free` 를 실행하면 proc 은 프로세스를 종료하기 전에 확인을 요청한다. 다만 `--json` 을 붙이면 `--yes` 가 없어도 확인 없이 종료한다. 제작자는 에이전트 스킬 파일에서 파괴적인 명령에는 항상 `--yes` 를 붙이라고 안내한다. 이 안내만 보면 `--json` 을 붙여도 `--yes` 가 없을 때는 확인을 요청할 것처럼 읽힌다.

## 어떻게 만들었나

- 커밋 145개는 2026년 1월 8일부터 10월 25일까지 작성됐다. 1월 12일 v1.0.0 커밋의 제목은 "The process manager for humans" 였다. JSON 오류 형식과 에이전트 스킬은 3월 24일 v1.10.0 에 추가됐다.
- 커밋 109개에 Claude 와 함께 작성했다는 Co-authored-by 트레일러가 있다.
- src 디렉토리의 Rust 코드는 8,264줄이다. JSON 출력을 검사하는 테스트 파일 `tests/cli_json.rs` 는 571줄이다.

## 실행해 보니

저장소를 클론해 소스로 빌드하고, 포트 3000 에 Python 의 http.server 를 실행해 시험했다.

1. 빌드. `cargo build --release` 에 1분 10초가 걸렸다. 실행 파일은 2.4 MB 다.
2. 포트 조회. `proc on :3000` 은 `Port lookups on Linux need ss` 오류로 실패했다. 시험에 사용한 리눅스 컴퓨터에는 lsof 는 있었지만 ss 는 없었다. README 의 설치 안내에는 ss 가 필요하다는 내용이 없다. 변경 기록에만 Docker 이미지에 ss 를 포함한 iproute2 패키지를 추가했다는 항목이 있다. iproute2 패키지에서 ss 실행 파일만 추출해 PATH 에 추가하자 조회가 성공했다.
3. 원인 추적. `proc why :3000` 은 http.server 프로세스와 그 부모 프로세스를 트리로 보여 줬다.
4. 미리 보기. `proc kill :3000 --dry-run --json` 은 종료할 프로세스 1개를 JSON 으로 보여 줬다. 서버는 종료되지 않았다.
5. 오류. 사용하는 프로세스가 없는 포트를 지정하면 종료 코드 2 가 반환됐다. 잘못된 옵션, 범위를 벗어난 포트 번호, 잘못된 시그널 이름을 지정하면 4 가 반환됐다. 오류도 모두 JSON 으로 출력됐다. bash -c 로 `proc kill 'proc kill' --dry-run` 을 실행하자, 실행 명령에 `proc kill` 이 들어 있는 셸은 대상에서 제외됐다. 찾은 대상이 없어 종료 코드 2 가 반환됐다.
6. 확인 질문. 터미널에서 `proc free :3000` 을 실행하자 `[y/N]` 확인 질문이 출력됐다. 같은 명령에 `--json` 만 붙이자 확인 없이 프로세스를 종료했다. free 명령 문서에는 `--yes` 가 없으면 확인을 요청한다고 적혀 있다. 코드의 ask_confirm 함수는 `--json` 이면 확인을 건너뛴다.
7. 속도. 4코어 리눅스 컴퓨터에서 `proc on :3000 --json` 을 10번 실행했을 때 실제 경과 시간의 중앙값은 18 ms 였다. 같은 조건에서 `lsof -t -i :3000` 은 10 ms 였다.

README 에 적힌 JSON 출력 형식과 종료 코드는 권한 없음(3)을 제외하고 모두 확인됐다.

```
Kill 1 process to free 1 port? [y/N]
{
  "action": "free",
  "success": true,
  "results": [
    {
      "port": 3000,
      "freed": true
    }
  ]
}
```

## 확인하지 못한 것

- macOS 와 Windows. proc 은 macOS 에서는 lsof 로 포트를 조회한다. macOS 와 Windows 에서 같은 시험을 하자.
- 에이전트 스킬. `npx skills add yazeed/proc-cli` 로 스킬을 설치하고, Claude Code 가 포트를 점유한 프로세스를 종료할 때 `--dry-run` 을 먼저 실행하는지 확인하자.
- 권한 없음(종료 코드 3). 다른 사용자의 프로세스를 대상으로 시험하자.

## 판정

작동한다. 포트 조회, 미리 보기, 종료 명령이 JSON 과 종료 코드를 반환했다. 다만 `--json` 을 붙이면 free 명령 문서와 달리 확인 없이 프로세스를 종료했다. 코딩 에이전트가 개발 서버를 자주 실행하고 정리하는 경우에 써 볼 만하다. 프로세스를 종료하기 전에 사용자의 확인을 받아야 하는 경우라면, `--json` 을 붙였을 때 proc 이 확인을 요청하지 않으므로 이 프로덕트는 적합하지 않다.

### 용어

- Show HN: 개발자 커뮤니티 Hacker News 에서 자신이 만든 프로덕트를 소개하는 글. 제목이 "Show HN:"으로 시작한다.
- 에이전트 스킬: 코딩 에이전트가 특정 작업을 할 때 읽도록 만든 지침 파일. 언제 어떤 명령을 쓸지 작성해 둔다.
- ss: 리눅스에서 네트워크 소켓 정보를 출력하는 명령. 어떤 포트를 어떤 프로세스가 사용하는지 확인할 때 쓴다. iproute2 패키지에 들어 있다.

## English

## The problem

When a dev server prints "address already in use" and does not start, you have to find the process that is using the port and stop it. Coding agents do the same work. A Hacker News user said in a comment that Claude ran a command to find and kill processes by a name pattern. The pattern also matched the command, so the command killed itself first. This happened to them several times.

The maker’s README table compares proc with combinations of commands such as lsof and kill for each task. With `-i` and a port, lsof shows the process that uses that port, and with `-t` it prints only process IDs. To use the port again, you find the process ID with lsof and pass it to kill. Then you run lsof again to check that nothing uses the port.

## How it solves it

proc was posted as a Show HN on October 26, 2026. You pick the target by port (`:3000`), PID, name or file path. `proc free :3000` stops the process on that port and then checks that the port is free. `proc why :3000` shows the process on the port and its parent processes. When proc finds targets by name, it leaves out its own process and its parent processes, such as the shell that ran it.

With `--json`, it returns the result as JSON. Every command also returns one of five exit codes. The repository also has an agent skill file that teaches coding agents such as Claude Code and Codex how to use proc.

## What is different

The first difference is how you read the result. By default lsof prints a table for people, and `-t` or `-F` switch it to a format that other programs can read. With `--json`, every proc command prints one JSON document, and every document has fields named action and success. It returns exit code 2 when it finds no target and 4 for invalid input. So an agent can decide what to do next from the exit code, without parsing the output. The tradeoff is that proc is one more thing to install, and on Linux it needs the ss command for port lookups.

The second difference is how you check before a kill. A command that pipes lsof into kill stops the process as soon as it runs. proc’s `--dry-run` shows the processes it would stop and stops nothing. When a person runs `proc kill` or `proc free` in a terminal, proc asks for confirmation. But with `--json`, it stops the process without asking, even without `--yes`. In the skill file for agents, the maker says to always pass `--yes` to destructive commands. This instruction suggests that proc asks for confirmation without `--yes`, even with `--json`.

## How it was built

- The repository has 145 commits, from January 8 to October 25, 2026. The v1.0.0 commit on January 12 is titled "The process manager for humans". The JSON error format and the agent skill were added in v1.10.0 on March 24.
- 109 commits have a Co-authored-by trailer for Claude.
- The src directory has 8,264 lines of Rust. The test file `tests/cli_json.rs`, which checks the JSON output, has 571 lines.

## Running it

I cloned the repository and built it from source. I tested it against Python’s http.server on port 3000.

1. Build. `cargo build --release` took 1 minute 10 seconds. The binary is 2.4 MB.
2. Port lookup. `proc on :3000` failed with `Port lookups on Linux need ss`. This computer had lsof but not ss. The install section of the README does not mention this. Only the changelog has an entry that adds the iproute2 package to the Docker image. That package includes ss. I extracted only ss from the iproute2 package and added it to PATH. The lookup then worked.
3. Tracing the cause. `proc why :3000` showed the http.server process and its parent processes as a tree.
4. Preview. `proc kill :3000 --dry-run --json` printed JSON with 1 process to stop. The server kept running.
5. Errors. A port with nothing on it returned exit code 2. proc returned exit code 4 for an invalid flag, an out-of-range port or an unknown signal name. All errors were printed as JSON. I ran `proc kill 'proc kill' --dry-run` through bash -c. proc skipped the shell whose command line contained `proc kill`. It found no target and returned exit code 2.
6. Confirmation. In a terminal, `proc free :3000` asked `[y/N]`. With only `--json` added, the same command stopped the process without asking. The docs for free say it asks for confirmation unless `--yes` is given. The ask_confirm function in the code skips the confirmation with `--json`.
7. Speed. On a 4-core Linux computer, I ran `proc on :3000 --json` 10 times. The median wall-clock time was 18 ms. `lsof -t -i :3000` took 10 ms under the same conditions.

The README’s description of JSON output and exit codes was correct. I did not test exit code 3 (permission denied).

```
Kill 1 process to free 1 port? [y/N]
{
  "action": "free",
  "success": true,
  "results": [
    {
      "port": 3000,
      "freed": true
    }
  ]
}
```

## Not checked

- macOS and Windows. proc uses lsof for port lookups on macOS. Run the same tests on macOS and Windows.
- The agent skill. Install the agent skill with `npx skills add yazeed/proc-cli` and check whether Claude Code uses `--dry-run` first when it stops the process on a port.
- Permission denied (exit code 3). Test it on a process owned by another user.

## Verdict

It works. The lookup, preview and stop commands returned JSON and exit codes. But with `--json`, proc stopped processes without asking. The docs for `proc free` say it asks for confirmation. It is worth trying if a coding agent often starts and cleans up dev servers. proc is not a good fit if a person must confirm before each kill.

### Terms

- Show HN: A post on Hacker News, a developer community, in which someone presents what they made. Its title starts with "Show HN:".
- agent skill: A file of instructions that a coding agent reads for a certain task. It says when to use which commands.
- ss: A Linux command that prints network socket information, such as which process uses which port. It ships in the iproute2 package.

## Launches the same day

- TitleArt <https://titleart.dvy.io/> (Show HN, 383): WordArt 재현. 1990년대 후반의 WordArt 스타일로 글자를 꾸민다.
- Freehire <https://freehire.me/> (Show HN, 27): 구인 공고 검색. 기업 채용 페이지에서 기술직 공고 300만 개 이상을 모아 보여 준다고 소개한다.
- proc <https://proc-cli.com/> (Show HN, 18): 프로세스 관리 CLI. 포트나 이름으로 프로세스를 찾아 종료하고, 결과를 JSON 으로 반환한다.
- Glider 4.0 Web Edition <https://dbohdan.github.io/glider/> (Show HN, 12): 고전 Mac 게임의 비공식 웹 이식판. Glider 4.0 을 브라우저에서 플레이한다.
- RainbowSay <https://rainbowsay.ai/> (Show HN, 11): 언어 학습 서비스. 좋아하는 영상으로 언어를 익힌다고 소개한다.
- StealMyBitcoin-PoC <https://github.com/KillaBoi/StealMyBitcoin-PoC> (GitHub, 798): 해킹 도전 과제 풀이. Steal My Bitcoin 의 PHP 취약점 공격 과정을 파이썬 파일 하나로 재현한다.
- digital-human-koubo <https://github.com/andyhuo520/digital-human-koubo> (GitHub, 619): 디지털 휴먼 영상 스킬. 사진 한 장으로 말하는 인물 영상을 만든다고 소개한다.
- GEOInflow <https://github.com/yaojingang/GEOInflow> (GitHub, 319): 방문 분석 도구. AI 크롤러의 방문과 AI 검색에서 온 유입을 직접 운영하는 서버에서 집계한다.
- Strawberry 1.0 <https://www.producthunt.com/products/strawberry> (Product Hunt, 258): AI 브라우저. 팀이 매주 100시간 넘게 아낀다고 소개한다.
- SurgePix <https://www.producthunt.com/products/surgepix> (Product Hunt, 210): 이미지 생성 도구. 레이어마다 편집할 수 있고 에이전트가 호출할 수 있다고 소개한다.
- MiniMax M3.1 Flash <https://www.producthunt.com/products/minimax-4> (Product Hunt, 165): 언어 모델. 에이전트용으로 3배 빠르고 70% 저렴하다고 소개한다.

## Getting started

- Steps: cargo build --release ; target/release/proc on :3000 --json
- Needs: Rust(소스 빌드), 또는 Homebrew, npm, Scoop 같은 패키지 관리자, 리눅스에서 포트를 조회하려면 iproute2 의 ss 명령
- Cost: MIT, 무료.
- Note: --json 을 붙이면 kill, free 같은 명령도 확인 없이 실행된다. 먼저 --dry-run 으로 종료할 프로세스를 확인한다.
