cli.rst 8.8 KB

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