All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
--source web|apiflag to filter predictions by how they were created (web predictions are kept indefinitely by Replicate; API prediction data is deleted after ~1 hour)- Concurrent downloads with a bounded pool (
downloadConcurrency, default 4) — large archives download several times faster - Extension fallback via the response
Content-Typeheader for extensionless output URLs (no more hostname-garbage extensions)
- Outputs nested inside objects (e.g.
{images: [...]}) are now downloaded; previously these predictions silently produced no files - Failed downloads (404/403/expired URLs) now error cleanly instead of saving the error response body as the output file
- Downloads follow redirects
- Reported file sizes are actual bytes written, not the (often missing) Content-Length header
- Removed the fixed 100ms delay between downloads (replaced by the bounded concurrency pool)
- Per-model status counts in the metadata export were broken (
successfulalways 0,succeeded: NaN); stats are now keyed by real API status values (succeeded/failed/canceled/etc.) - API errors (invalid token, rate limit, server errors) now fail loudly with status and detail instead of being silently reported as "No predictions found!"
--last-runstate is no longer saved when a fetch ends early due to an error, so interrupted runs can't silently skip predictions on the next incremental download; the watermark is now the fetch start time rather than end-of-run- LICENSE copyright holder restored in the published package (the 2.0.8 publish shipped without it)
- Date filtering now uses Replicate's documented
created_after/created_beforequery parameters, so filtering happens server-side (the client-side filter remains as a safety net) - Authentication uses the documented
Authorization: Bearerscheme (was the legacyTokenscheme) - README documents Replicate's actual data retention policy: API predictions are removed after one hour by default; web predictions are kept indefinitely
- Author credit updated to Hunter Shokrian
- Test suite (
npm test, zero new dependencies vianode:test) covering metadata stats, date filter params, auth/error handling, and incremental-state safety
- Main module check now works when invoked via relative paths
- LICENSE copyright holder updated to closestfriend
- Fixed dependency vulnerabilities (glob, js-yaml)
- Updated archiver to v7.0.1 to fix deprecated dependency warnings
- Version display now reads from package.json dynamically
- CLI
binmappings (replicate-downloader,replicate-predictions-downloader) with shebang, so the tool works vianpxand global install
- Clarified installation methods and usage instructions in README
- Relative date parsing: "yesterday", "N minutes/hours/days/weeks/months/years ago"
- Client-side date filtering and early-stop pagination when bounds met
- ESLint v9 flat config with scripts (
lint,lint:fix)
- Improved README and internal examples; underscore convention for intentionally-unused variables
- Ensure state file and outputs remain gitignored
- Complete rewrite with Commander.js CLI interface
- Date filtering with
--since,--until, and--last-runoptions - State tracking to prevent duplicate downloads
- Flexible date parsing (ISO dates, relative dates, natural language)
- Enhanced metadata collection and storage
- ZIP archive creation for organized storage
- Comprehensive CLI help and version commands
- Progress tracking and detailed statistics
- Intelligent filename generation from prompts
- Breaking: Command-line interface completely redesigned
- Breaking: Output structure now organized by model and date
- Breaking: Requires Node.js 18+ (was 16+)
- Improved error handling and retry logic
- Better file organization and naming conventions
- Enhanced logging and user feedback
- Breaking: Old command-line arguments no longer supported
- Legacy configuration options
- Rate limiting issues with Replicate API
- File naming conflicts and special character handling
- Memory usage optimization for large prediction sets
- Duplicate download prevention
- Basic prediction downloading
- Simple file organization
- Manual duplicate management
# Old v1.x usage
node script.js
# New v2.0 usage
node index.js
npm start
node index.js --since "2024-01-01"
node index.js --last-run- Use
--last-runfor daily/regular downloads - Try
--since "1 week ago"for recent predictions - Check the new organized output structure
- Explore enhanced metadata files
- Review the CONFIG object in
index.jsfor new options - Set up
.envfile for API token (recommended) - Note the new
.replicate-downloader-state.jsonstate file
For detailed usage instructions, see the README.md.