Camel CLI - Configuration
This page covers configuring the Camel CLI — available options, configuration commands, and how to set up your environment.
Camel CLI configurations
The camel.jbang supports 54 options, which are listed below.
| Name | Description | Default | Type |
|---|---|---|---|
| Camel version to run or export with, when it is not the version of the Camel CLI. camel run then runs the integration in a new JVM with JBang (Camel 4.0 or newer, not from the Camel launcher), and camel export uses it for the Camel dependencies of the project. | String | |
| Camel Spring Boot version (of camel-spring-boot-bom) in the project that camel export creates with the spring-boot runtime. By default the Camel version: camel.jbang.camel-version, else the version of the Camel CLI. | String | |
| Whether camel export adds the Camel Wrapper scripts (camel and camel.cmd) to the project, which run the Camel CLI of the Camel version of the export. Only with the camel-main runtime. | false | boolean |
| Files to add to the classpath, comma separated: JAR files, .class files and resource files. camel run fills it with the given files that are not Camel sources or properties files, and camel export copies the JAR files to the lib directory of the project and the other files to src/main/resources. | String | |
| Directory where Camel writes the classes that it compiles at runtime from Java and Groovy sources. | .camel-jbang/compile | String |
| Whether to turn on the developer console on the local HTTP server (port 8080 by default): at /q/dev with camel run and the camel-main runtime, at /actuator/camel with Spring Boot, and at /q/camel/dev-console with Quarkus. An exported project has it with the dev profile only. | false | boolean |
| Folders under the source directory (comma separated) that hold data the routes read or write, not sources: in dev mode a change in them does not reload the routes. Use this for an inbox, outbox or archive folder under the source directory. | String | |
| Additional dependencies, comma separated, such as camel:kafka or mvn:com.example:mylib:1.0 (groupId:artifactId:version). camel run downloads them, and camel export adds them to the project. | String | |
| Additional dependencies (comma separated, as in camel.jbang.dependencies) only for the camel-main runtime, which includes the jbang runtime of camel run. | String | |
| Additional dependencies (comma separated, as in camel.jbang.dependencies) only for the quarkus runtime. | String | |
| Additional dependencies (comma separated, as in camel.jbang.dependencies) only for the spring-boot runtime. | String | |
| Whether the Camel CLI may download dependencies from remote Maven repositories. When false it works offline, with the local Maven repository only. | true | boolean |
| Files to leave out of camel run and camel export, comma separated: a file name or an Ant-style path pattern, matched against the name and against the given path of each file. | String | |
| Directory where the project will be exported | . | String |
| Whether to check the remote Maven repositories on every download for newer SNAPSHOT versions and metadata, instead of using what is already in the local Maven repository. | false | boolean |
| Maven coordinates (groupId:artifactId:version) of the project that camel export creates. By default org.example.project:name:1.0-SNAPSHOT, with the name of the integration or of its first file. A Java source without a package gets one made from the groupId and artifactId. | String | |
| Groovy source files, comma separated, that camel-groovy pre-compiles at startup so the routes can use their classes. camel run fills it with the given .groovy files, and camel export copies them to src/main/resources/camel-groovy. | String | |
| Health check at /observe/health on local HTTP server (port 8080 by default) | false | boolean |
| Whether to keep going when routes fail to load or compile, leaving those routes out, and to keep unresolved property placeholders as they are and ignore missing properties files. For development and tooling only. | false | boolean |
| Java version of the project that camel export creates: the Java release in the pom.xml, and the Java version of the Dockerfile and of the container base image. camel run also passes it to JBang when it runs the integration in a new JVM, such as with another Camel version. | 21 | String |
| Whether to record with Java Flight Recorder, saving the recording on exit to a .jfr file named after the integration. | false | boolean |
| Java Flight Recorder settings to record with: default (low overhead) or profile (more detail), as the JDK provides them. Setting it turns on the recording too. | default | String |
| Version to use for jib-maven-plugin when exporting the application | 3.5.2 | String |
| Version of the Eclipse JKube kubernetes-maven-plugin in the project that camel export creates with the camel-main runtime, when the application properties have options that start with jkube. | 1.20.0 | String |
| Eclipse JKube resource fragments, comma separated, that camel export copies to src/main/jkube of the project without .jkube in their name (deployment.jkube.yaml becomes deployment.yaml). camel run fills it with the given .jkube.yaml and .jkube.yml files. | String | |
| Version of the Apache Camel Kamelets (org.apache.camel.kamelets:camel-kamelets) that camel run loads the Kamelets from and camel export adds to the project. By default the version of the Kamelets that come with the Camel CLI. | String | |
| Whether the beans of bean annotations (Camel BindToRegistry, Spring Bean and Quarkus Produces methods) are created when first looked up, instead of at startup. This can help with class loading issues. | false | boolean |
| Directories (or GitHub links) to load Kamelets from, comma separated. Their Kamelets take precedence over the ones of the Kamelet catalog, and camel export copies the Kamelets that the routes use from them into the project. | String | |
| Whether downloading JARs from ASF Maven Snapshot repository is enabled | true | boolean |
| Whether downloading JARs from Maven Central repository is enabled | true | boolean |
| Location of the Maven settings.xml file with the servers, repositories, mirrors and proxies to use for downloads. By default the settings.xml in the .m2 directory of the user home; set to false to use no settings file at all. | String | |
| Location of the Maven settings-security.xml file that decrypts the encrypted passwords of settings.xml. By default the settings-security.xml in the .m2 directory of the user home. | String | |
| Include Maven Wrapper files in the exported project | true | boolean |
| Embed dev/diagnostics MCP tools on the local HTTP management server (/mcp by default) | false | boolean |
| Metrics (Micrometer and Prometheus) at /observe/metrics on local HTTP server (port 8080 by default) when running standalone Camel | false | boolean |
| OpenAPI specification file (JSON or YAML) for contract-first REST: camel run and camel export add a Rest DSL that serves the API of the file, with client request validation turned on, and put the file on the classpath. | String | |
| Swagger UI for REST OpenAPI at /q/openapi on local HTTP server (port 8080 by default) | false | boolean |
| Whether to scan the JARs that camel run downloads for Camel configuration classes and Spring or Quarkus beans, so the routes can use them. | false | boolean |
| Parent POM coordinate (groupId:artifactId:version) to use in the exported project | String | |
| Whether camel run asks in the terminal for the value of a property placeholder that is not configured, instead of failing. Needs an interactive terminal. | false | boolean |
| Not used: the Camel CLI uses the quarkus-bom or quarkus-camel-bom artifactId as needed. Kept for compatibility, and to be removed. | String | |
| Base URI of the Quarkus Extension Registry, where the Camel CLI looks up the Quarkus Platform version that matches the Camel version when camel.jbang.quarkusVersion is not set. By default https://registry.quarkus.io. | String | |
| groupId of the Quarkus Platform BOM, io.quarkus.platform by default. Used only when camel.jbang.quarkusVersion is set. | String | |
| Version of the Quarkus Platform BOM for the quarkus runtime of camel run and camel export. When not set, the Camel CLI looks up the Quarkus Platform version that matches the Camel version in the Quarkus Extension Registry. | String | |
| README files of the integration, comma separated, which the Camel CLI shows for the running integration. camel run fills it with the given files whose name starts with readme, and puts them on the classpath too. | String | |
| Additional Maven repositories (URLs, comma separated) to download dependencies from. camel export also adds them to the pom.xml of the project. | String | |
| Resource directories, comma separated: camel run adds their files to the classpath with their directory structure, and camel export copies each directory with its structure into src/main/resources. Set by the --resource-dir option of camel run and camel export. | String | |
| Runtime of the project that camel export creates: camel-main, spring-boot or quarkus. camel run does not read it, it runs with its --runtime option. | String | |
| Shell script files, comma separated, that camel export copies to src/main/scripts of the project. camel run fills it with the given .sh files. | String | |
| Directory that camel run loads and runs all the Camel files of, subdirectories included, instead of files given one by one (the two cannot be combined). Its application.properties is used, and files of other kinds in it are ignored. Set by the --source-dir option of camel run. | String | |
| Spring Boot version for the spring-boot runtime: the version of the Spring Boot parent POM and BOM in the project that camel export creates. By default the Spring Boot version that this Camel release is built with. | String | |
| Components or endpoints to replace with stubs that do not connect to the real systems, comma separated: a component name (such as kafka), an endpoint URI or pattern (such as kafka:orders), all for every component, or remote for the components that connect to remote systems. | String | |
| TLS certificate and key files, comma separated, that camel export copies to src/main/tls of the project. camel run fills it with the given .crt, .key and .pem files. | String | |
| Whether to log more about startup, such as the dependencies that are resolved and downloaded. | false | boolean |
Configuration Commands
Store frequently used CLI options so you don’t have to specify them each time:
camel config set camel-version=3.18.4
camel run * Configuration locations
Camel CLI uses two configuration files:
-
Global:
~/.camel-cli.properties -
Local:
./camel-cli.properties(takes precedence)
The local file is laid over the global one: a key of the local file wins, and the other keys of the global file still apply. With repos in the global file and runtime in the local one, a command in that directory uses both.
Commands target global by default. Use --global=false for local configuration.
These files were previously named .camel-jbang-user.properties (global) and camel-jbang-user.properties (local). On first run the CLI automatically renames a pre-existing global ~/.camel-jbang-user.properties to ~/.camel-cli.properties and a pre-existing local ./camel-jbang-user.properties to ./camel-cli.properties. An existing new file is never overwritten. |
A set version via camel config set cannot be combined with --camel-version on the command line. |
Set, unset, list, and get
camel config set gav=com.foo:acme:1.0-SNAPSHOT
camel config set runtime=spring-boot
camel config unset runtime
camel config list
camel config get gav A key is the name of a command option without --, and the value is its default for every command that has the option. An option with more than one name, such as --reload and --dev of camel run, can be set by any of them. To set the default for one command only, start the key with camel. and the command:
camel config set camel.run.dev=true Placeholder substitution
Configuration values can be referenced as placeholders with #optionName:
camel config set repos=https://maven.repository.my.repo.com/ga
camel run 'Test.java' --repos=#repos,https://packages.atlassian.com/maven-external Placeholders only work for options that the given command supports. Run camel <command> --help to see available options. |
Troubleshooting
The Camel CLI downloads dependencies to the Maven repository in ~/.m2, and keeps the state of running integrations in ~/.camel. When installed with JBang, JBang also keeps its state and the CLI JARs in ~/.jbang. If you encounter issues with outdated JARs, try deleting the relevant entries in these directories.
An integration that did not terminate gracefully (killed, or the machine crashed) can leave files behind in ~/.camel. List them, and remove the ones no longer in use:
camel dirty
camel dirty --clean Only the files named after the pid of a process that is gone are orphan files, such as <pid>-status.json. Other files in ~/.camel, such as the log of a Spring Boot or Quarkus app that camel run runs (<name>.log), are left alone.
The log of the previous run of an integration (~/.camel/<name>-previous.log and <name>-previous.json, see camel log --previous) is kept until it is cleaned: there is one for each name that ever ran. camel dirty says how many integrations have one, and camel dirty --clean cleans them too, so read the log of a run that failed first.
An error is printed as one line that starts with ERROR:. To see the stack trace of every error, set the environment variable CAMEL_CLI_DEBUG to true. See Exit Codes and Output for what each exit code means.