Skip to content

Latest commit

 

History

12 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

wordlist-cli

A fast CLI tool for extracting and analyzing word frequency statistics from files.

Features

  • Multiple file input support
  • Recursive directory scanning
  • Configurable sorting (none / asc / desc)
  • Output formats: plain text and JSON
  • Fast and lightweight

Installation

From source

cargo build --release

Binary will be in:

./target/release/wordlist-cli

Usage

wordlist-cli [OPTIONS] <PATHS>...

Basic example

wordlist-cli file.txt

Multiple files

wordlist-cli file1.txt file2.txt file3.txt

Recursive directory scan

wordlist-cli ./docs --recursive

Options

-o, --output <OUTPUT>
      Output file path

--output-format <OUTPUT_FORMAT>
      Output format (default: txt)
      Possible values: txt, json

-r, --recursive
      Scan directories recursively

--sort <SORT>
      Sort order (default: desc)
      Possible values: none, asc, desc

-h, --help
      Print help

-V, --version
      Print version

Sorting behavior

Mode Description
none No ordering guarantee
asc Lowest frequency → highest
desc Highest frequency → lowest

Tie-breaker: alphabetical order of the word.

Output formats

TXT (default)

word 42
example 15
rust 10

JSON

[
  { "word": "the", "frequency": 68068 },
  { "word": "to", "frequency": 41559 },
  { "word": "a", "frequency": 28997 },
]

Example workflows

Top words in a file

wordlist-cli text.txt --sort desc

Export as JSON

wordlist-cli text.txt --output-format json -o result

To generate result.json

Scan a directory

wordlist-cli ./notes -r --sort asc

License

MIT license

About

Wordlist tool written in rust (toy tool currently)

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages