A Go tool that fetches the newest open PRs from projectdiscovery/nuclei-templates, downloads the new template files and sorts them into category folders — ready to drop into your nuclei template directory.
Based on tr3ss/newclei (MIT), extended with downloading, categorization, incremental re-runs, rate-limit handling and a run manifest.
go install -v github.com/mohammadsec/newclei@latest
❯ newclei -h
Usage of newclei:
-all-files
- Download non-YAML files too
-api string
- GitHub API base URL (default "https://api.github.com")
-cves
- Only CVE templates
-limit int
- Max files to download (0 = unlimited)
-out string
- Output directory (default "newclei-out")
-overwrite
- Re-download files that already exist
-prs int
- Max PRs to scan (0 = all open PRs)
-token string
- GitHub token (falls back to $GITHUB_TOKEN, then git credential store)
-urls
- Only print raw file URLs (original newclei behavior)
-workers int
- Parallel download workers (default 6)
# Full run: everything new from all open PRs (token auto-read from git credential store)
newclei -out ~/nuclei-templates-new
# Only CVEs from the 30 newest PRs
newclei -cves -prs 30 -out ~/new-cves
# Merge into your nuclei template dir (files keep upstream paths)
newclei -out ~/nuclei-templatesnewclei-out/
├── cves/2026/CVE-2026-6377.yaml # CVE templates, sorted by year
├── cves/2020/CVE-2020-11991.yaml
├── http/exposed-panels/... # non-CVE keeps upstream structure
├── http/technologies/...
├── network/detection/...
├── manifest.json # per-file: PR, category, result, raw URL
└── SUMMARY.md # run summary + category table + PR list
- Re-running is safe: existing files are skipped (
=in output); use-overwriteto refresh. - Handles GitHub rate limits (honors
Retry-After, backs off). Token resolution order:-tokenflag →$GITHUB_TOKEN→ git credential store (60 → 5000 req/h). A token is recommended for full runs. - Filenames are sanitized (no path traversal);
removedfiles and non-YAML assets are skipped unless-all-files.
MIT — original tool by tr3ss.