Skip to content

Tomosius/repo_checker

Repository files navigation

repo_checker

Check name availability across package registries and platforms. Supports two modes:

  • Bash script — zero dependencies, runs anywhere (curl + jq only)
  • Python script — parallel, configurable engines, JSON/CSV output

Quick Start — Bash (recommended)

No installation needed. Requires curl and jq.

# Check a list of names against PyPI, Homebrew, and GitHub
./check-names.sh names.csv results.csv

# With GitHub token to avoid rate limits (recommended)
export GITHUB_TOKEN=ghp_your_token_here
./check-names.sh names.csv results.csv

Input file: CSV with a name header column, or plain text (one name per line).

Output: CSV with name,pypi,homebrew,githubTrue = taken, False = available.

At the end, prints a summary of names available on all three platforms:

=== Available on ALL 3 (PyPI + Homebrew + GitHub) ===
  ✓ mycoolname
  ✓ anothercandidate

Quick Start — Python (advanced)

For parallel checking across all 9 platforms with custom engines config.

# Install dependency
pip install pyyaml
# or: uv run --with pyyaml python main.py ...

# Run against all platforms (engines.yaml)
python main.py --in names.csv --out results.csv --print

# Run against 3 platforms only (engines-3.yaml)
python main.py --in names.csv --out results.csv --engines engines-3.yaml --print

Options

Flag Default Description
--in required Input CSV with names
--out required Output file path
--format csv Output format: csv or json
--workers 6 (20 with token) Max parallel threads
--print off Print results to stdout as they complete
--engines engines.yaml Path to engines config

Engine Configs

File Platforms
engines.yaml All 9: PyPI, Homebrew, Homebrew Cask, npm, crates.io, RubyGems, conda-forge, Anaconda, GitHub
engines-3.yaml 3 only: PyPI, Homebrew, GitHub

Adding New Engines

Edit engines.yaml. Three check types supported:

# Type 1: HTTP status check (simplest)
- id: my_registry
  label: My Registry
  url: "https://registry.example.com/packages/{q}"
  exists:
    kind: status_is
    code: 200

# Type 2: JSON field equality
- id: my_api
  label: My API
  url: "https://api.example.com/search?q={q}"
  exists:
    kind: json_any_eq
    path: "$[*].name"
    normalize:
      to_lower: true

# Type 3: JSON multi-field match
- id: my_filtered_api
  label: My Filtered API
  url: "https://api.example.com/search?q={q}"
  exists:
    kind: json_any_match
    where:
      - path: "$[*].name"
        equals: "{q}"
      - path: "$[*].channel"
        equals: "stable"

Optional engine features: headers, throttle (rate limiting), result (extract counts and URLs).


GitHub Rate Limits

Without a token: 10 requests/minute (auto-throttled). With a token: no practical limit.

export GITHUB_TOKEN=ghp_your_token_here

Output Format

True = name is taken, False = name is available.

name,pypi,homebrew,github
myproject,True,False,False
coolname,False,False,False

License

MIT

About

Check name availability on PyPI, Homebrew, GitHub and more. Zero-dependency bash script + parallel Python checker. Config-driven, extensible.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors