REBAR3(1)
π REBAR3(1) β the girlies' guide to the rebar3 manual page π
General Commands Manual Β· REBAR3(1)
okay bestie, sit DOWN, because we're about to go through the entire rebar3 manual together and I promise it's gonna be more fun than it has any right to be. this is part 1 so don't you dare think we're done. π
β¨ NAME β¨
rebar3 β the tool for working with Erlang projects. that's it. that's the whole vibe. π
β¨ SYNOPSIS β¨
rebar3 --version
rebar3 help
rebar3 command [options] ...
literally three shapes, that's all she wrote: ask for the version, ask for help, or run a command with some options tacked on the end. slay. β¨
β¨ DESCRIPTION β¨
Rebar3 is an Erlang tool that makes it easy to create, develop, and release Erlang libraries, applications, and systems in a repeatable manner. no chaos, no "it worked on my machine", just repeatable. iconic behaviour honestly. π
Full documentation at http://www.rebar3.org/ β go look, it's giving knowledge. π
β¨ ESSENTIAL COMMANDS β¨
okay so for the full command list you gotta scroll down to the COMMANDS section, but here's the starter pack, the main-character commands, the ones you'll actually be typing every single day.
Also real quick: with rebar3 help <task>, commands and plugins will display their own help information. so if you're lost, just ask. they'll tell you. π«Ά
compileβ Compile the current project. yes queen, build it. π₯new (help [template])|templateβ Show information about templates or use one. templates are your little project blueprints. πupdateβ Fetch the newest version of the Hex index. gotta stay fresh, gotta stay updated, no cap. β¨do command[,command,...]β Run one or more commands in a sequence. multiple commands, one girlboss move. πshellβ Start the current project in a REPL. You can then user3:do(task)to call it on the project without dropping the current state. this is the good stuff, keep your session alive while you poke at tasks. π¦
β¨ COMMANDS β¨
here we go, the full menu. every single one. no skipping, no summarising, we're eating the whole plate. π
as
Higher order provider for running multiple tasks in a sequence as a certain profiles.
(that's the original wording and I'm keeping it exactly, plural profiles and all, because facts are facts. π)
clean
clean [-a|--all] [-p|--profile]
Remove compiled beam files from apps.
-a,--allβ Clean all apps include deps. everything. the whole closet. π-p,--profileβ Clean under profile. Equivalent torebar3 as <profile> clean.
compile
compile [-d|--deps_only]
Compile apps .app.src and .erl files.
-d,--deps_onlyβ Only compile dependencies, no project apps will be built. deps only, your own apps get to nap. π΄
cover
cover [-r|--reset] [-v|--verbose] [-m|--min_coverage]
Perform coverage analysis.
-r,--resetβ Reset all coverdata.-v,--verboseβ Print coverage analysis.-m,--min_coverageβ Mandate a coverage percentage required to succeed (0..100). yes, a number from0to100, and yes, you have to hit it. no hiding from the numbers bestie. π
ct
ct [--dir] [--suite] [--group] [--case] [--label] [--config] [--spec]
[--join_specs] [--allow_user_terms] [--logdir] [--logopts] [--verbosity]
[-c|--cover] [--cover_export_name] [--repeat] [--duration] [--until]
[--force_stop] [--basic_html] [--stylesheet] [--decrypt_key]
[--decrypt_file] [--abort_if_missing_suites] [--multiply_timetraps]
[--scale_timetraps] [--create_priv_dir] [--include] [--readable]
[-v|--verbose] [--name] [--sname] [--setcookie] [--sys_config]
[--compile_only] [--retry]
Run Common Tests. this is the big one, the marathon, the ct girlies know. πβοΈπ¨
--dirβ List of additional directories containing test suites--suiteβ List of test suites to run--groupβ List of test groups to run--caseβ List of test cases to run--labelβ Test label--configβ List of config files--specβ List of test specifications--join_specsβ Merge all test specifications and perform a single test run--allow_user_termsβ Allow user defined config values in config files--logdirβ Log folder--logoptsβ Options for common test logging--verbosityβ Verbosity-c,--coverβ Generate cover data--cover_export_nameβ Base name of the coverdata file to write--repeatβ How often to repeat tests--durationβ Max runtime (format:HHMMSS)--untilβ Run until (format:HHMMSS)--force_stopβ Force stop on test timeout (true | false | skip_rest)--basic_htmlβ Show basic HTML--stylesheetβ CSS stylesheet to apply to html output--decrypt_keyβ Path to key for decrypting config--decrypt_fileβ Path to file containing key for decrypting config--abort_if_missing_suitesβ Abort if suites are missing--multiply_timetrapsβ (yep, the original gives this one no description at all, so I'm not inventing one. it exists, it's there, that's the tea. π«)--scale_timetrapsβ Scale timetraps--create_priv_dirβ Create priv dir (auto_per_run | auto_per_tc | manual_per_tc)--includeβ Directories containing additional include files--readableβ Shows test case names and only displays logs to shell on failures (true | compact | false)-v,--verboseβ Verbose output--nameβ Gives a long name to the node--snameβ Gives a short name to the node--setcookieβ Sets the cookie if the node is distributed--sys_configβ List of application config files--compile_onlyβ Compile modules in the project with the test configuration but do not run the tests--retryβ Experimental feature. If any specification for previously failing test is found, runs them.
β οΈ heads up bestie: --retry is marked Experimental feature in the original. experimental means experimental. don't be shocked if it does experimental things. π
deps
List dependencies. just... lists them. simple. clean. a little snack. π
dialyzer
dialyzer [-u|--update-plt] [-s|--succ-typings]
Run the Dialyzer analyzer on the project.
-u,--update-pltβ Enable updating the PLT. Default:true-s,--succ-typingsβ Enable success typing analysis. Default:true
both default to true btw, so dialyzer is doing the most right out of the box. π₯
do
Higher order provider for running multiple tasks in a sequence.
edoc
Generate documentation using edoc. docs are self care. πβ¨
escriptize
Generate escript archive.
eunit
eunit [--app] [--application] [-c|--cover] [--cover_export_name]
[-d|--dir] [-f|--file] [-m|--module] [-s|--suite] [-v|--verbose]
[--name] [--sname] [--setcookie]
Run EUnit Tests.
--appβ Comma separated list of application test suites to run. Equivalent to[{application, App}].--applicationβ Comma separated list of application test suites to run. Equivalent to[{application, App}].-c,--coverβ Generate cover data. Defaults tofalse.--cover_export_nameβ Base name of the coverdata file to write-d,--dirβ Comma separated list of dirs to load tests from. Equivalent to[{dir, Dir}].-f,--fileβ Comma separated list of files to load tests from. Equivalent to[{file, File}].-m,--moduleβ Comma separated list of modules to load tests from. Equivalent to[{module, Module}].-s,--suiteβ Comma separated list of modules to load tests from. Equivalent to[{module, Module}].-v,--verboseβ Verbose output. Defaults tofalse.--nameβ Gives a long name to the node--snameβ Gives a short name to the node--setcookieβ Sets the cookie if the node is distributed
π not me noticing--moduleand--suitehave the exact same description and the exact same[{module, Module}]equivalent. that's how the original rolls, so that's how we roll. copy it verbatim, don't "fix" it.
get-deps
Fetch dependencies. go get 'em. πβοΈ
help
Display a list of tasks or help for a given task or subtask.
new
new [-f|--force]
Create new project from templates. baby's first project, so cute. π
-f,--forceβ overwrite existing files
β οΈ --force means overwrite existing files. like, actually overwrite them. be sure before you commit to that energy.
path
path [--app] [--base] [--bin] [--ebin] [--lib] [--priv] [-s|--separator]
[--src] [--rel]
Print paths to build dirs in current profile.
--appβ Comma separated list of applications to return paths for.--baseβ Return the `base' path of the current profile. (keeping that stray backtick exactly as the original has it, iykyk π )--binβ Return the `bin' path of the current profile.--ebinβ Return all `ebin' paths of the current profile's applications.--libβ Return the `lib' path of the current profile.--privβ Return the `priv' path of the current profile's applications.-s,--separatorβ In case of multiple return paths, the separator character to use to join them.--srcβ Return the `src' path of the current profile's applications.--relβ Return the `rel' path of the current profile.
pkgs
List information for a package. π¦
release
release [-n|--relname] [-v|--relvsn] [-g|--goal] [-u|--upfrom]
[-o|--output-dir] [-h|--help] [-l|--lib-dir] [-p|--path] [--default-
libs] [-V|--verbose] [-d|--dev-mode] [-i|--include-erts] [-a|--override]
[-c|--config] [--overlay_vars] [--vm_args] [--sys_config]
[--system_libs] [--version] [-r|--root]
Build release of project. this is the big girlboss finale energy. π
-n,--relnameβ Specify the name for the release that will be generated-v,--relvsnβ Specify the version for the release-g,--goalβ Specify a target constraint on the system. These are usually the OTP-u,--upfromβ Only valid with relup target, specify the release to upgrade from-o,--output-dirβ The output directory for the release. This is./by default.-h,--helpβ Print usage-l,--lib-dirβ Additional dir that should be searched for OTP Apps-p,--pathβ Additional dir to add to the code path--default-libsβ Whether to use the default system added lib dirs (means you must add them all manually). Default istrue-V,--verboseβ Verbosity level, maybe between 0 and 3-d,--dev-modeβ Symlink the applications and configuration into the release instead of copying-i,--include-ertsβ 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-a,--overrideβ Provide an app name and a directory to override in the form<appname>:<app directory>-c,--configβ The path to a config file--overlay_varsβ Path to a file of overlay variables--vm_argsβ Path to a file to use for vm.args--sys_configβ Path to a file to use for sys.config--system_libsβ Path to dir of Erlang system libs--versionβ Print relx version-r,--rootβ The project root directory
relup
relup [-n|--relname] [-v|--relvsn] [-g|--goal] [-u|--upfrom]
[-o|--output-dir] [-h|--help] [-l|--lib-dir] [-p|--path] [--default-
libs] [-V|--verbose] [-d|--dev-mode] [-i|--include-erts] [-a|--override]
[-c|--config] [--overlay_vars] [--vm_args] [--sys_config]
[--system_libs] [--version] [-r|--root]
Create relup of releases. upgrade paths, we love a glow-up. π
-n,--relnameβ Specify the name for the release that will be generated-v,--relvsnβ Specify the version for the release-g,--goalβ Specify a target constraint on the system. These are usually the OTP-u,--upfromβ Only valid with relup target, specify the release to upgrade from-o,--output-dirβ The output directory for the release. This is./by default.-h,--helpβ Print usage-l,--lib-dirβ Additional dir that should be searched for OTP Apps-p,--pathβ Additional dir to add to the code path--default-libsβ Whether to use the default system added lib dirs (means you must add them all manually). Default istrue-V,--verboseβ Verbosity level, maybe between 0 and 3-d,--dev-modeβ Symlink the applications and configuration into the release instead of copying-i,--include-ertsβ 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-a,--overrideβ Provide an app name and a directory to override in the form<appname>:<app directory>-c,--configβ The path to a config file--overlay_varsβ Path to a file of overlay variables--vm_argsβ Path to a file to use for vm.args--sys_configβ Path to a file to use for sys.config--system_libsβ Path to dir of Erlang system libs
okay wait. that's where part 1 of this manual page ends β the relup options list runs out right at --system_libs and then the original just... continues in the next chunk. so we are NOT done bestie, hold on, there's more page coming. don't go anywhere. π
--versionβ Print relx version π--rootβ The project root directory π
π report
Provide a crash report to be sent to the rebar3 issues page. π«Ά
π shell
shell [--config] [--name] [--sname] [--setcookie] [--script] [--apps] [--start-clean] [--user_drv_args]
Run shell with project apps and deps in path. β¨
--configβ Path to the config file to use. Defaults to{shell, [{config, File}]}and then the relxsys.configfile if not specified. π--nameβ Gives a long name to the node. π--snameβ Gives a short name to the node. πΈ--setcookieβ Sets the cookie if the node is distributed. πͺ--scriptβ Path to an escript file to run before starting the project apps. Defaults torebar.config{shell, [{script_file, File}]}if not specified. π--appsβ A list of apps to boot before starting the shell. (E.g.--apps app1,app2,app3) Defaults torebar.config{shell, [{apps, Apps}]}or relx apps if not specified. π--start-cleanβ Cancel any applications in the'apps'list or release. π§Ό--user_drv_argsβ Arguments passed touser_drvstart function for creating custom shells. π»
π¦ tar
tar [-n|--relname] [-v|--relvsn] [-g|--goal] [-u|--upfrom] [-o|--output-dir] [-h|--help] [-l|--lib-dir] [-p|--path] [--default-libs] [-V|--verbose] [-d|--dev-mode] [-i|--include-erts] [-a|--override] [-c|--config] [--overlay_vars] [--vm_args] [--sys_config] [--system_libs] [--version] [-r|--root]
Tar archive of release built of project. ποΈ
--relnameβ Specify the name for the release that will be generated. β¨--relvsnβ Specify the version for the release. π’--goalβ Specify a target constraint on the system. These are usually the OTP. π―--upfromβ Only valid withreluptarget, specify the release to upgrade from. β¬οΈ--output-dirβ The output directory for the release. This is./by default. π--helpβ Print usage. π--lib-dirβ Additional dir that should be searched for OTP Apps. π--pathβ Additional dir to add to the code path. π€οΈ--default-libsβ Whether to use the default system added lib dirs (means you must add them all manually). Default istrue. β--verboseβ Verbosity level, maybe between0and3. π--dev-modeβ Symlink the applications and configuration into the release instead of copying. π--include-ertsβ Iftrueinclude a copy ofertsused to build with, if a path includeertsat that path. Iffalse, do not includeerts. π§¬--overrideβ Provide an app name and a directory to override in the form<appname>:<app directory>. ποΈ--configβ The path to a config file. βοΈ--overlay_varsβ Path to a file of overlay variables. π¨--vm_argsβ Path to a file to use forvm.args. π₯οΈ--sys_configβ Path to a file to use forsys.config. π--system_libsβ Path to dir of Erlang system libs. π--versionβ Print relx version. π--rootβ The project root directory. π
π³ tree
tree [-v|--verbose]
Print dependency tree. π²
--verboseβ Print repo and branch/tag/ref for git and hg deps. π
π unlock
Unlock dependencies. π
π update
Update package index. π¦
β¬οΈ upgrade
Upgrade dependencies. π
π·οΈ version
Print version for rebar and current Erlang. βΉοΈ
π xref
Run cross reference analysis. π΅οΈ
π ENVIRONMENT π
Environment variables allow overall rebar3 control across command boundaries. π
REBAR_PROFILEβ Choose a default profile. Defaults todefault. πHEX_CDNβ Pick an alternative hex mirror. πͺREBAR_CACHE_DIRβ Location of the directory for local cache. Defaults tohex.pm. πΎQUIETβ Only display errors. π€«DEBUGβ Display debug information. πREBAR_COLOR=high|lowβ How much color to show in the terminal. Defaults tohigh. π¨REBAR_CONFIGβ Name of rebar configuration files. Defaults torebar.config. πREBAR_GIT_CLONE_OPTIONSβ Arguments to add after each git clone operation. For example, the value--reference ~/.cache/repos.referenceallows to create a cache of all fetched repositories across builds. π₯
π§ Configuration File Options π§
See http://www.rebar3.org/v3.0/docs/configuration. π
Source: Erlang, dated November 2018, for REBAR3(1) β slay bestie, bye πβ¨
π¦ where this page comes from
- alpine 3.24: rebar3-doc 3.27.3-r0 Β· Apache-2.0
- arch rolling: rebar3 3.27.1-1 Β· Apache-2.0
- fedora 43: erlang-rebar3 3.24.0-5.fc43 Β· Apache-2.0 and MIT
- fedora 43: erlang-rebar3 3.27.0-5.fc43 Β· Apache-2.0 and MIT
- fedora 44: erlang-rebar3 3.27.0-1.fc44 Β· Apache-2.0 and MIT
- fedora 44: erlang-rebar3 3.27.0-5.fc44 Β· Apache-2.0 and MIT
- opensuse-leap 16.0: erlang-rebar3 3.23.0-160000.2.2 Β· Apache-2.0
- opensuse-leap 16.0: erlang-rebar3 3.23.0-160000.2.2 Β· Apache-2.0
- opensuse-leap 16.0: erlang-rebar3 3.23.0-160000.2.2 Β· Apache-2.0
- opensuse-leap 16.0: erlang-rebar3 3.23.0-160000.2.2 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms