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 🙏

© 2026 – Pkg Stats / Ryan Hefner

twin-scanner-cli

v2.0.165

Published

Find duplicate files in multiple folders scanning .txt and .torrent files.

Readme

Twin scanner CLI

Description

  • Find duplicate files in multiple folder(s) scanning .txt or/and .torrent files and depending on the selected mode (readonly: true | false) get information about duplicated files /+ extract them into new folders.
  • Repo is implemented with emphasis on functional programming paradigm (where it's possible / adequate). The repository has undergone several major refactorings (though with minor changes to functionality). To track down this refactoring check the following branches, increasing the amount of functional code:
    1. original — imperative code
    2. refactor/functional-eslint — fullfilling eslint-plugin-functional
    3. refactor/fp-ts — huge refactoring rewriting main codebase to FP-TS

Technical Stack

Features

  • Nested scanning in one/multi folders to get info about files
  • Interactive CLI with step-by-step configuration and autocomplete for path selection
  • Supporting only .txt, .torrent file scanning or both formats simultaneously to find duplicates between multiple folders
  • Supporting readonly mode for casual listing info about duplicates without extraction them
  • Supporting of removing duplicates not only between cross folders, but into the same folder as well f.e:
    • For .torrent files: [ "cat.torrent", "cat (1).torrent", "cat (19).torrent"] => ["cat.torrent"]
    • For .txt files: remove equal and duplicate (by analogy with torrent file names logic) lines from .txt file
  • Supporting opportunity to define own custom mapper between torrent file name ([rutracker.org].3021606.torrent) and URL to torrent file locating in some txt file (https://rutracker.org/forum/viewtopic.php?t=3021606). It is assumed that text files contain only links to torrent files from which they can be downloaded, and there is a way to establish (to map) a correspondence between the name of the torrent file and the link to download it. It is also assumed that the link to the torrent file in any of the text files is redundant (duplicate) and there is no need to store information about it in this file if the torrent file that can be downloaded from this link is already stored in one of the user's folders — in this case, such a link is a duplicate and will be deleted from an original text file while the program is running in readonly: false mode.

DX features

Documentation

  • By default initial root folder for searching target folder(s) is defined as combination of first 2 subpaths to folder with cloned repository. F.e you have cloned repo in /home/username/projects/twin-scanner-cli, in such case initial root folder will be set as /home/username

Demo

  1. Setup configuration via CLI and its output: Demo

  2. Result (on the image is described file structure before and after applying CLI): Demo

Example of manual configuration

  • Setting VITE_APP_TORRENT_URL=https://rutracker.org/forum/viewtopic.php means that:

    • line in txt file https://rutracker.org/forum/viewtopic.php?t=3021606 and torrent file [rutracker.org].3021606.torrent will be considered the same during deduplication process
  • For overriding default mapper between torrent file and URL to torrent file, change extractTorrentFileNameFromURL, convertTorrentFilenameToURL functions and rebuild app.

Graph dependencies

  • Top-level
    • SVG
  • All code
    • All code

Pre-requisites

  • Linux-based OS
  • Node.js (checked on v20.15.1)
  • pnpm

Quick start

  1. Clone actual version of app (or only last version of app) on the same disk where is located folder(s) with duplicate files:
git clone https://github.com/Skippia/twin-scanner-cli.git
git clone --depth 1 https://github.com/Skippia/twin-scanner-cli.git
  1. Install dependencies
cd ./twin-scanner-cli && pnpm i
  1. Set env (url) for mapping between torrent name and torrent URL in txt files
    • Rename .env.example -> .env
    • Update env variable(s)
  2. Build project
npm run build
  1. Run project
npm run start:prod