awesome-cli-apps icon indicating copy to clipboard operation
awesome-cli-apps copied to clipboard

Add Autarky

Open pranshuchittora opened this issue 3 years ago • 8 comments

New App Submission

Repo or homepage link: Autarky -> https://github.com/pranshuchittora/autarky

Description: Removes old node_modules at ease.

Why you think it's awesome:

Featured In :point_down:

  • https://nodeweekly.com/issues/315
  • https://twitter.com/JavaScriptDaily/status/1198689493559234561

pranshuchittora avatar Dec 11 '20 23:12 pranshuchittora

Can just be done in a simple script:

touch -t 2003011200 some_file
find ~ -name "node_modules" ! -newer some_file -exec sh -c 'echo removing $1; rm "$1"' sh {} ';'

see

jneidel avatar Dec 12 '20 22:12 jneidel

Hi, @jneidel I completely agree. But generating timestamps is not that intuitive and this removes all such dirs but with Autarky you can select only those you want to delete. And this works only with UNIX based system as windows don't support bash scripting out of the box.

pranshuchittora avatar Dec 12 '20 22:12 pranshuchittora

From readme

the majority of the storage is occupied by node_modules

If this is your problem, you are fixing the symptom not the root cause. Migrating to pnpm (shared storage for dependencies) would be a better solution (in my eyes).

jneidel avatar Dec 12 '20 22:12 jneidel

Found a few spelling mistakes:

Enter the time in months. Node modules older than the given time will be sowed.

*showed

In today's world storage is comparatively costlier than compute.

*computation.

And there probably are lots more.

jneidel avatar Dec 12 '20 22:12 jneidel

generating timestamps is not that intuitive and this removes all such dirs

Just write a small wrapper script around it that takes easier to read date input and confirms deletion.

this works only with UNIX based system as windows

People on windows aren't using CLIs, otherwise they wouldn't be using windows.

jneidel avatar Dec 12 '20 22:12 jneidel

Found a few spelling mistakes:

Enter the time in months. Node modules older than the given time will be sowed.

*showed

In today's world storage is comparatively costlier than compute.

*computation.

And there probably are lots more.

Will fix that. Thanks

pranshuchittora avatar Dec 12 '20 22:12 pranshuchittora

From readme

the majority of the storage is occupied by node_modules

If this is your problem, you are fixing the symptom, not the root cause. Migrating to pnpm (shared storage for dependencies) would be a better solution (in my eyes).

True. But not all have migrated to pnpm.

pranshuchittora avatar Dec 12 '20 22:12 pranshuchittora

Just write a small wrapper script around it that takes easier to read date input and confirms deletion.

The idea is to solve this for others

People on windows aren't using CLIs, otherwise they wouldn't be using windows.

Can't comment on that :)

pranshuchittora avatar Dec 12 '20 22:12 pranshuchittora