Skip to content

Environment Variables and Command Line Arguments

isatis edited this page Sep 25, 2025 · 2 revisions
Command Line Argument Environment Variable Description Default
--input-path OPO_INPUT_PATH where to read unsorted .mkv/.mp4 files from
--output-path OPO_OUTPUT_PATH Where to put sorted .mkv/.mp4 files (and .nfo/posters if Jellyfin)
--cwd OPO_BASE_PATH Working directory (current directory)
--config-file OPO_CONFIG_PATH Path to config.json or config.yml (empty to disable) (OPO_BASE_PATH)/config.json
--dl-path OPO_ DL_PATH Download path (for posters, metadata, etc) https://raw.githubusercontent.com/ladyisatis/onepaceorganizer/refs/heads/main
--log-level OPO_LOG_LEVEL Log level (TRACE, DEBUG, INFO, SUCCESS, WARNING, ERROR, CRITICAL) INFO
--log-file OPO_LOG_FILE Log to file (empty to disable)
--file-action OPO_FILE_ACTION Action to take on unsorted file when processing. 0 for Move, 1 for Copy, 2 for Symlink, 3 for Hardlink, 4 for generate metadata only (not on Plex) 0
--folder-action OPO_FOLDER_ACTION How to categorize episodes into season folders. 0 for with leading zeroes (Season 01-09), 1 for no leading zeroes (Season 1-9), 2 to disable 0
--threads OPO_POOL_MODE Use threads instead of processes (true/false for command line, threads/process for env) false/process
--workers OPO_WORKERS Concurrency workers (0 for Automatic) 0
--fetch-posters OPO_FETCH_POSTERS Fetch posters if not found 1
--filename-tmpl OPO_FILENAME_TMPL Filename template (see below) One Pace - S{arc:02d}E{episode:02d} - {title}{suffix}
--overwrite-nfo OPO_OVERWRITE_NFO Overwrite .nfo files false
--plex-enabled OPO_PLEX_ENABLED Is Plex Enabled false
--plex-url OPO_PLEX_URL Plex URL (e.g. http://127.0.0.1:32400) http://127.0.0.1:32400
--plex-server OPO_PLEX_SERVER Plex Server ID (GUID)
--plex-library OPO_PLEX_LIBRARY Plex Library Key (Number)
--plex-show OPO_PLEX_SHOW Plex Show ID (GUID)
--plex-use-token OPO_USE_TOKEN Use Authorization Token instead of Username and Password false
- OPO_PLEX_AUTH_TOKEN Plex Authentication Token
- OPO_PLEX_USERNAME Plex Username
- OPO_PLEX_PASSWORD Plex Password
--plex-code OPO_ Plex 2-Factor Auth Code (headless mode only)
--plex-remember OPO_PLEX_REMEMBER Remember Plex Credentials false
- OPO_PLEX_SERVER_BASEURL Plex Server Base URL
- OPO_PLEX_SERVER_TOKEN Plex Server Token
--plex-wait-secs OPO_PLEX_WAIT_SECS Number of seconds to wait for file transfers (headless mode only) 300

--filename-tmpl / OPO_FILENAME_TMPL

The template for this uses brackets with variable names formatted using Python's format(), and these variable names include:

  • {arc} - Arc Number (e.g. 1 for Romance Dawn)
  • {arc_saga} - Arc Saga (e.g. Romance Dawn, or Marineford if the arc is Impel Down)
  • {arc_title} - Arc Title (e.g. Romance Dawn or Dressrosa)
  • {episode} - Episode Number
  • {title} - Episode Title
  • {name} - File Name (e.g. One Pace - S01E01 - Romance Dawn.mkv)
  • {stem} - File Stem (e.g. One Pace - S01E01 - Romance Dawn)
  • {suffix} - File Extension (e.g. .mkv)
  • {crc32} - CRC32 of the file

Clone this wiki locally