Skip to content

javinizer/javinizer-go

Repository files navigation

Javinizer Go

Javinizer Go is a metadata scraper and file organizer for Japanese Adult Videos (JAV), with CLI, TUI, API, and a web UI.

Go Version License Test & Coverage codecov Discord

Features

Feature What it does Why it helps
Multi-source scraping Pulls metadata from R18.dev, DMM/Fanza, and optional sources. Better match quality and fewer missing fields.
Smart file organization Renames and organizes files/folders using templates. Keeps large libraries consistent and searchable.
Dry-run safety Shows a full preview before making any changes. Reduces risk when processing many files.
NFO generation Creates Kodi/Plex-compatible NFO metadata files. Improves media center indexing and display quality.
Media downloads Downloads cover, poster, fanart, trailer, and actress images. Produces complete, polished library entries.
Multiple interfaces Use CLI, interactive TUI, or API + web UI. Lets you choose fast automation or manual review.

Supported Scrapers

Scraper Enabled by default (config.yaml.example) Language options Notes
r18dev Yes en, ja JSON API scraper with rate-limit handling options.
dmm No N/A Supports optional browser mode for JS-rendered pages; placeholder detection for screenshots.
libredmm No N/A Community mirror source.
mgstage No N/A Usually requires age-verification cookie (adc=1).
javlibrary No en, ja, cn, tw Can use FlareSolverr for Cloudflare challenges.
javdb No N/A Can use FlareSolverr; proxy-friendly setup.
javbus No ja, en, zh Multi-language support.
jav321 No N/A Alternative index source.
tokyohot No ja, en, zh Tokyo-Hot specific source.
aventertainment No en, ja Supports bonus screenshot scraping option.
dlgetchu No N/A DLsite/Getchu-related source.
caribbeancom No ja, en Caribbeancom-specific source.
fc2 No N/A FC2 source.
javstash No en, ja GraphQL API scraper; requires API key from javstash.org.

Installation

Docker (Recommended)

The easiest way to get started is with Docker:

# 1) Create data directory and download config
mkdir -p ./data
curl -o ./data/config.yaml \
  https://raw.githubusercontent.com/javinizer/javinizer-go/main/configs/config.yaml.example

# 2) Edit config.yaml with your settings (scrapers, output paths, etc.)

# 3) Run container
docker run --rm \
  --user "$(id -u):$(id -g)" \
  -p 8080:8080 \
  -v "$(pwd)/data:/javinizer" \
  -v "/path/to/your/media:/media" \
  ghcr.io/javinizer/javinizer-go:latest

Open http://localhost:8080 to access the web UI.

Notes:

  • Replace /path/to/your/media with the path to your JAV library
  • On Unraid, use your share owner mapping (commonly --user 99:100)
  • Use a pinned tag (e.g., v0.1.2-alpha) for reproducible deployments
  • latest tracks the most recent release

Docker Compose

For a more complete setup with optional FlareSolverr support:

# 1) Download example files
curl -o .env \
  https://raw.githubusercontent.com/javinizer/javinizer-go/main/.env.example
curl -o docker-compose.yml \
  https://raw.githubusercontent.com/javinizer/javinizer-go/main/docker-compose.yml

# 2) Edit .env to configure paths and settings
# MEDIA_PATH=/path/to/your/jav-library
# PUID=1000
# PGID=1000
# TZ=America/New_York

# 3) Start services
docker-compose up -d

The docker-compose.yml includes:

  • javinizer: Main API server + web UI
  • flaresolverr (optional): Cloudflare challenge solver for JavDB/JavLibrary

See Docker Deployment Guide for complete documentation.

Prebuilt Binaries

Download pre-compiled binaries from GitHub Releases:

Available platforms:

  • linux-amd64 - Linux x86_64
  • linux-arm64 - Linux ARM64 (e.g., Raspberry Pi)
  • darwin-amd64 - macOS Intel
  • darwin-arm64 - macOS Apple Silicon
  • darwin-universal - macOS Universal (Intel + Apple Silicon)
  • windows-amd64 - Windows x86_64

Installation:

# Example for Linux amd64
wget https://github.com/javinizer/javinizer-go/releases/download/v0.1.2-alpha/javinizer-linux-amd64.tar.gz
tar -xzf javinizer-linux-amd64.tar.gz
sudo mv javinizer /usr/local/bin/
javinizer version

