User manual

Installing the Camel CLI Launcher

Available as of Camel 4.22

Two canonical installer scripts install the Camel CLI Launcher without a package manager:

curl -fsSL https://camel.apache.org/install.sh | sh
irm https://camel.apache.org/install.ps1 | iex

With no arguments, both installers resolve and install the latest published release. The latest release can be newer than the current LTS release, so if you need an LTS version (for example because a plugin you use does not support the latest release yet), ask for it explicitly with --version (install.sh) or -Version (install.ps1), which accept:

  • an exact version, X.Y.Z (for example 4.22.2)

  • a release line, X.Y (for example 4.22): the newest patch release of that line

  • LTS (case-insensitive): the newest LTS release

Both installers download the release archive from Maven Central, verify it against a SHA-256 recorded in a signed-path manifest before extracting it, and reject archives containing absolute paths, ../ traversal, escaping symlinks/reparse points, or more than one top-level directory. The staged launcher is run once to confirm a Java 21+ runtime can be discovered; if that check fails, the previously active installation, if any, is left untouched and the installer exits nonzero.

Installing a specific version

On Linux and macOS, pass the argument through to the piped shell with -s --. For example, to install the 4.22.2 LTS release exactly:

curl -fsSL https://camel.apache.org/install.sh | sh -s -- --version 4.22.2

On Windows, download the script first, then run it with the parameter:

irm https://camel.apache.org/install.ps1 -OutFile install.ps1
.\install.ps1 -Version 4.22.2

Check which version is installed with camel version:

$ camel version
Camel CLI version: 4.22.2

Instead of an exact version, you can ask for the newest LTS release, or for the newest patch release of a release line:

curl -fsSL https://camel.apache.org/install.sh | sh -s -- --version LTS
curl -fsSL https://camel.apache.org/install.sh | sh -s -- --version 4.22
.\install.ps1 -Version LTS
.\install.ps1 -Version 4.22

The installer resolves LTS or 4.22 once, through the lts.properties or 4.22.properties file published next to the release manifests on the Camel website, and then installs and verifies that exact release in the same way as an exact --version. For a release line, it refuses a published version outside that line. If the website does not publish the requested alias, or the download or verification fails, the installer exits nonzero and leaves the current installation untouched.

Pinning and camel self-update

Running the installer with --version/-Version pins the installation: it records the value you asked for (4.22.2, 4.22 or LTS, not the version it resolved to) in a pinned-version file next to the versions directory. Running the installer without --version/-Version installs the latest release and removes the pin. camel self-update treats the pin as follows:

Installed with camel self-update

no --version

Moves to the latest release.

--version 4.22.2 (exact)

Refuses to move. Re-run the installer to change the version, or remove the pinned-version file to track the latest release again.

--version 4.22 (release line)

Moves to the newest patch release of 4.22, never to 4.23 or later.

--version LTS

Moves to the newest LTS release, which can be a newer release line.

On an installation pinned to a release line or to LTS, camel self-update --version X.Y.Z is refused too, because it would leave the pinned selector. The message ("this install is pinned to LTS" or "this install is pinned to the 4.22 release line") suggests re-running the installer with that exact version instead, which replaces the selector pin with an exact one:

curl -fsSL https://camel.apache.org/install.sh | sh -s -- --version 4.23.0
irm https://camel.apache.org/install.ps1 -OutFile install.ps1; .\install.ps1 -Version 4.23.0

camel self-update --check and the update notice described below compare against the newest release of the pinned line or the newest LTS release.

Camel CLI 4.22.x and older do not understand a release line or LTS pin. If such a CLI finds one (for example after a --version LTS install that resolved to 4.22.2), camel self-update refuses with a "pinned to version LTS" message. Re-run the installer with --version LTS (or --version 4.22) to update instead.

Requirements

  • A Java 21+ runtime available at install and run time. The launcher locates Java from JAVACMD, JAVA_HOME, or PATH.

  • Linux and macOS: curl or wget; tar; and one of sha256sum, shasum, or openssl.

  • Windows: PowerShell 5.1 or later (Invoke-WebRequest, Expand-Archive, Get-FileHash).

Where the CLI is installed

