About this project
guessit-js is a TypeScript port of the Python guessit library for extracting metadata from media filenames. It detects 50 properties including title, year, season, episode, resolution, codec, language, streaming service, release group, and more.
Key capabilities:
- 100% compatibility with Python guessit 4.4.0 (1342/1342 fixtures passing)
- 3.5x faster than Python (~4.4ms vs ~15.5ms per parse on Node.js)
- 50 detected properties with a machine-readable JSON Schema
- CLI with same flags as Python guessit, plus extras like --serve for REST API, --benchmark, and shell completion
- REST API server (npx guessit-js --serve)
- WASM build via Javy/QuickJS for non-JS environments (bit-identical to JS)
- Dual ESM and CommonJS support
- Full TypeScript type definitions with enum'd value fields
- Single dependency (rebulk-js)
- Auto-loads user config from ~/.guessit/options.json
The project fixes 32 historical upstream bugs from Python guessit and correctly handles cases the Python version still gets wrong, such as short titles (X2), fullwidth CJK characters, anime compound dash titles, and UFC event numbers. The CLI is a drop-in replacement for the Python guessit command.
A hosted demo and REST API are available for testing, and the project ships a JSON Schema draft-07 for result validation and client generation in other languages.
Comments
0 Rating appears after 10 ratings
Sign in to join the discussion.