Appendix B: Command Line Options

Picard can be started from the command line with the following arguments:

run_picard.py [-h] [-a AUDIT] [-c CONFIG_FILE] [-d] [-e COMMAND [COMMAND ...]] [-M] [-N] [-P] [--no-crash-dialog] [--debug-opts] [-s] [-v] [-V] [FILE_OR_URL ...]

where the options are:

-h, --help

show a help message and exit

-a AUDIT, --audit AUDIT

audit events passed as a comma-separated list, prefixes supported, use “all” to match any event. See the Python Documentation for more information.

-c CONFIG_FILE, --config-file CONFIG_FILE

location of the configuration file to use

-d, --debug

enable debug-level logging

--debug-opts [OPTIONS]

comma-separated list of debug options. Use –debug-opts without value to list available options

Note

The plugin_development debug option has been specifically designed to assist plugin developers by allowing detailed logging of plugin-related events that would not normally be included in the debug log. This can help developers identify issues and understand the behavior of their plugins within Picard. Debug log entries are useful when a user is trying to understand which plugin is making changes to metadata and such, but extensive debug logging such as that required for troubleshooting a specific plugin can be overwhelming. If detailed debug logging is included, it should be used with the api.logger.debug_if() method so that it is only logged when the plugin_development debug option is specified on the command line. For example:

# Single message
self.api.logger.debug_if(DebugOpt.PLUGIN_DEVELOPMENT, "Detailed debug message with no parameters")
self.api.logger.debug_if(DebugOpt.PLUGIN_DEVELOPMENT, "Resize: %d x %d", width, height)

# Lazy formatting with msg_func
self.api.logger.debug_if(DebugOpt.PLUGIN_DEVELOPMENT, msg_func=lambda: "Settings: %s" % expensive())

# Block guard to skip expensive code entirely when disabled
if dbg := self.api.logger.debug_if(DebugOpt.PLUGIN_DEVELOPMENT):
    for item in items:
        dbg("item: %r", item)
-e COMMAND, --exec COMMAND

execute one or more COMMANDs at start-up (see Executable Commands for more information)

-M, --no-player

disable built-in media player

-N, --no-restore

do not restore window positions or sizes

-P, --no-plugins

do not load any plugins

--no-crash-dialog

disable the crash dialog

-s, --stand-alone-instance

force Picard to create a new, stand-alone instance

-v, --version

display the version information and exit

-V, --long-version

display the long version information and exit

FILE_OR_URL

one or more files, directories, URLs and MBIDs to load

Note

Files and directories are specified including the path (either absolute or relative) to the file or directory, and may include drive specifiers. They can also be specified using the file:// prefix. URLs are specified by using either the http:// or https:// prefix. MBIDs are specified in the format mbid://<entity_type>/<mbid> where <entity_type> is one of “release”, “artist” or “track” and <mbid> is the MusicBrainz Identifier of the entity.

If a specified item contains a space, it must be enclosed in quotes such as "/home/user/music/my song.mp3".