Installation is always per-user and never requires elevation or sudo:

  • POSIX (install.sh) installs under ${XDG_DATA_HOME:-$HOME/.local/share}/camel-cli/versions/<version> and activates it via a symlink at $HOME/.local/bin/camel. The installer never writes to shell profile files (.bashrc, .profile, etc.); if $HOME/.local/bin is not already on PATH, it prints guidance instead.

  • Windows (install.ps1) installs under %LOCALAPPDATA%\Apache Camel\cli\versions\<version> and activates it via a camel.cmd shim at %LOCALAPPDATA%\Apache Camel\bin\camel.cmd that delegates to the staged camel.bat. The bin directory is added once, case-insensitively, to the current user’s PATH; the machine PATH is never modified.

Previously installed version directories are left in place after an upgrade or downgrade and must be removed manually. Reinstalling the same version replaces that version directory.

This is also the layout the camel self-update and camel doctor commands below understand. Neither one touches an installation made through Homebrew, Chocolatey, WinGet, Scoop, SDKMAN, or JBang, each of which manages its own install location and has its own upgrade command.

Upgrading and switching versions

Once installed through install.sh/install.ps1, run:

camel self-update                 # install the latest release, if newer than what's running
camel self-update --version 4.23.0  # install a specific version (upgrade or downgrade)
camel self-update --check         # report only, install nothing

camel self-update checks whether an update is actually needed first (no network cost for the archive itself if you’re already current), then re-runs the same, published install.sh/ install.ps1 installer described above, pinned to the exact version it just resolved, rather than re-implementing the download/verify/extract/activate steps a second time. The installer script itself is downloaded fresh and verified against a SHA-256 published alongside it (install.sha256) before it’s run.

camel self-update refuses to run in two cases. If the currently running installation was not made by install.sh/install.ps1 (it was installed through Homebrew, Chocolatey, WinGet, Scoop, SDKMAN, or JBang instead), the message names that manager and its own upgrade command, e.g. brew upgrade apache-camel. If the installation was pinned to an exact version by a user running install.sh --version 4.22.2/install.ps1 -Version 4.22.2 directly (running camel self-update --version …​ does not create or change a pin), the message names the pin file to remove to resume tracking new releases. An installation pinned to a release line or to LTS moves within that selector, see Pinning and camel self-update.

Every camel invocation (except camel self-update itself) checks, at most once every 24 hours, whether a newer release has been published (for a release line or LTS pin, a newer release of that line or a newer LTS release), and prints a one-line notice if so. An installation pinned to an exact version gets no notice.

camel: a new version is available (4.22.0 -> 4.23.0). Run 'camel self-update' to install it.

The check runs on a background thread and never blocks or fails the command actually being run. Set CAMEL_SELF_UPDATE_CHECK=false to disable it entirely.

Installed CLI version and the Camel version used to run

The version you install is the version of the Camel CLI itself, as shown by camel version. The launcher installed by these scripts runs integrations with that same Camel version: it does not support camel run --camel-version, so to run with another Camel version, install another CLI version (for example --version LTS).

A Camel CLI installed with JBang can run integrations with a different Camel version than the installed CLI, with camel run --camel-version=X.Y.Z or a persistent camel version set X.Y.Z (see Camel CLI - Projects). This does not change the installed CLI version, and camel self-update and the installers described here do not affect it.

Detecting conflicting installations

If a machine has more than one Camel CLI installation (for example, both install.sh and Homebrew), whichever one is first on PATH is the one that actually runs; the others sit unused. camel doctor reports every installation it finds and marks the active one:

$ camel doctor
...
Installs:    Found 2 Camel CLI installations
             ~/.local/share/camel-cli/versions/4.22.0 (WEB_INSTALLER) <- active
             /opt/homebrew/Cellar/apache-camel/4.21.0/libexec (HOMEBREW)

Warning: more than one Camel CLI installation was found. The one marked active is the one your
shell currently runs; the others are unused but still present.

camel doctor exits non-zero when more than one installation is found, so the check is scriptable in CI.

Uninstalling

The installers do not modify shell profiles or the machine PATH, so removal is a matter of deleting the per-user files:

On Linux and macOS:

rm -f "$HOME/.local/bin/camel"
rm -rf "${XDG_DATA_HOME:-$HOME/.local/share}/camel-cli"

On Windows, remove the install directory and drop its bin directory from your user PATH:

Remove-Item -Recurse -Force "$env:LOCALAPPDATA\Apache Camel"

See also