Note: Prebuilt binaries include CLI, TUI, API server, and embedded web UI.

Build from Source

Requires Go 1.25+ and CGO (for SQLite support). For embedded web UI builds, Node.js 20+ is also required (Node 22 used in CI).

go install github.com/javinizer/javinizer-go/cmd/javinizer@latest

# Or clone and build manually (single binary with embedded web UI)
git clone https://github.com/javinizer/javinizer-go.git
cd javinizer-go
make build
./bin/javinizer version

The make build target now builds the frontend bundle and embeds it into the Go binary.

Usage

Interactive TUI (Terminal UI)

Browse and scrape files interactively with real-time progress:

javinizer tui ~/Videos

See TUI Guide for keyboard shortcuts and workflows.

File Organization

Scan, scrape metadata, and organize files using templates:

# Dry-run mode (preview changes without modifying files)
javinizer sort ~/Videos --dry-run

# Actually organize files
javinizer sort ~/Videos

Manual Scraping

Scrape metadata for a specific JAV ID:

javinizer scrape IPX-535
javinizer scrape SSIS-123 --force  # Force refresh cached metadata

Update Existing Metadata

Re-scrape and update metadata for already organized files:

javinizer update ~/Videos/IPX-535
javinizer update ~/Videos --dry-run  # Preview updates for entire library

Manage Tags

Add custom tags to movies (appears in NFO files):

javinizer tag add IPX-535 "favorite" "4K"
javinizer tag list IPX-535
javinizer tag remove IPX-535 "favorite"
javinizer tag search "favorite"     # Find movies by tag
javinizer tag tags                  # List all unique tags

Genre Management

View and modify genre replacement rules:

javinizer genre list
javinizer genre add "Creampie" "Cream Pie"  # Replace "Creampie" with "Cream Pie"
javinizer genre remove "Creampie"

History Tracking

View file organization operations:

javinizer history list           # List recent operations
javinizer history stats           # Show operation statistics
javinizer history movie <id>      # Show history for specific movie
javinizer history clean --days 30 # Clean records older than 30 days

System Info

Display configuration, scrapers, and database status:

javinizer info  # Show current configuration and database status

API + Web Server (web Alias)

Start the unified server (recommended via web alias):

javinizer web

# Equivalent legacy command
javinizer api

# Custom port
PORT=9000 javinizer web

# With flags
javinizer web --host 0.0.0.0 --port 8081

javinizer api and javinizer web invoke the same backend server command, but they represent different usage intents:

  • Use javinizer api for backend/API-focused workflows and frontend development (npm run dev hot reload).
  • Use javinizer web when you want the embedded browser UI entrypoint from the Go binary.

What this server provides:

  • GET / - Embedded Web UI (single-binary distribution)
  • GET /api/v1/... - REST API endpoints
  • GET /ws/progress - WebSocket progress stream
  • GET /docs - Scalar API docs UI
  • GET /swagger/index.html - Swagger UI

Authentication (built-in):

  • On first startup, open Web UI and create default username/password.
  • Credentials are stored in auth.credentials.json next to your config.yaml.
  • API and WebSocket endpoints require a session cookie after setup.
  • To reset password: stop server, delete auth.credentials.json, restart, and run setup again.

Web UI

The web application provides a modern interface for managing your JAV library.

Availability:

  • Docker: Web UI is included and available at localhost:8080
  • CLI/Binary: Web UI is embedded in the binary and served at localhost:8080

How to access:

# Using Docker (recommended)
docker run -p 8080:8080 -v ./data:/javinizer ghcr.io/javinizer/javinizer-go:latest
# Open http://localhost:8080

Pages:

  • Dashboard - Quick stats and recent activity
  • Browse - View organized movies with covers and metadata
  • Review - Batch scrape files, crop posters, edit metadata before organizing
  • Jobs - Monitor active batch jobs and progress in real-time
  • Actresses - Browse actress database with images
  • History - View and rollback organization operations
  • Settings - Configure scrapers, output templates, and proxy settings

API Documentation:

See API Reference for endpoint documentation.

Web Development

To build and use the web UI with a local installation:

Option 1: Production build (single binary with embedded UI)

# Build binary (includes web bundle)
make build

# Start API/web server
javinizer web
# Open http://localhost:8080

Option 2: Development mode (hot reload)

# Terminal 1: Start backend API server
javinizer api

# Terminal 2: Start frontend dev server with hot reload
make web-dev
# Open http://localhost:5174 (proxies API calls to :8080)

