You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

423 line
15 KiB

  1. .TH "REBAR3" "1" "January 2017" "Erlang"
  2. .SH NAME
  3. \fBrebar3\fR \- tool for working with Erlang projects
  4. .SH "SYNOPSIS"
  5. \fBrebar3\fR \fB\-\-version\fR
  6. .br
  7. \fBrebar3\fR \fBhelp\fR
  8. .br
  9. \fBrebar3\fR \fIcommand\fR [\fIoptions\fR] \.\.\.
  10. .SH "DESCRIPTION"
  11. Rebar3 is an Erlang tool that makes it easy to create, develop, and release Erlang libraries, applications, and systems in a repeatable manner\.
  12. Full documentation at \fIhttp://www.rebar3.org/\fR
  13. .SH "ESSENTIAL COMMANDS"
  14. For the full command list, see the \fICOMMANDS\fR section\.
  15. .P
  16. With \fBrebar3 help <task>\fR, commands and plugins will display their own help information\.
  17. .TP
  18. \fBcompile\fR
  19. Compile the current project
  20. .TP
  21. \fBnew\fR (\fBhelp [\fItemplate\fR])|\fItemplate\fR
  22. Show information about templates or use one
  23. .TP
  24. \fBupdate\fR
  25. Fetch the newest version of the Hex index
  26. .TP
  27. \fBdo\fR \fIcommand\fR[,\fIcommand\fR,...]
  28. Run one or more commands in a sequence
  29. .TP
  30. \fBshell\fR
  31. Start the current project in a REPL\. You can then use \fBr3:do(\fItask\fR)\fR to call it on the project without dropping the current state.
  32. .SH "COMMANDS"
  33. . this section generated by running the contents of 'commands' in rebar3 shell
  34. .TP
  35. \fBas\fR
  36. Higher order provider for running multiple tasks in a sequence as a certain profiles.
  37. .TP
  38. \fBclean\fR [\fI-a\fR|\fI--all\fR] [\fI-p\fR|\fI--profile\fR]
  39. Remove compiled beam files from apps.
  40. .IP
  41. \fI--all\fR: Clean all apps include deps
  42. .IP
  43. \fI--profile\fR: Clean under profile. Equivalent to `rebar3 as <profile> clean`
  44. .TP
  45. \fBcompile\fR
  46. Compile apps .app.src and .erl files.
  47. .TP
  48. \fBcover\fR [\fI-r\fR|\fI--reset\fR] [\fI-v\fR|\fI--verbose\fR]
  49. Perform coverage analysis.
  50. .IP
  51. \fI--reset\fR: Reset all coverdata.
  52. .IP
  53. \fI--verbose\fR: Print coverage analysis.
  54. .TP
  55. \fBct\fR [\fI--dir\fR] [\fI--suite\fR] [\fI--group\fR] [\fI--case\fR] [\fI--label\fR] [\fI--config\fR] [\fI--spec\fR] [\fI--join_specs\fR] [\fI--allow_user_terms\fR] [\fI--logdir\fR] [\fI--logopts\fR] [\fI--verbosity\fR] [\fI-c\fR|\fI--cover\fR] [\fI--repeat\fR] [\fI--duration\fR] [\fI--until\fR] [\fI--force_stop\fR] [\fI--basic_html\fR] [\fI--stylesheet\fR] [\fI--decrypt_key\fR] [\fI--decrypt_file\fR] [\fI--abort_if_missing_suites\fR] [\fI--multiply_timetraps\fR] [\fI--scale_timetraps\fR] [\fI--create_priv_dir\fR] [\fI--include\fR] [\fI--readable\fR] [\fI-v\fR|\fI--verbose\fR] [\fI--name\fR] [\fI--sname\fR] [\fI--setcookie\fR] [\fI--sys_config\fR]
  56. Run Common Tests.
  57. .IP
  58. \fI--dir\fR: List of additional directories containing test suites
  59. .IP
  60. \fI--suite\fR: List of test suites to run
  61. .IP
  62. \fI--group\fR: List of test groups to run
  63. .IP
  64. \fI--case\fR: List of test cases to run
  65. .IP
  66. \fI--label\fR: Test label
  67. .IP
  68. \fI--config\fR: List of config files
  69. .IP
  70. \fI--spec\fR: List of test specifications
  71. .IP
  72. \fI--join_specs\fR: Merge all test specifications and perform a single test run
  73. .IP
  74. \fI--allow_user_terms\fR: Allow user defined config values in config files
  75. .IP
  76. \fI--logdir\fR: Log folder
  77. .IP
  78. \fI--logopts\fR: Options for common test logging
  79. .IP
  80. \fI--verbosity\fR: Verbosity
  81. .IP
  82. \fI--cover\fR: Generate cover data
  83. .IP
  84. \fI--repeat\fR: How often to repeat tests
  85. .IP
  86. \fI--duration\fR: Max runtime (format: HHMMSS)
  87. .IP
  88. \fI--until\fR: Run until (format: HHMMSS)
  89. .IP
  90. \fI--force_stop\fR: Force stop on test timeout (true | false | skip_rest)
  91. .IP
  92. \fI--basic_html\fR: Show basic HTML
  93. .IP
  94. \fI--stylesheet\fR: CSS stylesheet to apply to html output
  95. .IP
  96. \fI--decrypt_key\fR: Path to key for decrypting config
  97. .IP
  98. \fI--decrypt_file\fR: Path to file containing key for decrypting config
  99. .IP
  100. \fI--abort_if_missing_suites\fR: Abort if suites are missing
  101. .IP
  102. \fI--multiply_timetraps\fR:
  103. .IP
  104. \fI--scale_timetraps\fR: Scale timetraps
  105. .IP
  106. \fI--create_priv_dir\fR: Create priv dir (auto_per_run | auto_per_tc | manual_per_tc)
  107. .IP
  108. \fI--include\fR: Directories containing additional include files
  109. .IP
  110. \fI--readable\fR: Shows test case names and only displays logs to shell on failures
  111. .IP
  112. \fI--verbose\fR: Verbose output
  113. .IP
  114. \fI--name\fR: Gives a long name to the node
  115. .IP
  116. \fI--sname\fR: Gives a short name to the node
  117. .IP
  118. \fI--setcookie\fR: Sets the cookie if the node is distributed
  119. .IP
  120. \fI--sys_config\fR: List of application config files
  121. .TP
  122. \fBdeps\fR
  123. List dependencies
  124. .TP
  125. \fBdialyzer\fR [\fI-u\fR|\fI--update-plt\fR] [\fI-s\fR|\fI--succ-typings\fR]
  126. Run the Dialyzer analyzer on the project.
  127. .IP
  128. \fI--update-plt\fR: Enable updating the PLT. Default: true
  129. .IP
  130. \fI--succ-typings\fR: Enable success typing analysis. Default: true
  131. .TP
  132. \fBdo\fR
  133. Higher order provider for running multiple tasks in a sequence.
  134. .TP
  135. \fBedoc\fR
  136. Generate documentation using edoc.
  137. .TP
  138. \fBescriptize\fR
  139. Generate escript archive.
  140. .TP
  141. \fBeunit\fR [\fI--app\fR] [\fI--application\fR] [\fI-c\fR|\fI--cover\fR] [\fI-d\fR|\fI--dir\fR] [\fI-f\fR|\fI--file\fR] [\fI-m\fR|\fI--module\fR] [\fI-s\fR|\fI--suite\fR] [\fI-v\fR|\fI--verbose\fR] [\fI--name\fR] [\fI--sname\fR] [\fI--setcookie\fR]
  142. Run EUnit Tests.
  143. .IP
  144. \fI--app\fR: Comma separated list of application test suites to run. Equivalent to `[{application, App}]`.
  145. .IP
  146. \fI--application\fR: Comma separated list of application test suites to run. Equivalent to `[{application, App}]`.
  147. .IP
  148. \fI--cover\fR: Generate cover data. Defaults to false.
  149. .IP
  150. \fI--dir\fR: Comma separated list of dirs to load tests from. Equivalent to `[{dir, Dir}]`.
  151. .IP
  152. \fI--file\fR: Comma separated list of files to load tests from. Equivalent to `[{file, File}]`.
  153. .IP
  154. \fI--module\fR: Comma separated list of modules to load tests from. Equivalent to `[{module, Module}]`.
  155. .IP
  156. \fI--suite\fR: Comma separated list of modules to load tests from. Equivalent to `[{module, Module}]`.
  157. .IP
  158. \fI--verbose\fR: Verbose output. Defaults to false.
  159. .IP
  160. \fI--name\fR: Gives a long name to the node
  161. .IP
  162. \fI--sname\fR: Gives a short name to the node
  163. .IP
  164. \fI--setcookie\fR: Sets the cookie if the node is distributed
  165. .TP
  166. \fBget-deps\fR
  167. Fetch dependencies.
  168. .TP
  169. \fBhelp\fR
  170. Display a list of tasks or help for a given task or subtask.
  171. .TP
  172. \fBnew\fR [\fI-f\fR|\fI--force\fR]
  173. Create new project from templates.
  174. .IP
  175. \fI--force\fR: overwrite existing files
  176. .TP
  177. \fBpath\fR [\fI--app\fR] [\fI--base\fR] [\fI--bin\fR] [\fI--ebin\fR] [\fI--lib\fR] [\fI--priv\fR] [\fI-s\fR|\fI--separator\fR] [\fI--src\fR] [\fI--rel\fR]
  178. Print paths to build dirs in current profile.
  179. .IP
  180. \fI--app\fR: Comma separated list of applications to return paths for.
  181. .IP
  182. \fI--base\fR: Return the `base' path of the current profile.
  183. .IP
  184. \fI--bin\fR: Return the `bin' path of the current profile.
  185. .IP
  186. \fI--ebin\fR: Return all `ebin' paths of the current profile's applications.
  187. .IP
  188. \fI--lib\fR: Return the `lib' path of the current profile.
  189. .IP
  190. \fI--priv\fR: Return the `priv' path of the current profile's applications.
  191. .IP
  192. \fI--separator\fR: In case of multiple return paths, the separator character to use to join them.
  193. .IP
  194. \fI--src\fR: Return the `src' path of the current profile's applications.
  195. .IP
  196. \fI--rel\fR: Return the `rel' path of the current profile.
  197. .TP
  198. \fBpkgs\fR
  199. List available packages.
  200. .TP
  201. \fBrelease\fR [\fI-n\fR|\fI--relname\fR] [\fI-v\fR|\fI--relvsn\fR] [\fI-g\fR|\fI--goal\fR] [\fI-u\fR|\fI--upfrom\fR] [\fI-o\fR|\fI--output-dir\fR] [\fI-h\fR|\fI--help\fR] [\fI-l\fR|\fI--lib-dir\fR] [\fI-p\fR|\fI--path\fR] [\fI--default-libs\fR] [\fI-V\fR|\fI--verbose\fR] [\fI-d\fR|\fI--dev-mode\fR] [\fI-i\fR|\fI--include-erts\fR] [\fI-a\fR|\fI--override\fR] [\fI-c\fR|\fI--config\fR] [\fI--overlay_vars\fR] [\fI--vm_args\fR] [\fI--sys_config\fR] [\fI--system_libs\fR] [\fI--version\fR] [\fI-r\fR|\fI--root\fR]
  202. Build release of project.
  203. .IP
  204. \fI--relname\fR: Specify the name for the release that will be generated
  205. .IP
  206. \fI--relvsn\fR: Specify the version for the release
  207. .IP
  208. \fI--goal\fR: Specify a target constraint on the system. These are usually the OTP
  209. .IP
  210. \fI--upfrom\fR: Only valid with relup target, specify the release to upgrade from
  211. .IP
  212. \fI--output-dir\fR: The output directory for the release. This is `./` by default.
  213. .IP
  214. \fI--help\fR: Print usage
  215. .IP
  216. \fI--lib-dir\fR: Additional dir that should be searched for OTP Apps
  217. .IP
  218. \fI--path\fR: Additional dir to add to the code path
  219. .IP
  220. \fI--default-libs\fR: Whether to use the default system added lib dirs (means you must add them all manually). Default is true
  221. .IP
  222. \fI--verbose\fR: Verbosity level, maybe between 0 and 3
  223. .IP
  224. \fI--dev-mode\fR: Symlink the applications and configuration into the release instead of copying
  225. .IP
  226. \fI--include-erts\fR: If true include a copy of erts used to build with, if a path include erts at that path. If false, do not include erts
  227. .IP
  228. \fI--override\fR: Provide an app name and a directory to override in the form <appname>:<app directory>
  229. .IP
  230. \fI--config\fR: The path to a config file
  231. .IP
  232. \fI--overlay_vars\fR: Path to a file of overlay variables
  233. .IP
  234. \fI--vm_args\fR: Path to a file to use for vm.args
  235. .IP
  236. \fI--sys_config\fR: Path to a file to use for sys.config
  237. .IP
  238. \fI--system_libs\fR: Path to dir of Erlang system libs
  239. .IP
  240. \fI--version\fR: Print relx version
  241. .IP
  242. \fI--root\fR: The project root directory
  243. .TP
  244. \fBrelup\fR [\fI-n\fR|\fI--relname\fR] [\fI-v\fR|\fI--relvsn\fR] [\fI-g\fR|\fI--goal\fR] [\fI-u\fR|\fI--upfrom\fR] [\fI-o\fR|\fI--output-dir\fR] [\fI-h\fR|\fI--help\fR] [\fI-l\fR|\fI--lib-dir\fR] [\fI-p\fR|\fI--path\fR] [\fI--default-libs\fR] [\fI-V\fR|\fI--verbose\fR] [\fI-d\fR|\fI--dev-mode\fR] [\fI-i\fR|\fI--include-erts\fR] [\fI-a\fR|\fI--override\fR] [\fI-c\fR|\fI--config\fR] [\fI--overlay_vars\fR] [\fI--vm_args\fR] [\fI--sys_config\fR] [\fI--system_libs\fR] [\fI--version\fR] [\fI-r\fR|\fI--root\fR]
  245. Create relup of releases.
  246. .IP
  247. \fI--relname\fR: Specify the name for the release that will be generated
  248. .IP
  249. \fI--relvsn\fR: Specify the version for the release
  250. .IP
  251. \fI--goal\fR: Specify a target constraint on the system. These are usually the OTP
  252. .IP
  253. \fI--upfrom\fR: Only valid with relup target, specify the release to upgrade from
  254. .IP
  255. \fI--output-dir\fR: The output directory for the release. This is `./` by default.
  256. .IP
  257. \fI--help\fR: Print usage
  258. .IP
  259. \fI--lib-dir\fR: Additional dir that should be searched for OTP Apps
  260. .IP
  261. \fI--path\fR: Additional dir to add to the code path
  262. .IP
  263. \fI--default-libs\fR: Whether to use the default system added lib dirs (means you must add them all manually). Default is true
  264. .IP
  265. \fI--verbose\fR: Verbosity level, maybe between 0 and 3
  266. .IP
  267. \fI--dev-mode\fR: Symlink the applications and configuration into the release instead of copying
  268. .IP
  269. \fI--include-erts\fR: If true include a copy of erts used to build with, if a path include erts at that path. If false, do not include erts
  270. .IP
  271. \fI--override\fR: Provide an app name and a directory to override in the form <appname>:<app directory>
  272. .IP
  273. \fI--config\fR: The path to a config file
  274. .IP
  275. \fI--overlay_vars\fR: Path to a file of overlay variables
  276. .IP
  277. \fI--vm_args\fR: Path to a file to use for vm.args
  278. .IP
  279. \fI--sys_config\fR: Path to a file to use for sys.config
  280. .IP
  281. \fI--system_libs\fR: Path to dir of Erlang system libs
  282. .IP
  283. \fI--version\fR: Print relx version
  284. .IP
  285. \fI--root\fR: The project root directory
  286. .TP
  287. \fBreport\fR
  288. Provide a crash report to be sent to the rebar3 issues page.
  289. .TP
  290. \fBshell\fR [\fI--config\fR] [\fI--name\fR] [\fI--sname\fR] [\fI--setcookie\fR] [\fI--script\fR] [\fI--apps\fR] [\fI--user_drv_args\fR]
  291. Run shell with project apps and deps in path.
  292. .IP
  293. \fI--config\fR: Path to the config file to use. Defaults to {shell, [{config, File}]} and then the relx sys.config file if not specified.
  294. .IP
  295. \fI--name\fR: Gives a long name to the node.
  296. .IP
  297. \fI--sname\fR: Gives a short name to the node.
  298. .IP
  299. \fI--setcookie\fR: Sets the cookie if the node is distributed.
  300. .IP
  301. \fI--script\fR: Path to an escript file to run before starting the project apps. Defaults to rebar.config {shell, [{script_file, File}]} if not specified.
  302. .IP
  303. \fI--apps\fR: A list of apps to boot before starting the shell. (E.g. --apps app1,app2,app3) Defaults to rebar.config {shell, [{apps, Apps}]} or relx apps if not specified.
  304. .IP
  305. \fI--user_drv_args\fR: Arguments passed to user_drv start function for creating custom shells.
  306. .TP
  307. \fBtar\fR [\fI-n\fR|\fI--relname\fR] [\fI-v\fR|\fI--relvsn\fR] [\fI-g\fR|\fI--goal\fR] [\fI-u\fR|\fI--upfrom\fR] [\fI-o\fR|\fI--output-dir\fR] [\fI-h\fR|\fI--help\fR] [\fI-l\fR|\fI--lib-dir\fR] [\fI-p\fR|\fI--path\fR] [\fI--default-libs\fR] [\fI-V\fR|\fI--verbose\fR] [\fI-d\fR|\fI--dev-mode\fR] [\fI-i\fR|\fI--include-erts\fR] [\fI-a\fR|\fI--override\fR] [\fI-c\fR|\fI--config\fR] [\fI--overlay_vars\fR] [\fI--vm_args\fR] [\fI--sys_config\fR] [\fI--system_libs\fR] [\fI--version\fR] [\fI-r\fR|\fI--root\fR]
  308. Tar archive of release built of project.
  309. .IP
  310. \fI--relname\fR: Specify the name for the release that will be generated
  311. .IP
  312. \fI--relvsn\fR: Specify the version for the release
  313. .IP
  314. \fI--goal\fR: Specify a target constraint on the system. These are usually the OTP
  315. .IP
  316. \fI--upfrom\fR: Only valid with relup target, specify the release to upgrade from
  317. .IP
  318. \fI--output-dir\fR: The output directory for the release. This is `./` by default.
  319. .IP
  320. \fI--help\fR: Print usage
  321. .IP
  322. \fI--lib-dir\fR: Additional dir that should be searched for OTP Apps
  323. .IP
  324. \fI--path\fR: Additional dir to add to the code path
  325. .IP
  326. \fI--default-libs\fR: Whether to use the default system added lib dirs (means you must add them all manually). Default is true
  327. .IP
  328. \fI--verbose\fR: Verbosity level, maybe between 0 and 3
  329. .IP
  330. \fI--dev-mode\fR: Symlink the applications and configuration into the release instead of copying
  331. .IP
  332. \fI--include-erts\fR: If true include a copy of erts used to build with, if a path include erts at that path. If false, do not include erts
  333. .IP
  334. \fI--override\fR: Provide an app name and a directory to override in the form <appname>:<app directory>
  335. .IP
  336. \fI--config\fR: The path to a config file
  337. .IP
  338. \fI--overlay_vars\fR: Path to a file of overlay variables
  339. .IP
  340. \fI--vm_args\fR: Path to a file to use for vm.args
  341. .IP
  342. \fI--sys_config\fR: Path to a file to use for sys.config
  343. .IP
  344. \fI--system_libs\fR: Path to dir of Erlang system libs
  345. .IP
  346. \fI--version\fR: Print relx version
  347. .IP
  348. \fI--root\fR: The project root directory
  349. .TP
  350. \fBtree\fR [\fI-v\fR|\fI--verbose\fR]
  351. Print dependency tree.
  352. .IP
  353. \fI--verbose\fR: Print repo and branch/tag/ref for git and hg deps
  354. .TP
  355. \fBunlock\fR
  356. Unlock dependencies.
  357. .TP
  358. \fBupdate\fR
  359. Update package index.
  360. .TP
  361. \fBupgrade\fR
  362. Upgrade dependencies.
  363. .TP
  364. \fBversion\fR
  365. Print version for rebar and current Erlang.
  366. .TP
  367. \fBxref\fR
  368. Run cross reference analysis.
  369. .SH ENVIRONMENT
  370. Environment variables allow overall rebar3 control across command boundaries.
  371. .TP
  372. \fBREBAR_PROFILE\fR
  373. Choose a default profile. Defaults to \fBdefault\fR
  374. .TP
  375. \fBHEX_CDN\fR
  376. Pick an alternative hex mirror.
  377. .TP
  378. \fBREBAR_CACHE_DIR\fR
  379. Location of the directory for local cache. Defaults to \fIhex.pm\fB.
  380. .TP
  381. \fBQUIET\fR
  382. Only display errors.
  383. .TP
  384. \fBDEBUG\fR
  385. Display debug information.
  386. .TP
  387. \fBREBAR_COLOR\fR=\fIhigh\fR|\fIlow\fR
  388. How much color to show in the terminal. Defaults to \fIhigh\fR.
  389. .TP
  390. \fBREBAR_CONFIG\fR
  391. Name of rebar configuration files. Defaults to \fIrebar.config\fR
  392. .SH Configuration File Options
  393. See \fIhttp://www.rebar3.org/v3.0/docs/configuration\fR