2 releases
Uses new Rust 2024
| 0.1.1 | Dec 8, 2025 |
|---|---|
| 0.1.0 | Dec 8, 2025 |
#332 in Debugging
88KB
1K
SLoC
Deterministic crates.io name finder with an interactive CLI.
Stream candidate crate names in order, filter with curated dictionaries, and stop when you have enough available hits.
Installation • Features • Usage • Dictionary • Workspace • Development • Flags • Behavior
Installation
[!NOTE] The workspace targets Rust
1.88+(edition 2024). Install with the commands below when hacking locally.
cargo install name
# Install directly from the workspace while iterating.
cargo install --path bin/name
# Build a release binary when you need artifacts.
cargo build --release -p name
Usage
Run the CLI to scan for available crate names with streaming output.
By default, name uses 3-5 chars, stopping after 10 available.
name
To parallelize searches, you can pass the --parallel flag.
name --min-len 3 --max-len 6 --limit 25 --parallel
name shuffles candidate names by default to avoid repetitive searches.
For an alphabetical deterministic scan, use the --alphabetical flag.
name --alphabetical --limit 50
Features
- Interactive prompts for length bounds and available-cap defaults (3–5 characters, stop after 10 available) when flags are missing.
- Deterministic generator that walks length buckets, shuffles (optionally seeded), and can enforce prefix/suffix filters before hitting crates.io.
- Embedded dictionary blending ~20k words with curated short names; swap in names-only, words-only, or custom files.
- Configurable caps for total candidates scanned and available results returned; stops early once the available cap is hit.
- Bounded parallel crates.io checks with ordered streaming output, colored summaries, and a graceful Ctrl+C path.
CRATES_IO_BASE_URLoverride keeps integration tests and local mocks off the real registry.
Dictionary
Use the embedded data or bring your own newline-delimited list:
# Names-only or words-only from the embedded sets.
name --names-only
name --words-only
# Custom dictionary file filtered to your length bounds.
name --dictionary ./my_words.txt --no-limit
[!TIP] The generator preserves ordered output even when
--parallelis enabled. For reproducible scans, keep--alphabeticalenabled or wire in a fixed shuffle seed via the library API.
Workspace
.
├── Cargo.toml # Workspace, lint, and profile configuration
├── Justfile # Developer commands (build, test, lint)
├── bin/
│ └── name/ # User-facing CLI crate
└── crates/ # Shared libraries for CLI parsing, dictionary data, generator, and crates.io client
bin/name: Streams available names with colored output, ordered results, and verbose logging when enabled.crates/cli: Clap-based flag parsing plus interactive prompts that build aGeneratorConfig.crates/generator(name-forge): Core engine that filters, shuffles (optionally seeded), and checks candidates sequentially or in parallel.crates/dictionary: Embedded word/name data with iterators grouped by length for deterministic scans.crates/crates-io-client: Minimal reqwest client for existence checks and metadata fetches against crates.io or a mock registry.
Development
just testruns the suite with nextest (installs if missing).just check-format/just check-clippy/just check-docsenforce formatting, lints, and docs.just check-udepschecks for unused dependencies (nightly + cargo-udeps).just build-all-targetsorcargo buildfor local builds.
Flags
--min-len <N>/--max-len <N>: inclusive length bounds (prompted if omitted).--limit <N>: stop after N available names (defaults to 10);--no-limitdisables this cap.--parallel: enable bounded parallel crates.io checks while keeping ordered output.--alphabetical: disable shuffling for deterministic lexicographic scans (shuffle is default).--dictionary <path>: newline-delimited override for the embedded dictionary.--names-only/--words-only: restrict to embedded names or words; otherwise both are used.--verbose: enable tracing logs to stderr.
Behavior
- Streams available names immediately with colored output and crates.io links, then prints a summary of checked/available/taken/error counts.
- Honors
CRATES_IO_BASE_URL(defaults tohttps://crates.io), useful for pointing at mocks in tests. - Exits cleanly on Ctrl+C.
License
This codebase is MIT licensed; see LICENSE.
Dependencies
~17–36MB
~412K SLoC