{"id":13435230,"url":"https://github.com/kerl/kerl","last_synced_at":"2025-05-14T00:09:48.126Z","repository":{"id":1025526,"uuid":"2000878","full_name":"kerl/kerl","owner":"kerl","description":"Easy building and installing of Erlang/OTP instances","archived":false,"fork":false,"pushed_at":"2025-04-23T13:15:05.000Z","size":818,"stargazers_count":1624,"open_issues_count":8,"forks_count":238,"subscribers_count":62,"default_branch":"master","last_synced_at":"2025-04-23T14:25:01.656Z","etag":null,"topics":["erlang","homebrew","kerl","otp-release","shell"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kerl.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2011-07-05T14:35:55.000Z","updated_at":"2025-04-23T13:12:58.000Z","dependencies_parsed_at":"2024-02-12T23:26:32.701Z","dependency_job_id":"d0c0b129-223f-4fca-8088-cdcbe4a7f363","html_url":"https://github.com/kerl/kerl","commit_stats":{"total_commits":444,"total_committers":85,"mean_commits":5.223529411764706,"dds":0.786036036036036,"last_synced_commit":"a3fb06ecb872f462164b42de1c2c2d2ae6071448"},"previous_names":[],"tags_count":52,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kerl%2Fkerl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kerl%2Fkerl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kerl%2Fkerl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kerl%2Fkerl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kerl","download_url":"https://codeload.github.com/kerl/kerl/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254044224,"owners_count":22005104,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["erlang","homebrew","kerl","otp-release","shell"],"created_at":"2024-07-31T03:00:34.074Z","updated_at":"2025-05-14T00:09:48.082Z","avatar_url":"https://github.com/kerl.png","language":"Shell","readme":"# `kerl` [![GitHub Actions CI][ci-img]][ci] [![GitHub Actions Lint][lint-img]][lint]\n\n[ci-img]: https://github.com/kerl/kerl/actions/workflows/ci.yml/badge.svg\n[ci]: https://github.com/kerl/kerl/actions/workflows/ci.yml\n[lint-img]: https://github.com/kerl/kerl/actions/workflows/lint.yml/badge.svg\n[lint]: https://github.com/kerl/kerl/actions/workflows/lint.yml\n\nEasy building and installing of [Erlang/OTP](https://www.erlang.org) instances.\n\n`kerl` aims to be shell agnostic (it runs in a POSIX shell) and its only dependencies,\nexcluding what's required to actually build Erlang/OTP, are `curl` and `git`.\n\nAll is done so that, once a specific release has been built, creating a new\ninstallation is as fast as possible.\n\n## Table of Contents\n\n- [Installing `kerl`](#installing-kerl)\n- [How `kerl` works](#how-kerl-works)\n- [Using `kerl`](#using-kerl)\n- [`kerl` options](#kerl-options)\n- [Command reference](#command-reference)\n- [Important notes](#important-notes)\n- [Shell support](#shell-support)\n- [The `kerl` glossary](#the-kerl-glossary)\n- [The `kerl` project](#the-kerl-project)\n\n## Installing `kerl`\n\nIf you are on macOS, and using [homebrew](https://github.com/Homebrew/brew),\nyou can install `kerl`, along with shell completion, by running:\n\n```console\n$ brew install kerl\n```\n\nAlternatively, you can download the script directly from GitHub:\n\n```console\n$ curl -O https://raw.githubusercontent.com/kerl/kerl/master/kerl\n```\n\nThen ensure it is executable\n\n```console\n$ chmod a+x kerl\n```\n\nand drop it in your `$PATH`.\n\nOptionally, download and install `kerl`'s `bash_completion` file from\n\u003chttps://github.com/kerl/kerl/raw/master/bash_completion/kerl\u003e\n\nOptionally, download and install `kerl`'s `zsh-completion` file from\n\u003chttps://github.com/kerl/kerl/raw/master/zsh_completion/_kerl\u003e\n\n### Updating `kerl` locally\n\nRun:\n\n```console\n$ kerl upgrade\nLocal kerl found (/usr/local/bin/kerl) at version 2.6.0.\nRemote kerl found at version 3.0.0.\nVersions are different. Upgrading to 3.0.0...\nkerl 3.0.0 is now available at /usr/local/bin/kerl.\nUpdating list of available releases...\n... done!\n```\n\n## How `kerl` works\n\n`kerl` keeps tracks of the releases it downloads, builds and installs, allowing\neasy installations to new destinations (without complete rebuilding) and easy\nswitches between Erlang/OTP installations.\n\nBy default, `kerl` downloads source tarballs from the [official Erlang/OTP repository](https://github.com/erlang/otp/tags)\nbut you can tell `kerl` to download from the [official Erlang/OTP website](https://www.erlang.org/downloads)\nby setting `KERL_BUILD_BACKEND=tarball`.\nHowever, this website does not use HTTPS and is down more often than GitHub.\n\nYou can also install directly from a raw Git repository by using the\n`kerl build git \u003cgit_url\u003e \u003cgit_version\u003e \u003cbuild_name\u003e` syntax.\n\n## Using `kerl`\n\nList the available releases:\n\n```console\n$ kerl list releases\n17.5.6.10\n18.3.4.11\n19.3.6.13\n20.3.8.26\n21.3.8.24\n22.3.4.26\n23.3.4.19\n24.3.4.16\n25.3.2.9 *\n26.2.2 *\n27.0 *\nRun './kerl update releases' to update this list.\nRun './kerl list releases all' to view all available releases.\nNote: * means \"currently supported\".\n```\n\nPick your choice and build it:\n\n```console\n$ kerl build 27.0 27.0\nDownloading (from GitHub) Erlang/OTP 27.0 to /home/user/.kerl/archives...\n...\nExtracting source code for normal build...\nBuilding (normal) Erlang/OTP 27.0 (27.0); please wait...\n...\nErlang/OTP 27.0 (27.0) has been successfully built.\n```\n\nNote that named builds allow you to have different builds for the same Erlang/OTP release with\ndifferent configure options:\n\n```console\n$ KERL_BUILD_DOCS=yes kerl build 27.0 27.0-builtdocs\nExtracting source code for normal build...\nBuilding Erlang/OTP 27.0 (27.0-builtdocs); please wait...\n...\nBuilding docs...\nErlang/OTP 27.0 (27.0-builtdocs) has been successfully built.\n```\n\nYou can verify your build has been registered:\n\n```console\n$ kerl list builds\n27.0,27.0\n27.0,27.0-builtdocs\n```\n\nNow install a build to some location:\n\n```console\n$ kerl install 27.0 /usr/local/lib/erlang/27.0\nInstalling Erlang/OTP 27.0 (27.0) in /usr/local/lib/erlang/27.0...\nBuilding Dialyzer PLT...\nDone building /usr/local/lib/erlang/27.0/dialyzer/plt.\nYou can activate this installation running the following command:\n. /usr/local/lib/erlang/27.0/activate\nLater on, you can leave the installation typing:\nkerl_deactivate\n```\n\nHere again you can check the installation's been registered:\n\n```console\n$ kerl list installations\n27.0 /usr/local/lib/erlang/27.0\n```\n\nAnd at last activate it:\n\n```console\n$ . /usr/local/lib/erlang/27.0/activate\n```\n\nActivation will backup your `$PATH`, and prepend it with the installation's `bin/`\ndirectory. Thus it's only valid for the current shell session, and until you either\nactivate another installation or call `kerl_deactivate`.\n\n**Note**: alternatively you can use `kerl build-install` as a shortcut for\nthe two previous actions to be played in sequence.\n\n```console\n$ kerl build-install\nusage: ./kerl build-install \u003crelease\u003e [build_name] [directory]\n```\n\n```console\n$ kerl build-install git\nusage: ./kerl build-install git \u003cgit_url\u003e \u003cgit_version\u003e \u003cbuild_name\u003e [directory]\n```\n\nYou're now ready to work with your 27.0 installation:\n\n```console\n$ erl -version\nErlang (SMP,ASYNC_THREADS) (BEAM) emulator version 13.2\n```\n\nWhen you're done just call the shell function:\n\n```console\n$ kerl_deactivate\n```\n\nAnytime you can check which installation, if any, is currently active with:\n\n```console\n$ kerl active\nThe current active installation is:\n/usr/local/lib/erlang/27.0\n```\n\nYou can get an overview of the current `kerl` state with:\n\n```console\n$ kerl status\nAvailable builds:\n27.0,27.0\n27.0,27.0-builtdocs\n----------\nAvailable installations:\n27.0 /usr/local/lib/erlang/27.0\n----------\nThe current active installation is:\n/usr/local/lib/erlang/27.0\nThe Dialyzer PLT for the active installation is:\n/usr/local/lib/erlang/27.0/dialyzer/plt\nThe build options for the active installation are:\n...\n```\n\nYou can delete builds and installations with the following commands:\n\n```console\n$ kerl delete build 27.0-builtdocs\nBuild '27.0-builtdocs' has been deleted.\n```\n\n```console\n$ kerl delete installation 27.0\nInstallation '27.0' has been deleted.\n```\n\nYou can easily deploy an installation to another host having `ssh` and `rsync` access with the\nfollowing command:\n\n```console\n$ kerl deploy anotherhost /usr/local/lib/erlang/27.0\nCloning Erlang/OTP 27.0 (/usr/local/lib/erlang/27.0) to anotherhost (/usr/local/lib/erlang/27.0)...\n```\n\nOn `anotherhost`, you can activate this installation running the following command:\n\n```console\n$ . /usr/local/lib/erlang/27.0/activate\n```\n\nLater on, you can leave the installation typing:\n\n```console\n$ kerl_deactivate\n```\n\n### Building Erlang/OTP from a GitHub fork\n\nIt is possible to build Erlang/OTP from a GitHub fork, by using the `KERL_BUILD_BACKEND=git` and\nsetting `OTP_GITHUB_URL` to the URL of the fork. For example, to build `\u003corgname\u003e's` Erlang/OTP fork:\n\n```console\n$ export KERL_BUILD_BACKEND=git\n$ export OTP_GITHUB_URL='https://github.com/\u003corgname\u003e/otp'\n$ KERL_INCLUDE_RELEASE_CANDIDATES=yes kerl update releases\nGetting releases from GitHub...\nThe available releases are:\n...\n24.0-rc3\n24.0-rc3.1-orgname\n24.3.4.16\n24.3.4.16.1.1-orgname\n25.0-rc3 *\n25.0-rc3.1-orgname *\n25.3.2.9 *\n25.3.2.9.1-orgname *\n26.0-rc3 *\n26.0-rc3.1-orgname *\n26.2.2 *\n26.2.2.1-orgname *\n27.0 *\n27.0.1-orgname *\n```\n\n**Note**: this list, kept in a file managed by `kerl`, is different depending on the build backend\nyou use.\n\nFrom here (provided the `KERL_BUILD_BACKEND` and `OTP_GITHUB_URL` variables remain in place), it is\npossible to use `kerl` as before:\n\n```console\n$ kerl build 27.0.1-orgname 27.0.1-orgname\n```\n\n### Building Erlang/OTP from a Git source\n\nYou can build Erlang/OTP directly from a Git repository with a command of the form\n`kerl build git \u003cgit_url\u003e \u003cgit_version\u003e \u003cbuild_name\u003e` where `\u003cgit_version\u003e` can\nbe either a branch, a tag or a commit id that will be passed to `git checkout`:\n\n```console\n$ kerl build git https://github.com/erlang/otp.git OTP-27.0 27.0\nChecking out Erlang/OTP git repository from https://github.com/erlang/otp.git...\nBuilding (git) Erlang/OTP OTP-27.0; please wait...\nErlang/OTP '27.0' (from git) has been successfully built.\n```\n\n### Debugging `kerl` usage\n\nIf `KERL_DEBUG` is set to a value, then `kerl` will emit copious debug logging, including\na best effort attempt at line numbers. The line numbers may or may not be accurate if\n`kerl` is run under the `dash` shell, as is commonly found in Alpine Linux/Docker images.\n\n### Configuring `kerl`\n\nYou can tune `kerl` using the `.kerlrc` file in your `$HOME` directory.\n\n### `kerl` and OpenSSL\n\nIf you're running `kerl` on macOS, it will try to guess the OpenSSL\nversion to use if none is specified (e.g. via `KERL_CONFIGURE_OPTIONS`' `--with-ssl`).\n\nSince Erlang/OTP 25.1, OpenSSL 3.0 is supported, so the following applies\n\n| Erlang/OTP version | OpenSSL version |\n|-                   |-                |\n| up until 25.1      | 1.1             |\n| after 25.1         | 3.0             |\n\n## `kerl` options\n\n`kerl` options can be passed either via `.kerlrc` or environment variables, as shown below.\n\n### Color configuration\n\n#### `KERL_COLORIZE`\n\nDefault: 1 (Enabled)\nEnable VT100 colorizing if `tput` available (provided by `ncurses`). Set to 0 to disable.\nColorization will be disabled anyway if necessary requirements are missing.\n\nColor for log levels can be overriden, by setting ANSI numerical color code to variables\n`KERL_COLOR_*` :\n\n- `KERL_COLOR_E` : (1=red) Error level color\n- `KERL_COLOR_W` : (3=yellow) Warning level color\n- `KERL_COLOR_N` : (4=blue) Notice level color\n- `KERL_COLOR_T` : (6=cyan) Tip level color\n- `KERL_COLOR_S` : (2=green) Success level color\n- `KERL_COLOR_D` : (9) Default Terminal color\n\n### Locations on disk\n\n#### `KERL_BASE_DIR`\n\nDefault: `$HOME/.kerl`\nDirectory in which `kerl` will cache artifacts for building and installing.\n\n#### `KERL_CONFIG`\n\nDefault: `$HOME/.kerlrc`\nFile from which to source `kerl` configuration\n\n#### `KERL_DOWNLOAD_DIR`\n\nDefault: `${KERL_BASE_DIR}/archives`\nDirectory in which to place downloaded artifacts\n\n#### `KERL_BUILD_DIR`\n\nDefault: `${KERL_BASE_DIR}/builds`\nDirectory in which `kerl` will perform builds\n\n#### `KERL_GIT_DIR`\n\nDefault: `${KERL_BASE_DIR}/gits`\nDirectory in which `kerl` will clone Git repositories for building.\n\n### Build configuration\n\n#### `KERL_CHECK_BUILD_PACKAGES`\n\nDefault: yes (Enabled)\n`kerl` will try to probe your Linux distro for build-required packages logging\nwhere the probes fail. You can turn off this behaviour by setting the\nenvironment variable to something other than \"yes\".\n\n#### `KERL_AUTOCLEAN`\n\nDefault: 1 (Enabled)\nClean all build artifacts but the log file on failure. This allows safe build retries\nafter failure while still keeping a log file with all attempted builds until\nsuccess.\n\nSet to 0 to keep build artifacts on failure.\n\n#### `KERL_CONFIGURE_OPTIONS`\n\nSpace-separated options to pass to `configure` when building Erlang/OTP.\n\n#### `KERL_CONFIGURE_APPLICATIONS`\n\nSpace-separated list of Erlang/OTP applications which should exclusively be built.\n\n#### `KERL_CONFIGURE_DISABLE_APPLICATIONS`\n\nSpace-separated list of Erlang/OTP applications to disable during building.\n\n#### `KERL_BUILD_PLT`\n\nCreate a PLT file alongside the built release.\n\n#### `KERL_USE_AUTOCONF`\n\nUse `autoconf` during build process.\n\n**Note**: automatically enabled when using `KERL_BUILD_BACKEND=git`\n\n#### `KERL_BUILD_BACKEND`\n\nDefault value: `git`\nAcceptable values: `tarball`, `git`\n\n- `tarball`: fetch Erlang/OTP releases from \u003cerlang.org\u003e\n- `git`: fetch Erlang/OTP releases from [`$OTP_GITHUB_URL`](#otp_github_url)\n\n**Note**: docs are only fetched when this is set to `tarball`. To enable creation of docs when set to\n`git`, one must also set [`$KERL_BUILD_DOCS`](#kerl_build_docs).\n\n**Note**: this option has no effect when using `kerl build git...`, which invokes `kerl` to directly\nclone a Git repository and build from there.\n\n#### `KERL_RELEASE_TARGET`\n\nAllows building, alongside the regular VM, a list of various runtime types for debugging\n(such as `cerl -debug` or `cerl -asan`)\n\n**Note**: enable this build using `KERL_RELEASE_TARGET=\"debug asan\"`\n\n**Note**: available types: `opt`, `gcov`, `gprof`, `debug`, `valgrind`, `asan` or `lcnt`\n\nFor more information: see  \"How to Build a Debug Enabled Erlang RunTime System\" in\n\u003chttps://www.erlang.org/doc/installation_guide/install\u003e.\n\n#### `OTP_GITHUB_URL`\n\nDefault value: `https://github.com/erlang/otp`\nAcceptable value: any GitHub fork of Erlang/OTP\n\n#### `KERL_BUILD_DOCS`\n\nIf `$KERL_BUILD_DOCS` is set, `kerl` will create docs from the built Erlang/OTP version regardless of\norigin (`tarball` backend from \u003cerlang.org\u003e or via `kerl build git`, or via `git` backend).\n\nIf `$KERL_BUILD_DOCS` is unset, `kerl` will only install docs when **not** installing a build\ncreated via `kerl build git...`, and according to `KERL_INSTALL_HTMLDOCS` and `KERL_INSTALL_MANPAGES`.\n\n#### `KERL_DOC_TARGETS`\n\nDefault: `chunks`\nAvailable targets:\n\n- `man` (dropped in OTP 27): install manpage docs.\n- `html`: install HTML docs.\n- `pdf` (dropped in OTP 27): install PDF docs.\n- `chunks`: install the \"chunks\" format to get documentation from the `erl` REPL.\n\nYou can set multiple type of targets separated by space, example `KERL_DOC_TARGETS=\"html chunks\"`\n\n#### `KERL_INSTALL_MANPAGES`\n\nInstall man pages when not building from Git source.\n\nIt's noteworthy that when not using `KERL_BUILD_DOCS=yes`, the docset that may be downloaded can be\nup to 120 MB.\n\n#### `KERL_INSTALL_HTMLDOCS`\n\nInstall HTML documentation when not building from Git source.\n\nIt's noteworthy that when not using `KERL_BUILD_DOCS=yes`, the docset that may be downloaded can be\nup to 120 MB.\n\n#### `KERL_SASL_STARTUP`\n\nBuild Erlang/OTP to use SASL startup instead of minimal (default, when var is unset).\n\n### Activation configuration\n\nThe following applies when activating an installation (i.e. `. ${KERL_DEFAULT_INSTALL_DIR}/19.2/activate`).\n\n#### `KERL_ENABLE_PROMPT`\n\nWhen set, automatically prefix the shell prompt with a section containing the\nErlang/OTP version (see [`$KERL_PROMPT_FORMAT`](#kerl_prompt_format) ).\n\n#### `KERL_PROMPT_FORMAT`\n\nDefault: `(%BUILDNAME%)`\nAvailable variables:\n\n- `%BUILDNAME%`: name of the `kerl` build (e.g. `my_test_build_18.0`)\n- `%RELEASE%`: name of the Erlang/OTP release (e.g. `19.2` or `R16B02`)\n\nThe format of the prompt section to add.\n\n#### `KERL_GIT_CLONE_DEPTH`\n\nDefault: `not set`\nValue passed to `git clone --depth=` when using `kerl build git ...`.\n\n**Note**: this doesn't always result in smaller clones.\n\n### Installation configuration\n\n#### `KERL_DEFAULT_INSTALL_DIR`\n\nEffective when calling `kerl install \u003cbuild\u003e` with no installation location argument.\n\nIf unset, `$PWD` is used.\n\nIf set, install the build under `$KERL_DEFAULT_INSTALL_DIR/${buildname}`.\n\n#### `KERL_APP_INSTALL_DIR`\n\nEffective when calling `kerl upgrade`. This is the folder where the `kerl` application\nresides.\n\nIf unset, `$PWD` is used.\n\nIf set, `kerl` is installed at `$KERL_APP_INSTALL_DIR/kerl`.\n\n#### `KERL_DEPLOY_SSH_OPTIONS` + `KERL_DEPLOY_RSYNC_OPTIONS`\n\nOptions passed to `ssh` and `rsync` during `kerl deploy` tasks.\n\n## Command reference\n\nYou can also get information on the following by executing `kerl` (no parameters) on your shell.\n\n### `build`\n\n```console\n$ kerl build \u003crelease\u003e [build_name]\n$ # or\n$ kerl build git \u003cgit_url\u003e \u003cgit_version\u003e \u003cbuild_name\u003e\n```\n\nCreates a named build either from an official Erlang/OTP release or from a git repository.\n\n```console\n$ kerl build 27.0 27.0\n$ #or\n$ kerl build git https://github.com/erlang/otp.git OTP-27.0 27.0\n```\n\n#### Tuning\n\n##### Configure options\n\nYou can specify the configure options to use when building Erlang/OTP with the\n`KERL_CONFIGURE_OPTIONS` variable, either in your `$HOME/.kerlrc` file or\nprepending it to the command line. A full list of all options can be found the in\n[Erlang/OTP documentation](https://www.erlang.org/doc/system/install.html#configuring-1).\n\n##### Configure applications\n\nIf non-empty, you can specify the subset of applications to use when building\n(and subsequent installing) Erlang/OTP with the `KERL_CONFIGURE_APPLICATIONS`\nvariable, either in your `$HOME/.kerlrc` file or prepending it to the command\nline.\n\n```console\n$ KERL_CONFIGURE_APPLICATIONS=\"kernel stdlib sasl\" kerl build 27.0 27.0-minimal\n```\n\n##### Configure disable applications\n\nIf non-empty, you can specify the subset of applications to disable when\nbuilding (and subsequent installing) Erlang/OTP with the\n`KERL_CONFIGURE_DISABLE_APPLICATIONS` variable, either in your `$HOME/.kerlrc`\nfile or prepending it to the command line.\n\n```console\n$ KERL_CONFIGURE_DISABLE_APPLICATIONS=\"odbc\" kerl build 27.0 27.0-no-odbc\n```\n\n##### Enable autoconf\n\nYou can enable the use of `autoconf` in the build process setting\n`KERL_USE_AUTOCONF=yes` in your `$HOME/.kerlrc` file.\n\n**Note**: `autoconf` is always enabled for Git builds.\n\n##### Using shell export command in .kerlrc\n\nConfigure variables which includes spaces such as those in `CFLAGS` cannot be\npassed on with `KERL_CONFIGURE_OPTIONS`. In such a case you can use shell\n`export` command to define the environment variables for `./configure`. Note\nwell: this method has a side effect to change your shell execution environment\nafter activating a `kerl` installation of Erlang/OTP. Here is an example of\n`.kerlrc` for building Erlang/OTP for FreeBSD with clang compiler:\n\n\u003c!-- markdownlint-disable MD007 # line-length --\u003e\n```console\n$ # for clang\n$ export CC=clang CXX=clang CFLAGS=\"-g -O3 -fstack-protector\" LDFLAGS=\"-fstack-protector\"\n$ # compilation options\n$ KERL_CONFIGURE_OPTIONS=\"--disable-native-libs --enable-vm-probes --with-dynamic-trace=dtrace --with-ssl=/usr/local --with-javac --enable-hipe --enable-kernel-poll --with-wx-config=/usr/local/bin/wxgtk2u-2.8-config --without-odbc --enable-threads --enable-sctp --enable-smp-support\"\n```\n\u003c!-- markdownlint-enable MD007 # line-length --\u003e\n\nIn case you cannot access the default directory for temporary files (`/tmp`) or\nsimply want them somewhere else, you can also provide your own directory with\nthe variable `TMP_DIR`.\n\n```console\n$ export TMP_DIR=/your/custom/temporary/dir\n```\n\n#### Building documentation\n\nPrior to `kerl` 1.0, `kerl` always downloaded prepared documentation from\nerlang.org. Now if `KERL_BUILD_DOCS=yes` is set, `kerl` will build the man pages\nand HTML documentation from the source repository in which it is working.\n\n**Note**: this variable takes precedent over the other documentation parameters.\n\n### `install`\n\n#### Installing a build\n\n```console\n$ kerl install \u003cbuild_name\u003e [directory]\n```\n\nInstalls a named build to the specified filesystem location.\n\n```console\n$ kerl install 27.0 /usr/local/lib/erlang/27.0\n```\n\nIf path is omitted the current working directory will be used. However, if\n`KERL_DEFAULT_INSTALL_DIR` is defined in `$HOME/.kerlrc`,\n`KERL_DEFAULT_INSTALL_DIR/\u003cbuild-name\u003e` will be used instead.\n\n##### Install location restrictions\n\n**Warning**: `kerl` assumes the given installation directory is for its sole use.\nIf you later delete it with the `kerl delete` command, the whole directory will\nbe deleted, along with anything you may have added to it!\n\nSo only install `kerl` in an empty (or non-existant) directory.\n\nIf you attempt to install `kerl` in `$HOME` or `.erlang` or `$KERL_BASE_DIR`,\nthen `kerl` will give you an error and refuse to proceed. If you try to install\n`kerl` in a directory that exists and is not empty, `kerl` will give you an error.\n\n##### Tuning\n\n###### SASL startup\n\nYou can have SASL started automatically setting `KERL_SASL_STARTUP=yes` in your\n`$HOME/.kerlrc` file or prepending it to the command line.\n\n###### Manpages installation\n\nYou can have manpages installed automatically setting\n`KERL_INSTALL_MANPAGES=yes` in your `$HOME/.kerlrc` file or prepending it to the\ncommand line.\n\n**Note**: for Git-based builds, you want to set `KERL_BUILD_DOCS=yes`\n\n###### HTML docs installation\n\nYou can have HTML docs installed automatically setting\n`KERL_INSTALL_HTMLDOCS=yes` in your `$HOME/.kerlrc` file or prepending it to the\ncommand line.\n\n*Note*: for Git-based builds, you want to set `KERL_BUILD_DOCS=yes`\n\n#### Documentation installation\n\nMan pages will be installed to `[path]/man` and HTML docs will be installed in\n`[path]/html`.  The `kerl` `activate` script manipulates the MANPATH of the current\nshell such that `man 3 gen_server` or `erl -man gen_server` should work perfectly.\n\nDo not fret - `kerl_deactivate` restores your shell's `MANPATH` to whatever its\noriginal value was.\n\n### `deploy`\n\n```console\n$ kerl deploy \u003c[user@]host\u003e [directory] [remote_directory]\n```\n\nDeploys the specified installation to the given host and location.\n\n```console\n$ kerl deploy anotherhost /path/to/install/dir\n```\n\nIf `[remote_directory]` is omitted the specified `[directory]` will be used.\n\nIf both `[directory]` and `[remote_directory]` are omitted the current working directory will be used.\n\n*NOTE*: `kerl` assumes the specified host is accessible via `ssh` and `rsync`.\n\n#### Tuning\n\n##### Additional SSH options\n\nYou can have additional options given to `ssh` by setting them in the\n`KERL_DEPLOY_SSH_OPTIONS` variable in your `$HOME/.kerlrc` file or on the command\nline, e.g. `KERL_DEPLOY_SSH_OPTIONS='-qx -o PasswordAuthentication=no'`.\n\n##### Additional RSYNC options\n\nYou can have additional options given to `rsync` by setting them in the\n`KERL_DEPLOY_RSYNC_OPTIONS` variable in your `$HOME/.kerlrc` file or on the\ncommand line, e.g. `KERL_DEPLOY_RSYNC_OPTIONS='--delete'`.\n\n### `update`\n\n```console\n$ kerl update releases\n```\n\nIf `KERL_BUILD_BACKEND=tarball` this command fetches the up-to-date list of Erlang/OTP\nreleases from erlang.org.\n\nIf it is set to `KERL_BUILD_BACKEND=git` this command fetches an up-to-date\nlist of Erlang/OTP tags from the official Erlang/OTP GitHub repository.\n\n**Note**: the output of this function can be tweaked with `KERL_INCLUDE_RELEASE_CANDIDATES=yes` to\nprint release candidates.\n\n### `list`\n\n```console\n$ kerl list \u003creleases|builds|installations\u003e [all]\n```\n\nLists the releases, builds or installations available.\n\nWhen listing releases (without option `all`), the following applies:\n\n- no release candidates are shown, unless you set environment variable\n`KERL_INCLUDE_RELEASE_CANDIDATES` to `yes`\n- no \"very old\" releases are shown (depends on the current `kerl` version)\n- versions included in the support policy are flagged with `*`\n\n**Note**: using `all` means all available releases are shown without filters.\n\n### `delete`\n\n```console\n$ kerl delete build \u003cbuild_name\u003e\n$ # or\n$ kerl delete installation \u003cbuild_name|directory\u003e\n```\n\nDeletes the specified build or installation.\n\n```console\n$ kerl delete build 27.0\nThe 27.0 build has been deleted\n```\n\n```console\n$ kerl delete installation /usr/local/lib/erlang/27.0\nThe installation in /usr/local/lib/erlang/27.0 has been deleted\n```\n\n### `active`\n\n```console\n$ kerl active\n```\n\nPrints the path of the currently active installation, if any.\n\n```console\n$ kerl active\nThe current active installation is:\n/usr/local/lib/erlang/27.0\n```\n\n### `status`\n\n```console\n$ kerl status\n```\n\nPrints the available builds and installations as well as the currently active installation.\n\n```console\n$ kerl status\nAvailable builds:\n27.0,27.0\n27.0,27.0-builtdocs\n----------\nAvailable installations:\n27.0 /usr/local/lib/erlang/27.0\n----------\nThe current active installation is:\n/usr/local/lib/erlang/27.0\nDialyzer PLT for the active installation is:\n/usr/local/lib/erlang/27.0/dialyzer/plt\nThe build options for the active installation are:\n...\n```\n\n### `path`\n\n```console\n$ kerl path [installation]\n```\n\nPrints the path of the currently active installation if one is active. When given an\ninstallation name, it will return the path to that installation location on disk.\nThis makes it useful for automation without having to run `kerl`'s output through\nother tools to extract to path information.\n\n```console\n$ kerl path\nNo active kerl-managed erlang installation\n```\n\n```console\n$ kerl path 27.0\n/usr/local/lib/erlang/27.0\n```\n\n### `build-install`\n\n```console\n$ kerl build-install \u003crelease\u003e [build_name] [directory]\nkerl build-install git \u003cgit_url\u003e \u003cgit_version\u003e \u003cbuild_name\u003e [directory]\n```\n\nCombines `kerl build` and `kerl install` into a single command.\n\n### `plt`\n\nPrints Dialyzer PLT path for the active installation.\n\n### `prompt`\n\nPrints a string suitable for insertion in prompt.\n\n### `cleanup`\n\n```console\n$ kerl cleanup \u003cbuild_name|all\u003e\n```\n\nRemove compilation artifacts (use after installation), for a given build or for \"all\".\n\n### `emit-activate`\n\n```console\n$ kerl emit-activate \u003crelease\u003e \u003cbuild_name\u003e \u003cdirectory\u003e [sh|bash|fish|csh]\n```\n\nPrint the `activate` script, as generated by `kerl`.\n\n**Note**: the output defaults to shell `sh` (also `bash`), as per file `activate`. To emit\n`activate.fish`, or `activate.csh`, set the last argument to `fish` or `csh`, respectively.\n\n### `version`\n\nPrints current version.\n\n## Important notes\n\n### Note on .kerlrc\n\nSince `.kerlrc` is a dot file for `/bin/sh`, running shell commands inside the\n`.kerlrc` will affect the shell and environment variables for the commands being\nexecuted later. For example, the shell `export` commands in `.kerlrc` will affect\n*your login shell environment* when activating `curl`.  Use with care.\n\n## Shell support\n\n### fish\n\n`kerl` has basic support for the fish shell.\n\nTo activate an installation:\n\n```console\n$ source /path/to/install/dir/activate.fish\n```\n\nDeactivation is the same as in other shells:\n\n```console\n$ kerl_deactivate\n```\n\n### C\n\n`kerl` has basic support for the C shells (`csh`, `tcsh`, etc.).\n\nTo activate an installation:\n\n```console\n$ source /path/to/install/dir/activate.csh\n```\n\nThe activation script sources file `.kerlrc.csh` instead of `.kerlrc`.\n\nDeactivation is the same as in other shells:\n\n```console\n$ kerl_deactivate\n```\n\n### Command-line completion\n\nOptionally, download and install `kerl`'s:\n\n- `bash_completion` file from \u003chttps://github.com/kerl/kerl/raw/master/bash_completion/kerl\u003e\n- `zsh_completion` file from \u003chttps://github.com/kerl/kerl/raw/master/zsh_completion/_kerl\u003e\n- `fish-completion` file from \u003chttps://github.com/kerl/kerl/raw/master/fish_completion/kerl.fish\u003e\n\ndepending on your preferred shell.\n\n## The `kerl` glossary\n\nHere are the abstractions `kerl` is handling:\n\n- **releases**: Erlang/OTP releases from [erlang.org](https://erlang.org)\n\n- **builds**: the result of configuring and compiling releases or Git repositories\n\n- **installations**: the result of deploying builds to filesystem locations (also referred to as \"sandboxes\")\n\n## The `kerl` project\n\n### Erlang/OTP support policy\n\nAs of September 2021, we are supporting the current Erlang/OTP release version\nand 2 prior release versions (same as upstream Erlang/OTP). Older Erlang/OTP releases\nmay or may not work. We will advance release support as new releases of Erlang/OTP\nbecome available.\n\n### Code of conduct\n\nYou can read more about our code of conduct at [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md).\n\n### Contributing to `kerl`\n\nContributions are welcome! Be sure to read and follow the general guidelines made explicit in\n[CONTRIBUTING.md](CONTRIBUTING.md).\n\n### License\n\n`kerl` is MIT-licensed, as per [LICENSE.md](LICENSE.md). You'll also find the same license notice\ninside the distributable shell script.\n\n### Changelog\n\nCheck [CHANGELOG.md](CHANGELOG.md) and also [GitHub releases](https://github.com/kerl/kerl/releases).\n","funding_links":[],"categories":["List of \\*env-, ch\\*- and \\*vm- style version managers","Shell","Version Managers","杂项"],"sub_categories":["Erlang"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkerl%2Fkerl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkerl%2Fkerl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkerl%2Fkerl/lists"}