Getting Started (original) (raw)
The Camel CLI can either be installed and used together with JBang (step 1a), or as a pure standalone Camel installation (step 1b).
Installing and using Camel CLI
Camel uses JBang for the Camel CLI. You can easily get up and running in a few steps.
Step 1a
First install JBang according to your platform.
Once JBang is installed, you should be able to make sure it works by calling the version command:
After this then install Camel into JBang as follows:
$ jbang app install camel@apache/camelThen you can check that Camel is installed and working by executing:
$ camel version
JBang version: 0.138.0
Camel CLI version: 4.18.0Installing and using Camel standalone CLI
Step 1b
Download the Camel Launcher .zip distribution for a desired Camel release.
For example to download Camel 4.18.2 from Maven Central, then click and download the .bin.zip file, and then unzip the file to a work folder:
$ unzip camel-launcher-4.18.2-bin.zip
$ cd camel-launcher-4.18.2You can then execute the provided scripts from the bin folder:
$ bin/camel.sh version
JBang version: 0.138.0
Camel CLI version: 4.18.2| | You can also unzip the camel-launcher to a shared folder, and add its bin to the $PATH environment so you can execute camel from anywhere in your terminal. | | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
Using Camel CLI
Step 2
Create your first Camel integration
| | You can also use Java or XML instead of YAML. For example camel init hi.java. | | -------------------------------------------------------------------------------- |
Step 3
Run the Camel integration
Bang the Camel integration is now running. You can use ctrl + c to stop the integration.
Step 4
Camel makes it easy to change your code on the fly. You can run in live coding mode, as shown:
$ camel run hello.yaml --devWhile in live coding mode, whenever you save changes to hello.yaml, Camel will automatically load the updated version.
Step 5
Make sure to check out the Camel CLI documentation, for more details on the powers of the Camel CLI. You will also find information how you can export what you have built with the Camel CLI into a vanilla Camel Spring Boot or Camel Quarkus project.
| | See the camel wrapper command which can be used to install and pin Camel CLI to a given version which is local for a given project/directory (similar to how Maven Wrapper works). | | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |