Git Product home page Git Product logo

gruyere's Introduction

gruyere 🧀

All Contributors

A tiny (and pretty) program for viewing + killing ports.

I created this program so that I could stop trying to remember the command and all the right flags to view processes on listening ports. This program really just wraps lsof -i -P -n -sTCP:LISTEN to get the processes and their PIDs. You can select a process and also kill it using the TUI. The process list has filtering enabled as well (useful if you've got a lot going on; just hit / and search by port or PID).

It's called "gruyere" because ports reminded me of holes and gruyere is a cheese with many holes! 🧀

gruyere makes use of the wonderful Charm libraries:

Installation

You can install the appropriate binary for your operating system by visiting the Releases page.

Contributing

Contributions are welcome! To get started, check out the contributing guidelines.

Contributors

A big thank you to these wonderful humans for their contributions!

whoop-t
whoop-t

💻
bernie gray
bernie gray

💻
techygrrrl
techygrrrl

💻
Add your contributions

gruyere's People

Contributors

allcontributors[bot] avatar bfgray3 avatar savannahostrowski avatar techygrrrl avatar whoop-t avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

gruyere's Issues

Handle "no processes" case better

Right now, I just silence the error when there are no processes running. This is obviously a hack and should be properly handled.

[Bug] Wrong process is selected when filtered

This app works well for viewing ports. Unfortunately I wasn't able to kill the process. It looks like the wrong port gets killed. I'm on macOS.

I'm not sure what's going but this is the output:


╭──────────────────────────────────────────────────────╮
│                                                      │
│    Are you sure you want to kill port Port :8081     │
│                       (81756)?                       │
│                                                      │
│             Yes        No, take me back              │
│                                                      │
╰──────────────────────────────────────────────────────╯


2023/05/01 21:47:12 FATA error Killing process: 72800 (int value = 72800)

When I run greyere, I notice the first item is pid 72800 so I don't know if navigating is working correctly while filtering. This is visible in the first split second of the GIF.

Also, when I go through my lengthy list of processes and find the one I want to kill (port 8081 with pid 81756), when I hit enter, it logs the correct pid.

So the bug looks like it occurs only when filtering.

gruyere kills random port

This is some code I added for logging. I also added a test to see if I can kill processes on my machine from Go and it works: main...techygrrrl:gruyere:bug-wrong-pid

Test mouse navigation on WSL

I was seeing some sporadic issues where ports weren't clickable. I can't reliably repro.

Mousewheel scroll and button click on the confirmation screen seem to be functioning correctly.

Windows support

Right now, this only works on Linux/Mac. Might be nice to support Windows machines as well.

go install @latest fails

Can't install using go install github.com/savannahostrowski/gruyere@latest ;/
Getting:
module declares its path as: gruyere but was required as: github.com/savannahostrowski/gruyere error.

Show ports used by Docker containers

Currently Gruyere doesn't show ports occupied by processes running from within Docker (e.g.) containers. It would be nice if it could show them (by container name, e.g.), even if shutting them down is too fraught.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.