npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@kirbysayshi/idier

v1.1.4

Published

Make your projects folder tidier

Downloads

11

Readme

Idier: Make your projects folder tidier

Background on why this tool exists.

Idier is a tool that moves top-level folders into a specially named folder called _Archive if the files in those folders have not been modified recently.

This tool is meant to automatically tidy up your "projects folder": that bucket of folders probably everyone has. Perhaps you produce music and have a folder with all of your song projects. Or a coder with lots of git repos. Or folders for each of your graphic design clients. Using this tool will reduce the clutter and decision making process.

How Does It Work?

Given a root folder (defaults to current working directory), look at all the files and their relative mtimes (days since last modified). Group them all into top-level folders, taking the newest mtime of all the children per folder. If the newest relative mtime is more than the configured number of days (defaults to 180 days), then move the folder into the configured archive folder (defaults to _Archive). It ignores bare files without a folder, as well as some typical non-user files, like .git or node_modules.

Usage

An example is probably better than words:

$ ls
drwxr-xr-x   16 drew  staff   512B Jan  8 23:14 .
drwxr-xr-x+ 138 drew  staff   4.3K Jan  4 23:33 ..
-rw-r--r--@   1 drew  staff    22K Jan  8 23:03 .DS_Store
drwxr-xr-x  161 drew  staff   5.0K Jan  8 23:14 _Archive
drwxr-xr-x   14 drew  staff   448B May 12  2019 project01
drwxr-xr-x   17 drew  staff   544B Jul 14 23:10 project02
drwxr-xr-x   19 drew  staff   608B Oct  5 20:09 project03
drwxr-xr-x   13 drew  staff   416B Oct 17  2010 project04
drwxr-xr-x@  14 drew  staff   448B Jul 24 21:33 project05
drwxr-xr-x@  18 drew  staff   576B Sep  2 19:45 project06
drwxr-xr-x   14 drew  staff   448B Jan  3 00:18 project07
drwxr-xr-x    9 drew  staff   288B Jan  4 17:19 project08
drwxr-xr-x@  26 drew  staff   832B Oct 27 16:59 project09
drwxr-xr-x   14 drew  staff   448B Jan  7 02:23 project10
$ npx @kirbysayshi/idier
Analyzed 1221 files in 10 projects in 00m00s150ms

Projects untouched for more than 180 days:
  project01 (241 days ago) -> WILL ARCHIVE

Archive above projects? y/N: y
moving /Users/drew/Projects/project01 -> /Users/drew/Projects/_Archive/project01

By default, an "untouched" project is one unmodified for more than 180 days. This is configurable, along with other options:

$ npx @kirbysayshi/idier

idier: Move projects untouched for more than 180 days to /Users/drew/Projects/_Archive!

Options:
  --age [days]          Archive projects if files have been untouched for this many days
                          (current: 180)
  --root [path]         Use this directory as the root for project folders
                          (current: /Users/drew/Projects/)
  --archive [path]      Use this directory as the Archive folder
                          (current: /Users/drew/Projects/_Archive)
  --yes / -y            Do not prompt the user to confirm the archive.
                          (current: false)
  --projects            Print the list of projects and their ages, then exit.
                          (current: false)

Contributing / Development

This project uses @spotify/web-scripts for build, test, lint, auto-format, and release.

Use yarn commit so that semantic-release knows when to release during master builds!

LICENSE

MIT