cli.rst 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359
  1. .. _commandline:
  2. Command Line Interface
  3. ======================
  4. Here you can find the documentation about FlaskBB's Command Line Interface.
  5. To get help for a commands, just type ``flaskbb COMMAND --help``.
  6. If no command options or arguments are used it will display all available
  7. commands.
  8. .. sourcecode:: text
  9. Usage: flaskbb [OPTIONS] COMMAND [ARGS]...
  10. This is the commandline interface for flaskbb.
  11. Options:
  12. --config CONFIG Specify the config to use in dotted module notation e.g.
  13. flaskbb.configs.default.DefaultConfig
  14. --version Show the FlaskBB version.
  15. --help Show this message and exit.
  16. Commands:
  17. celery Preconfigured wrapper around the 'celery' command.
  18. db Perform database migrations.
  19. download-emojis Downloads emojis from emoji-cheat-sheet.com.
  20. install Installs flaskbb.
  21. makeconfig Generates a FlaskBB configuration file.
  22. plugins Plugins command sub group.
  23. populate Creates the necessary tables and groups for FlaskBB.
  24. reindex Reindexes the search index.
  25. run Runs a development server.
  26. shell Runs a shell in the app context.
  27. start Starts a production ready wsgi server.
  28. themes Themes command sub group.
  29. translations Translations command sub group.
  30. upgrade Updates the migrations and fixtures.
  31. urls Show routes for the app.
  32. users Create, update or delete users.
  33. Commands
  34. --------
  35. Here you will find a detailed description of every command including all
  36. of their options and arguments.
  37. .. I am cheating here as i don't know how else to get rid of the warnings
  38. .. describe:: flaskbb install
  39. Installs flaskbb. If no arguments are used, an interactive setup
  40. will be run.
  41. .. describe:: --welcome, -w
  42. Disables the generation of the welcome forum.
  43. .. describe:: --force, -f
  44. Doesn't ask for confirmation if the database should be deleted or not.
  45. .. describe:: --username USERNAME, -u USERNAME
  46. The username of the user.
  47. .. describe:: --email EMAIL, -e EMAIL
  48. The email address of the user.
  49. .. describe:: --password PASSWORD, -p PASSWORD
  50. The password of the user.
  51. .. describe:: --group GROUP, -g GROUP
  52. The primary group of the user. The group ``GROUP`` has to be
  53. one of ``admin``, ``super_mod``, ``mod`` or ``member``.
  54. .. describe:: flaskbb upgrade
  55. Updates the migrations and fixtures.
  56. .. describe:: --all, -a
  57. Upgrades migrations AND fixtures to the latest version.
  58. .. describe:: --fixture FIXTURE, -f FIXTURE
  59. The fixture which should be upgraded or installed.
  60. All fixtures have to be places inside flaskbb/fixtures/
  61. .. describe:: --force-fixture, -ff
  62. Forcefully upgrades the fixtures. WARNING: This will also overwrite
  63. any settings.
  64. .. describe:: flaskbb populate
  65. Creates the necessary tables and groups for FlaskBB.
  66. .. describe:: --test-data, -t
  67. Adds some test data.
  68. .. describe:: --bulk-data, -b
  69. Adds a lot of test data. Has to be used in combination with
  70. ``--posts`` and ``--topics``.
  71. .. describe:: --posts
  72. Number of posts to create in each topic (default: 100).
  73. .. describe:: --topics
  74. Number of topics to create (default: 100).
  75. .. describe:: --force, -f
  76. Will delete the database without asking before populating it.
  77. .. describe:: --initdb, -i
  78. Initializes the database before populating it.
  79. .. describe:: flaskbb runserver
  80. Starts the development server
  81. .. describe:: flaskbb start
  82. Starts a production ready wsgi server.
  83. Other versions of starting FlaskBB are still supported!
  84. .. describe:: --server SERVER, -s SERVER
  85. Defaults to ``gunicorn``. The following WSGI Servers are supported:
  86. - gunicorn (default)
  87. - gevent
  88. .. describe:: --host HOST, -h HOST
  89. The interface to bind FlaskBB to. Defaults to ``127.0.0.1``.
  90. .. describe:: --port PORT, -p PORT
  91. The port to bind FlaskBB to. Defaults to ``8000``.
  92. .. describe:: --workers WORKERS, -w WORKERS
  93. The number of worker processes for handling requests.
  94. Defaults to ``4``.
  95. .. describe:: --daemon, -d
  96. Starts gunicorn in daemon mode.
  97. .. describe:: --config, -c
  98. The configuration file to use for the FlaskBB WSGI Application.
  99. .. describe:: flaskbb celery CELERY_ARGS
  100. Starts celery. This is just a preconfigured wrapper around the ``celery``
  101. command. Additional arguments are directly passed to celery.
  102. .. describe:: --help-celery
  103. Shows the celery help message.
  104. .. describe:: flaskbb shell
  105. Creates a python shell with an app context.
  106. .. describe:: flaskbb urls
  107. Lists all available routes.
  108. .. describe:: --route, -r
  109. Order by route.
  110. .. describe:: --endpoint, -e
  111. Order by endpoint
  112. .. describe:: --methods, -m
  113. Order by methods
  114. .. describe:: flaskbb makeconfig
  115. Generates a FlaskBB configuration file.
  116. .. describe:: --development, -d
  117. Creates a development config with DEBUG set to True.
  118. .. describe:: --output, -o
  119. The path where the config file will be saved at.
  120. Defaults to the flaskbb's root folder.
  121. .. describe:: --force, -f
  122. Overwrites any existing config file, if one exsits, WITHOUT asking.
  123. .. describe:: flaskbb reindex
  124. Reindexes the search index.
  125. .. describe:: flaskbb translations
  126. Translations command sub group.
  127. .. describe:: new LANGUAGE_CODE
  128. Adds a new language to FlaskBB's translations.
  129. The ``LANGUAGE_CODE`` is the short identifier for the language i.e.
  130. '``en``', '``de``', '``de_AT``', etc.
  131. .. describe:: --plugin PLUGIN_NAME, --p PLUGIN_NAME
  132. Adds a new language to a plugin.
  133. .. describe:: update
  134. Updates the translations.
  135. .. describe:: --all, -a
  136. Updates all translations, including the ones from the plugins.
  137. .. describe:: --plugin PLUGIN_NAME, --p PLUGIN_NAME
  138. Update the language of the given plugin.
  139. .. describe:: compile
  140. Compiles the translations.
  141. .. describe:: --all, -a
  142. Compiles all translations, including the ones from the plugins.
  143. .. describe:: --plugin PLUGIN_NAME, --p PLUGIN_NAME
  144. Compiles only the given plugin translation.
  145. .. describe:: flaskbb plugins
  146. Plugins command sub group.
  147. .. describe:: new PLUGIN_IDENTIFIER
  148. Creates a new plugin based on the cookiecutter plugin template.
  149. Defaults to this template:
  150. https://github.com/sh4nks/cookiecutter-flaskbb-plugin.
  151. It will either accept a valid path on the filesystem
  152. or a URL to a Git repository which contains the cookiecutter template.
  153. .. describe:: install PLUGIN_IDENTIFIER
  154. Installs a plugin by using the plugin's identifier.
  155. .. describe:: uninstall PLUGIN_IDENTIFIER
  156. Uninstalls a plugin by using the plugin's identifier.
  157. .. describe:: remove PLUGIN_IDENTIFIER
  158. Removes a plugin from the filesystem by using the plugin's identifier.
  159. describe:: --force, -f
  160. Removes the plugin without asking for confirmation first.
  161. .. describe:: list
  162. Lists all installed plugins.
  163. .. describe:: flaskbb themes
  164. Themes command sub group.
  165. .. describe:: new THEME_IDENTIFIER
  166. Creates a new theme based on the cookiecutter theme
  167. template. Defaults to this template:
  168. https://github.com/sh4nks/cookiecutter-flaskbb-theme.
  169. It will either accept a valid path on the filesystem
  170. or a URL to a Git repository which contains the cookiecutter template.
  171. .. describe:: remove THEME_IDENTIFIER
  172. Removes a theme from the filesystem by the theme's identifier.
  173. .. describe:: list
  174. Lists all installed themes.
  175. .. describe:: flaskbb users
  176. Creates a new user. If an option is missing, you will be interactivly
  177. prompted to type it.
  178. .. describe:: new
  179. Creates a new user.
  180. .. describe:: --username USERNAME, -u USERNAME
  181. The username of the user.
  182. .. describe:: --email EMAIL, -e EMAIL
  183. The email address of the user.
  184. .. describe:: --password PASSWORD, -p PASSWORD
  185. The password of the user.
  186. .. describe:: --group GROUP, -g GROUP
  187. The primary group of the user. The group ``GROUP`` has to be
  188. one of ``admin``, ``super_mod``, ``mod`` or ``member``.
  189. .. describe:: update
  190. Updates an user.
  191. .. describe:: --username USERNAME, -u USERNAME
  192. The username of the user.
  193. .. describe:: --email EMAIL, -e EMAIL
  194. The email address of the user.
  195. .. describe:: --password PASSWORD, -p PASSWORD
  196. The password of the user.
  197. .. describe:: --group GROUP, -g GROUP
  198. The primary group of the user. The group ``GROUP`` has to be
  199. one of ``admin``, ``super_mod``, ``mod`` or ``member``.
  200. .. describe:: delete
  201. .. describe:: --username USERNAME, -u USERNAME
  202. The username of the user.
  203. .. describe:: --force, -f
  204. Removes the user without asking for confirmation first.