Manual:Pywikibot/Global Options
< Manual:Pywikibot
Other languages:
English • ‎català • ‎español • ‎français • ‎italiano • ‎polski • ‎čeština • ‎Ελληνικά • ‎русский • ‎العربية • ‎中文 • ‎日本語 • ‎粵語
Global arguments available for all bots
These options will override the configuration in user-config.py settings.
Global options
ParameterDescriptionConfig variable
-dir:PATHRead the bot's configuration data from directory given by PATH, instead of from the default directory. 
-lang:xxSet the language of the wiki you want to work on, overriding the configuration in user-config.py. xx should be the language code.mylang
-family:xyzSet the family of the wiki you want to work on, e.g. wikipedia, wiktionary, wikitravel, ... This will override the configuration in user-config.py.family
-user:xyzLog in as user 'xyz' instead of the default username.usernames
-daemonize:xyzImmediately return control to the terminal and redirect stdout and stderr to file xyz. (only use for bots that require no input from stdin). 
-helpShow the help text. 
-logEnable the log file, using the default filename 'script_name-bot.log' Logs will be stored in the logs subdirectory.log
-log:xyzEnable the log file, using 'xyz' as the filename.logfilename
-nologDisable the log file (if it is enabled by default). 
-maxlagSets a new maxlag parameter to a number of seconds. Defer bot edits during periods of database server lag. Default is set by config.pymaxlag
Set the minimum time (in seconds) the bot will wait between saving pages.put_throttle
Enable the log file and include extensive debugging data for component "item" (for all components if the second form is used).debug_log
Have the bot provide additional console output that may be useful in debugging.verbose_output
Toggles the cosmetic_changes setting made in config.py or user-config.py to its inverse and overrules it. All other settings and restrictions are untouched.cosmetic_changes
-simulateDisables writing to the server. Useful for testing and debugging of new code (if given, doesn't do any real changes, but only shows what would have been changed).simulate
-<config var>:nYou may use all given numeric config variables as option and modify it with command line. 
Last edited on 20 April 2021, at 21:59
Content is available under CC BY-SA 3.0 unless otherwise noted.
Privacy policy
Terms of Use
HomeRandomLog inSettingsDonateAbout MediaWiki.orgDisclaimers