{"__v":12,"_id":"54d7e7f68180e40d0057897b","category":{"__v":4,"_id":"54d7e7f68180e40d00578976","pages":["54d7e7f68180e40d0057897b","54d7e7f68180e40d0057897c","54d7e7f68180e40d0057897d","54d7e7f68180e40d0057897e","54d7e7f68180e40d0057897f","54d7e7f68180e40d00578980","54d7e7f68180e40d00578981","54d7e7f68180e40d00578982","54d7e7f68180e40d00578983","54d7e7f68180e40d00578984","54f0da33951e7d3700edbee5","558b5cbf9835620d0027d220","558e911e1355922f004aad87"],"project":"547fc11bb7c1e40800dcf55e","version":"54d7e7f58180e40d00578975","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2014-12-04T02:04:11.966Z","from_sync":false,"order":0,"slug":"documentation","title":"Documentation"},"project":"547fc11bb7c1e40800dcf55e","user":"547fb6a93031bc0800e5ff52","version":{"__v":1,"_id":"54d7e7f58180e40d00578975","forked_from":"547fc11bb7c1e40800dcf561","project":"547fc11bb7c1e40800dcf55e","createdAt":"2015-02-08T22:49:25.478Z","releaseDate":"2015-02-08T22:49:25.478Z","categories":["54d7e7f68180e40d00578976","54d7e7f68180e40d00578977","54d7e7f68180e40d00578978"],"is_deprecated":false,"is_hidden":false,"is_beta":true,"is_stable":true,"codename":"","version_clean":"3.0.0","version":"3"},"updates":["550c893925677e0d00b62434"],"createdAt":"2014-12-04T02:04:12.641Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"never","params":[],"url":""},"isReference":false,"order":0,"body":"[block:callout]\n{\n  \"type\": \"warning\",\n  \"title\": \"Backwards Compatibility\",\n  \"body\": \"We attempt very limited backwards compatibility with previous rebar versions' configurations and will try to call out important changes in the documentation.\"\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Installing Binary\"\n}\n[/block]\nDownload a nightly binary [here](https://s3.amazonaws.com/rebar3/rebar3). Ensure it is executable (`chmod +x`) and simply copy to a directory in your `$PATH`. \n\nIt is common to create a directory `~/bin/` to place commands like `rebar3` and add it to your path with `export PATH=~/bin/:$PATH` in your `~/.bashrc`, `~/.zshrc` or equivalent.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Installing from Source\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"$ git clone https://github.com/erlang/rebar3.git\\n$ cd rebar3\\n$ ./bootstrap\",\n      \"language\": \"shell\"\n    }\n  ]\n}\n[/block]\nAnd now you have the script `rebar3` and can copy it to somewhere in your `$PATH` as described in the previous section.\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Extracting and Upgrading\"\n}\n[/block]\nAn additional way to install and run rebar3 can be found under the `local` namespace. `rebar3 local install` will extract the contents of the escript to `~/.cache/rebar3/lib` and create a shell script `~/.cache/rebar3/bin/rebar3`:\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"$ ./rebar3 local install\\n===> Extracting rebar3 libs to ~/.cache/rebar3/lib...\\n===> Writing rebar3 run script ~/.cache/rebar3/bin/rebar3...\\n===> Add to $PATH for use: export PATH=$PATH:~/.cache/rebar3/bin\",\n      \"language\": \"shell\"\n    }\n  ]\n}\n[/block]\nPlus, `rebar3 unstable upgrade` will fetch the latest escript from s3 and install the same way: \n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"$ rebar3 local upgrade\\n===> Extracting rebar3 libs to ~/.cache/rebar3/lib...\\n===> Writing rebar3 run script ~/.cache/rebar3/bin/rebar3...\\n===> Add to $PATH for use: export PATH=$PATH:~/.cache/rebar3/bin\",\n      \"language\": \"shell\"\n    }\n  ]\n}\n[/block]\n\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Creating a New Project\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"$ rebar3 new release myrelease\\n===> Writing apps/myrelease/src/myrelease_app.erl\\n===> Writing apps/myrelease/src/myrelease_sup.erl\\n===> Writing apps/myrelease/src/myrelease.app.src\\n===> Writing rebar.config\\n===> Writing config/sys.config\\n===> Writing config/vm.args\\n===> Writing .gitignore\\n===> Writing LICENSE\\n===> Writing README.md\",\n      \"language\": \"shell\"\n    }\n  ]\n}\n[/block]\nContinue on to [Basic Usage](/docs/basic-usage) to learn more on how to use `rebar3`.","excerpt":"","slug":"getting-started","type":"basic","title":"Getting Started"}
[block:callout] { "type": "warning", "title": "Backwards Compatibility", "body": "We attempt very limited backwards compatibility with previous rebar versions' configurations and will try to call out important changes in the documentation." } [/block] [block:api-header] { "type": "basic", "title": "Installing Binary" } [/block] Download a nightly binary [here](https://s3.amazonaws.com/rebar3/rebar3). Ensure it is executable (`chmod +x`) and simply copy to a directory in your `$PATH`. It is common to create a directory `~/bin/` to place commands like `rebar3` and add it to your path with `export PATH=~/bin/:$PATH` in your `~/.bashrc`, `~/.zshrc` or equivalent. [block:api-header] { "type": "basic", "title": "Installing from Source" } [/block] [block:code] { "codes": [ { "code": "$ git clone https://github.com/erlang/rebar3.git\n$ cd rebar3\n$ ./bootstrap", "language": "shell" } ] } [/block] And now you have the script `rebar3` and can copy it to somewhere in your `$PATH` as described in the previous section. [block:api-header] { "type": "basic", "title": "Extracting and Upgrading" } [/block] An additional way to install and run rebar3 can be found under the `local` namespace. `rebar3 local install` will extract the contents of the escript to `~/.cache/rebar3/lib` and create a shell script `~/.cache/rebar3/bin/rebar3`: [block:code] { "codes": [ { "code": "$ ./rebar3 local install\n===> Extracting rebar3 libs to ~/.cache/rebar3/lib...\n===> Writing rebar3 run script ~/.cache/rebar3/bin/rebar3...\n===> Add to $PATH for use: export PATH=$PATH:~/.cache/rebar3/bin", "language": "shell" } ] } [/block] Plus, `rebar3 unstable upgrade` will fetch the latest escript from s3 and install the same way: [block:code] { "codes": [ { "code": "$ rebar3 local upgrade\n===> Extracting rebar3 libs to ~/.cache/rebar3/lib...\n===> Writing rebar3 run script ~/.cache/rebar3/bin/rebar3...\n===> Add to $PATH for use: export PATH=$PATH:~/.cache/rebar3/bin", "language": "shell" } ] } [/block] [block:api-header] { "type": "basic", "title": "Creating a New Project" } [/block] [block:code] { "codes": [ { "code": "$ rebar3 new release myrelease\n===> Writing apps/myrelease/src/myrelease_app.erl\n===> Writing apps/myrelease/src/myrelease_sup.erl\n===> Writing apps/myrelease/src/myrelease.app.src\n===> Writing rebar.config\n===> Writing config/sys.config\n===> Writing config/vm.args\n===> Writing .gitignore\n===> Writing LICENSE\n===> Writing README.md", "language": "shell" } ] } [/block] Continue on to [Basic Usage](/docs/basic-usage) to learn more on how to use `rebar3`.