The development server provides:

  • Hot module replacement (instant updates on file changes)
  • Better error messages
  • Faster iteration

See web/frontend/README.md for more details.

Environment Variables

Docker deployments support environment variable overrides:

Core Variables

Variable Description Default Example
PUID Runtime user ID for container process (preferred) 1000 99 (common on Unraid)
PGID Runtime group ID for container process (preferred) 1000 100 (common on Unraid)
USER_ID Legacy alias for PUID 1000 1000
GROUP_ID Legacy alias for PGID 1000 1000
JAVINIZER_CONFIG Path to config file /javinizer/config.yaml /custom/config.yaml
JAVINIZER_DB Path to SQLite database /javinizer/javinizer.db /custom/db.db
JAVINIZER_LOG_DIR Relocate file targets from logging.output to this directory (does not enable file logging by itself) /javinizer/logs /custom/logs
JAVINIZER_TEMP_DIR Temp directory for downloads data/temp /custom/temp
LOG_LEVEL Logging verbosity info debug, warn, error
UMASK File permission mask 002 022 (owner-only write)
TZ Timezone for logs UTC America/New_York

Translation API Keys

Variable Description Example
TRANSLATION_PROVIDER Translation provider openai, deepl, google, anthropic
TRANSLATION_SOURCE_LANGUAGE Source language ja
TRANSLATION_TARGET_LANGUAGE Target language en
OPENAI_API_KEY OpenAI API key sk-...
DEEPL_API_KEY DeepL API key ...
GOOGLE_TRANSLATE_API_KEY Google Translate API key ...
ANTHROPIC_API_KEY Anthropic API key ...

Scraper API Keys

Variable Description
JAVSTASH_API_KEY JavStash GraphQL API key (get from javstash.org)

Development

Variable Description
CHROME_BIN Chrome binary path for browser scraping
GH_TOKEN GitHub token (avoids rate limits for update checks)

JAVINIZER_LOG_DIR examples:

  • logging.output: stdout + JAVINIZER_LOG_DIR=/custom/logs -> stdout (no file output)
  • logging.output: "stdout,data/logs/javinizer.log" + JAVINIZER_LOG_DIR=/custom/logs -> "stdout,/custom/logs/javinizer.log"

Example:

docker run --rm \
  -e LOG_LEVEL=debug \
  -e TZ=Asia/Tokyo \
  -p 9000:8080 \
  -v "$(pwd)/data:/javinizer" \
  -v "/media/jav:/media" \
  ghcr.io/javinizer/javinizer-go:latest

See .env.example for Docker Compose configuration.

Configuration

Javinizer uses a YAML configuration file to control scrapers, output templates, and behavior.

Key configuration sections:

  • Scrapers: Enable/disable sources, set priorities, configure proxies
  • Metadata: Field-level scraper priorities, translation, genre filtering
  • Output: Folder/file naming templates, download options
  • File Matching: Extensions, size filters, regex patterns
  • NFO: Kodi/Plex metadata format options

Documentation:

Initialize config:

javinizer init  # Creates default config.yaml in current directory

Multi-Language Template Tags

Template tags support language selection for translated metadata fields.

Syntax

  • <TITLE:EN> - English title translation
  • <TITLE:JA> - Japanese title translation
  • <TITLE:JA|EN> - Japanese with English fallback (tries JA first, then EN)
  • <TITLE> - Base field (uses scraped/original value)

Supported Tags

Only these tags support language selection: TITLE, MAKER, LABEL, SERIES, DIRECTOR, DESCRIPTION, ORIGINALTITLE, STUDIO (synonym for MAKER)

Limitations

  • Language codes are normalized to base language only (e.g., en-USen)
  • Regional/script variants cannot be distinguished
  • Language codes must be lowercase 2-letter codes (en, ja, zh, ko, etc.)

Example

output:
  folder_format: <ID> [<MAKER:JA>] - <TITLE:EN> (<YEAR>)

Result: ROYD-191 [ROYD] - A Beautiful Day (2024)

See Template System for full documentation.

Documentation

Support

License

This project is a Go recreation of the original Javinizer.

MIT License - see LICENSE file for details.

About

Javinizer written in Go and Svelte. This is a modern replacement for the original Javinizer. (NSFW) Organize your local Japanese Adult Video (JAV) library.

Resources

License

Stars

Watchers

Forks

Packages