For the hashing function, you need to install b3sum
and xxh128sum
. In order
to extract exif information from images and videos, you need to install
exiftool
.
On a Mac, this can be achieved with brew install b3sum xxhash exiftool
.
$ npm install -g fs-indexer
$ fs-indexer COMMAND
running command...
$ fs-indexer (--version)
fs-indexer/0.0.7 darwin-arm64 node-v22.0.0
$ fs-indexer --help [COMMAND]
USAGE
$ fs-indexer COMMAND
...
fs-indexer crawl PATH
fs-indexer help [COMMAND]
fs-indexer info
fs-indexer lookup PATH
fs-indexer verify PATH
index the folder provided
USAGE
$ fs-indexer crawl PATH [-d <value>] [-a BLAKE3|XXHASH] [--exif] [-l <value>] [-m <value>] [--debug]
FLAGS
-a, --hashingAlgorithms=<option>... hashing algorithms to use
<options: BLAKE3|XXHASH>
-d, --database=<value> [default: fs-index.db] database file
-l, --limit=<value> stop after indexing n files
-m, --minutes=<value> stop after n minutes
--debug enable debug logging
--exif extract exif data
DESCRIPTION
index the folder provided
See code: src/commands/crawl.ts
Display help for fs-indexer.
USAGE
$ fs-indexer help [COMMAND...] [-n]
ARGUMENTS
COMMAND... Command to show help for.
FLAGS
-n, --nested-commands Include all nested commands in the output.
DESCRIPTION
Display help for fs-indexer.
See code: @oclif/plugin-help
prints information about the database
USAGE
$ fs-indexer info [-d <value>] [--duplicates] [--debug]
FLAGS
-d, --database=<value> [default: fs-index.db] database file
--debug enable debug logging
--duplicates
DESCRIPTION
prints information about the database
See code: src/commands/info.ts
searches for files within the database
USAGE
$ fs-indexer lookup PATH [-d <value>] [--debug] [--remove] [--exif]
FLAGS
-d, --database=<value> [default: fs-index.db] database file
--debug enable debug logging
--exif look for files with similar exif date
--remove remove files if similar found in the index. Be careful with this flag. Only hashes are
compared, not the files content.
DESCRIPTION
searches for files within the database
See code: src/commands/lookup.ts
verifies that the content of the database is in sync with the file system
USAGE
$ fs-indexer verify PATH [-d <value>] [-a BLAKE3|XXHASH] [-l <value>] [-m <value>] [-p] [--debug]
FLAGS
-a, --hashingAlgorithms=<option>... hashing algorithms to use
<options: BLAKE3|XXHASH>
-d, --database=<value> [default: fs-index.db] database file
-l, --limit=<value> stop after indexing n files
-m, --minutes=<value> stop after n minutes
-p, --purge deletes files that do not exist anymore from the database
--debug enable debug logging
DESCRIPTION
verifies that the content of the database is in sync with the file system
See code: src/commands/verify.ts