A lightweight, simple alternative to Sonarr for automatically organizing TV show files. chiprr watches a directory for new video files and organizes them into a clean folder structure using hard links.
- π¬ Automatic TV Show Organization - Watches for new video files and organizes them into
Show Name/Season X/structure - π Hard Link Creation - Creates hard links instead of copying files, saving disk space
- π― Smart Episode Detection - Supports multiple naming formats (S01E01, 1x01, Cap.101, etc.)
- π TMDB Integration - Uses The Movie Database API to normalize and match show names
- π International Support - Handles diacritics and multiple language variations
- π Flexible Filename Parsing - Works with various release formats and naming conventions
- π« Ignore Files Support - Use
.chiprrignorefiles to exclude unwanted files and directories (gitignore syntax)
Sometimes you just want your files organized.
If you've ever felt that Sonarr is overkill for your needs, chiprr might be for you. Here's what makes it different:
With chiprr, you choose what to download and when. Use your favorite torrent client, download manager, or even copy files manually. chiprr doesn't care how the files get there - it just organizes them when they arrive.
No need to:
- Set up a web interface
- Configure quality profiles
- Manage indexers
- Track upcoming episodes
- Maintain a database
Just point chiprr at your download folder and your media library, and you're done.
Whether you:
- Manually select torrents based on specific encoders or quality
- Use RSS feeds from your favorite trackers
- Download from Usenet, DDL, or anywhere else
- Have someone else managing the downloads
chiprr simply watches and organizes. Your downloads, your rules.
chiprr organizes your files exactly how media servers expect them:
TV Shows/
βββ Breaking Bad/
β βββ Season 1/
β β βββ Breaking Bad S01E01.mkv
β β βββ Breaking Bad S01E02.mkv
β β βββ ...
β βββ Season 2/
β βββ ...
βββ Better Call Saul/
βββ ...
No complex setup, no metadata agents, no confusion. Just clean, organized files that any media server can understand.
chiprr is perfect if you:
- Already have a download workflow you're happy with
- Want to keep using your favorite torrent client
- Prefer to hand-pick your downloads
- Need something that "just works" without complex configuration
- Want your files organized for Jellyfin/Plex/Emby/Kodi
chiprr is not for you if you:
- Want fully automated downloading based on air dates
- Need complex quality upgrade rules
- Want to track your watching progress
- Prefer an all-in-one solution with web UI
# Clone the repository
git clone https://github.com/yourusername/chiprr.git
cd chiprr
# Install dependencies
npm install
# Build the project
npm run buildchiprr can be configured using command-line arguments or environment variables:
# Watch mode (continuous monitoring)
node main.js \
--input-directory /path/to/downloads \
--sorted-directory /path/to/organized/shows \
--tmdb-token your_tmdb_api_token \
--log-level debug \
--cache-file-path /app-cache/tmdb.json \
--replace-if-exists \
--mode watch
# Execute mode (one-time scan)
node main.js \
--input-directory /path/to/downloads \
--sorted-directory /path/to/organized/shows \
--tmdb-token your_tmdb_api_token \
--replace-if-exists \
--mode executeexport INPUT_DIRECTORY=/path/to/downloads
export SORTED_DIRECTORY=/path/to/organized/shows
export TMDB_TOKEN=your_tmdb_api_token
export LOG_LEVEL=info
export CACHE_FILE_PATH=/path/to/cache.json
export REPLACE_IF_EXISTS=true| Option | Short | Environment Variable | Description | Required |
|---|---|---|---|---|
--input-directory |
-i |
INPUT_DIRECTORY |
Directory to watch for new video files | Yes |
--sorted-directory |
-s |
SORTED_DIRECTORY |
Directory where organized files will be linked | Yes |
--tmdb-token |
-t |
TMDB_TOKEN |
TMDB API token for show name matching | Yes |
--replace-if-exists |
-f |
REPLACE_IF_EXISTS |
Replace destination file if it already exists | No (default: false) |
--mode |
-m |
- | Execution mode: watch (continuous) or execute (one-time scan) |
No (default: watch) |
--log-level |
-l |
LOG_LEVEL |
Logging level (error, warn, info, debug) | No (default: info) |
--cache-file-path |
-c |
CACHE_FILE_PATH |
Path to the cache for TMDB API requests | No (default: ./.cache/tmdb-cache.jsonl) |
- Visit The Movie Database
- Create an account or log in
- Go to Settings β API
- Request an API key (choose "Developer" for personal use)
- Copy your API Read Access Token (Bearer token)
Note: By default, a cache file will be created and it will be reused even if you restart the app. If you are using Docker, you may want to create a volume for this file.
chiprr supports two execution modes:
Continuously monitors the input directory for new files:
node main.js --mode watch
# or simply
node main.jsIn watch mode, chiprr will:
- Watch the input directory for new video files
- Parse the filename to extract show name, season, and episode
- Query TMDB to get the official show name
- Create a hard link in the sorted directory with a clean, consistent naming format
- Continue running and monitoring for new files
Performs a one-time scan and organization of all existing files:
node main.js --mode executeIn execute mode, chiprr will:
- Recursively scan the entire input directory for video files
- Process each video file found using the same logic as watch mode
- Report the number of successful and failed operations
- Exit once all files have been processed
This mode is useful for:
- Initial organization of an existing library
- Periodic cleanup runs (e.g., via cron job)
- Processing files that were added while chiprr was not running
Input file:
/downloads/Breaking.Bad.S01E03.720p.BluRay.x264-DEMAND.mkv
Output structure:
/sorted/Breaking Bad/Season 1/Breaking Bad S01E03.mkv
- mp4, avi, mov, wmv, webm, flv, m4v, mkv, vob, ts, 3gp, asf, divx
S01E01- Standard format1x01- Alternative formatCap.101- Spanish/Portuguese format (Capitulo)E01,Ep01- Episode only format
chiprr supports .chiprrignore files to exclude unwanted files and directories from processing. This feature uses gitignore syntax and works hierarchically.
Place a .chiprrignore file in any directory within your input directory. The ignore rules will apply to that directory and all its subdirectories.
An empty .chiprrignore file will ignore all files in that directory and its subdirectories:
# Create an empty .chiprrignore to ignore everything in this directory
touch /downloads/unwanted-show/.chiprrignoreA non-empty .chiprrignore file uses gitignore syntax to selectively ignore files:
# Ignore sample files
*sample*
*SAMPLE*
# Ignore subtitle files
*.srt
*.sub
*.ass
# Ignore NFO and metadata files
*.nfo
*.txt
# But keep important files
!important.txt
# Ignore specific directories
extras/
Extras/
behind.the.scenes//downloads/
βββ .chiprrignore # Applies to all subdirectories
βββ Breaking Bad/
β βββ Season 1/
β β βββ episode1.mkv # β Processed
β β βββ episode1.srt # β Ignored (if *.srt in .chiprrignore)
β β βββ sample.mkv # β Ignored (if *sample* in .chiprrignore)
β βββ extras/ # β Ignored (if extras/ in .chiprrignore)
β βββ interview.mkv
βββ unwanted-show/
βββ .chiprrignore # Empty file - ignores everything
βββ episode.mkv # β Ignored (empty .chiprrignore in parent)
chiprr uses the ignore library, which fully implements gitignore specification:
*.log- Ignore all .log files**/*.tmp- Ignore .tmp files in any subdirectory!important.txt- Negation: don't ignore this filefolder/- Ignore entire directory*sample*- Ignore files containing "sample"# comment- Comments are ignored
Rules from parent directories apply to child directories. You can have multiple .chiprrignore files at different levels:
/downloads/
βββ .chiprrignore # Global rules (e.g., *.srt)
βββ Show Name/
βββ Season 1/
β βββ .chiprrignore # Additional rules for this season
βββ Season 2/
- File Watching: Uses chokidar to monitor the input directory for new files
- Filename Parsing: Extracts show name, season, and episode from various naming conventions
- Show Matching: Queries TMDB API to find the correct show name and handles variations
- Smart Matching: Falls back to fuzzy matching and diacritics removal if exact match isn't found
- File Organization: Creates hard links in a clean directory structure without duplicating data
- Ignore Filtering: Checks
.chiprrignorefiles to skip unwanted files and directories
# Run tests
npm test
# Run in development mode
npm run dev
# Build
npm run build- Node.js 18+
- File system that supports hard links
- TMDB API token
- Write permissions for both input and sorted directories
MIT
Pull requests are welcome! For major changes, please open an issue first to discuss what you would like to change.