foundry icon indicating copy to clipboard operation
foundry copied to clipboard

feat: add support to utility feature like npkill to remove `/libs` dependencies in a non-destructive way

Open StErMi opened this issue 6 months ago • 2 comments

Component

Forge

Describe the feature you would like

I'm a security researcher, and so I have tons of local projects that I usually never delete because they are an important snapshot that needs to be "archived" locally.

99% of those projects are "inactive" and would be nice to have a tool like npkill that allows me to

  • do what npkill is already doing, removing node_modules
  • remove all the /libs dependencies that have been installed via forge install

Basically, what I want is something identically to npkill but with the addition of removing /libs dependencies in a nondestructive way (you still need to be able to come later and do a forge install). The tools would have to be able to look at all the folders that contain a foundry.toml file in the root folder and ask if you want to delete those libs dependencies.

Additional context

No response

StErMi avatar Jun 10 '25 06:06 StErMi

Hi @StErMi thanks for your suggestion

In my opinion this is out of scope for Foundry and I'm hesitant to implement a tool that has the ability to delete directories. This should be largely achievable through existing git commands or custom bash scripts.

What do you think @grandizzy

zerosnacks avatar Jun 13 '25 14:06 zerosnacks

Hi @StErMi thanks for your suggestion

In my opinion this is out of scope for Foundry and I'm hesitant to implement a tool that has the ability to delete directories. This should be largely achievable through existing git commands or custom bash scripts.

What do you think @grandizzy

Yep, I agree, I also feel is better to be handled from outside

grandizzy avatar Jun 13 '25 20:06 grandizzy

Closing as not planned per discussion above - thanks for your suggestion!

zerosnacks avatar Jun 17 '25 10:06 zerosnacks