From e44ad0a79987ccfa77fbe3b45a0ade3f66b9c58d Mon Sep 17 00:00:00 2001 From: Claus Ibsen Date: Mon, 9 Nov 2026 09:46:46 +0100 Subject: [PATCH] CAMEL-26761: camel-chaos - keep chaos scenarios in test/chaos, which camel run already leaves alone Scenarios were in chaos/.chaos. camel run --dev --source-dir reloads from the source dir recursively, except test/**, so a scenario saved there (and the feed messages and reports of CAMEL-26760) landed in a watched folder. test/ is already the folder camel run leaves alone, with the Citrus tests. - The TUI saves a scenario as test/chaos/.chaos, and the AI test of a rule writes test/chaos/-test.chaos. - camel run test/ still sees a folder of only Citrus tests when it has a chaos subfolder (RunFiles.citrusTestsOnly). - Docs, help texts and examples use test/chaos. Co-Authored-By: Claude Opus 5.5 Signed-off-by: Claus Ibsen --- .../org/apache/camel/catalog/docs/chaos.adoc | 22 +++++---- .../org/apache/camel/catalog/docs/main.adoc | 2 +- .../camel-main-configuration-metadata.json | 2 +- .../camel-chaos/src/main/docs/chaos.adoc | 22 +++++---- .../camel/component/chaos/ChaosScenario.java | 4 +- .../camel-main-configuration-metadata.json | 2 +- core/camel-main/src/main/docs/main.adoc | 2 +- .../main/ChaosConfigurationProperties.java | 8 ++-- design/chaos.adoc | 2 +- .../ROOT/pages/camel-jbang-managing.adoc | 8 ++-- .../ROOT/pages/camel-jbang-tui-observe.adoc | 2 +- .../jbang-commands/camel-jbang-debug.adoc | 2 +- .../pages/jbang-commands/camel-jbang-dev.adoc | 2 +- .../pages/jbang-commands/camel-jbang-run.adoc | 2 +- .../camel-jbang-commands-metadata.json | 6 +-- .../camel/dsl/jbang/core/commands/Run.java | 2 +- .../commands/action/CamelChaosLoadAction.java | 20 ++++---- .../dsl/jbang/core/commands/RunTest.java | 4 +- .../src/test/resources/golden/cli-help.txt | 47 ++++++++++--------- .../core/commands/tui/ChaosAiPrompt.java | 4 +- .../jbang/core/commands/tui/ChaosControl.java | 2 +- .../core/commands/tui/ChaosScenarioFile.java | 6 +-- .../src/main/resources/tui/help/chaos.md | 12 ++--- .../core/commands/tui/ChaosAiPromptTest.java | 4 +- .../core/commands/tui/ChaosControlTest.java | 24 +++++----- .../apache/camel/dsl/jbang/run/RunFiles.java | 14 ++++-- .../camel/dsl/jbang/run/RunFilesTest.java | 6 ++- 27 files changed, 126 insertions(+), 107 deletions(-) diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/chaos.adoc b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/chaos.adoc index 8bc826d1fe7cb..62a335f5edf5e 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/chaos.adoc +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/chaos.adoc @@ -29,7 +29,7 @@ in dev mode, so with `--runtime=spring-boot` and `--runtime=quarkus` the run swi have it. A project of your own (`camel run pom.xml`) also gets chaos added for the run: plain `camel-chaos` for Spring Boot (there is no starter), and the `camel-quarkus-chaos` extension for Quarkus, which needs a Camel Quarkus release on Camel 4.24 (https://github.com/apache/camel-quarkus/issues/9459). Then add rules while it runs with `camel cmd chaos-add` (see <<_control_while_it_runs,Control while it runs>>), or -start with the rules of a scenario file with `--chaos=chaos/outage.chaos` (see <<_scenarios,Scenarios>>). +start with the rules of a scenario file with `--chaos=test/chaos/outage.chaos` (see <<_scenarios,Scenarios>>). * A plain `Main` or a test: add the `camel-chaos` dependency and set `camel.chaos.enabled=true`, for example in a `CamelTestSupport` test with `camelContextConfiguration.withUseOverridePropertiesWithPropertiesComponent(props)`, where `props` has @@ -80,7 +80,7 @@ include the startup. |`camel.chaos.maxDuration` |`10m` |The longest time a rule runs: a rule without an `until` duration ends after it, and a longer `until` duration, `delay`, or `duration` of `stall` and `lifecycle`, is rejected when the rule is added. |`camel.chaos.scenario` | |A scenario to load at startup: a file with one rule per line (see -<<_scenarios,Scenarios>>), such as `chaos/outage.chaos`, or `classpath:` and a name. Its rules are added before those of +<<_scenarios,Scenarios>>), such as `test/chaos/outage.chaos`, or `classpath:` and a name. Its rules are added before those of `camel.chaos.rules`, and its `seed=` is used unless `camel.chaos.seed` is set. A scenario that cannot be read, or has a line that is not valid, stops the application from starting. |`camel.chaos.reportOnShutdown` |`true` |Log the report when the context stops, if any rule was added. @@ -111,7 +111,7 @@ List warnings = chaos.checkRule(id); chaos.removeRule(id); List ids = chaos.addRules("endpoint=seda:dlq error at=dlq; endpoint=https:inventory* error status=503"); String text = chaos.report().toText(); -List loaded = chaos.loadScenario("outage.chaos", Files.readString(Path.of("chaos/outage.chaos"))); +List loaded = chaos.loadScenario("outage.chaos", Files.readString(Path.of("test/chaos/outage.chaos"))); ---- `addRules` adds rules separated by `;`, as in `camel.chaos.rules`, all of them or none when one is not valid, so they @@ -129,7 +129,7 @@ camel cmd chaos-change --id=r1 --rule='endpoint=kafka:orders* delay duration=5s camel cmd chaos-remove myapp --id=r1 camel cmd chaos-clear camel cmd chaos-clear myapp --reset -camel cmd chaos-load chaos/outage.chaos +camel cmd chaos-load test/chaos/outage.chaos camel cmd chaos-suggest camel get chaos camel get chaos myapp --report @@ -289,12 +289,14 @@ serves over HTTP have only the list and the report (not the check either: the in == Scenarios A scenario is the rules of an experiment in a file of the project, so it can be run again, shared and kept with the -code, instead of rules typed once at the command line. By convention it is in a `chaos` folder, with the extension -`.chaos`: +code, instead of rules typed once at the command line. By convention it is in the folder `test/chaos` of the project, +with the extension `.chaos`. The Camel CLI leaves the `test` folder alone: `camel run` does not load it, a run in dev +mode does not reload when a file there changes, and `camel export` copies only the Citrus tests from it. A scenario is +a test too, next to the Citrus tests of the project: [source] ---- -# chaos/outage.chaos: the stock service is down for a minute, then slow for a minute +# test/chaos/outage.chaos: the stock service is down for a minute, then slow for a minute seed=42 endpoint=http:stock* error status=503 until=1m @@ -319,7 +321,7 @@ To start an application with a scenario: [source,bash] ---- -camel run * --chaos=chaos/outage.chaos +camel run * --chaos=test/chaos/outage.chaos ---- `--chaos=` adds camel-chaos as `--chaos` does, and sets `camel.chaos.scenario` to the file (it must end with @@ -330,7 +332,7 @@ To load a scenario into an application that runs: [source,bash] ---- -$ camel cmd chaos-load chaos/outage.chaos +$ camel cmd chaos-load test/chaos/outage.chaos Loaded chaos scenario outage.chaos: 3 rules (the rules there were are removed, and the report starts again) r4: fail every send to http:stock* with HTTP status 503, for 1 minute r5: delay every send and poll of http:stock* by 2 seconds, starting after 1 minute, for 1 minute @@ -969,7 +971,7 @@ A run with chaos ends with the verdict of the report as its exit code, so a scen [source,bash] ---- -camel run * --chaos=chaos/outage.chaos --max-seconds=240 --chaos-report=target/chaos-report.json +camel run * --chaos=test/chaos/outage.chaos --max-seconds=240 --chaos-report=target/chaos-report.json ---- * The verdict FAIL ends the run with exit code 1, and the reasons are printed (an unmet expectation, messages lost at diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/main.adoc b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/main.adoc index 98fc48694c8bf..4a160876d4431 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/main.adoc +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/docs/main.adoc @@ -797,7 +797,7 @@ The camel.chaos supports 7 options, which are listed below. | `camel.chaos.reportFile` | A file to write the chaos report to as JSON when the CamelContext stops, such as target/chaos-report.json. | | String | `camel.chaos.reportOnShutdown` | Whether to log the chaos report when the CamelContext stops, if any rule was added. | true | boolean | `camel.chaos.rules` | Rules to add at startup, in the one-line text form of a rule, separated by semicolons. | | String -| `camel.chaos.scenario` | A scenario to load at startup: a file with one rule per line, # comments and an optional seed= line (such as chaos/outage.chaos), or classpath:name. Its rules are added before the rules option, and its seed is used unless the seed option is set. | | String +| `camel.chaos.scenario` | A scenario to load at startup: a file with one rule per line, # comments and an optional seed= line (such as test/chaos/outage.chaos), or classpath:name. Its rules are added before the rules option, and its seed is used unless the seed option is set. | | String | `camel.chaos.seed` | The seed of the random draws of the rules. Without it a seed is picked at startup, and shown in the report. | | Long |=== diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/main/camel-main-configuration-metadata.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/main/camel-main-configuration-metadata.json index ad53d9c2331b0..e28484cddfe34 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/main/camel-main-configuration-metadata.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/main/camel-main-configuration-metadata.json @@ -178,7 +178,7 @@ { "name": "camel.chaos.reportFile", "required": false, "description": "A file to write the chaos report to as JSON when the CamelContext stops, such as target\/chaos-report.json.", "sourceType": "org.apache.camel.main.ChaosConfigurationProperties", "type": "string", "javaType": "java.lang.String", "secret": false }, { "name": "camel.chaos.reportOnShutdown", "required": false, "description": "Whether to log the chaos report when the CamelContext stops, if any rule was added.", "sourceType": "org.apache.camel.main.ChaosConfigurationProperties", "type": "boolean", "javaType": "boolean", "defaultValue": true, "secret": false }, { "name": "camel.chaos.rules", "required": false, "description": "Rules to add at startup, in the one-line text form of a rule, separated by semicolons.", "sourceType": "org.apache.camel.main.ChaosConfigurationProperties", "type": "string", "javaType": "java.lang.String", "secret": false, "security": "insecure:dev" }, - { "name": "camel.chaos.scenario", "required": false, "description": "A scenario to load at startup: a file with one rule per line, # comments and an optional seed= line (such as chaos\/outage.chaos), or classpath:name. Its rules are added before the rules option, and its seed is used unless the seed option is set.", "sourceType": "org.apache.camel.main.ChaosConfigurationProperties", "type": "string", "javaType": "java.lang.String", "secret": false, "security": "insecure:dev" }, + { "name": "camel.chaos.scenario", "required": false, "description": "A scenario to load at startup: a file with one rule per line, # comments and an optional seed= line (such as test\/chaos\/outage.chaos), or classpath:name. Its rules are added before the rules option, and its seed is used unless the seed option is set.", "sourceType": "org.apache.camel.main.ChaosConfigurationProperties", "type": "string", "javaType": "java.lang.String", "secret": false, "security": "insecure:dev" }, { "name": "camel.chaos.seed", "required": false, "description": "The seed of the random draws of the rules. Without it a seed is picked at startup, and shown in the report.", "sourceType": "org.apache.camel.main.ChaosConfigurationProperties", "type": "integer", "javaType": "java.lang.Long", "secret": false }, { "name": "camel.cluster.consul.aclToken", "required": false, "description": "Sets the ACL token to be used with Consul", "sourceType": "org.apache.camel.component.consul.cluster.ConsulClusterService", "type": "string", "javaType": "java.lang.String", "secret": true, "security": "secret" }, { "name": "camel.cluster.consul.blockSeconds", "required": false, "description": "The second to wait for a watch event, default 10 seconds", "sourceType": "org.apache.camel.component.consul.cluster.ConsulClusterService", "type": "integer", "javaType": "int", "defaultValue": 10, "secret": false }, diff --git a/components/camel-chaos/src/main/docs/chaos.adoc b/components/camel-chaos/src/main/docs/chaos.adoc index 8bc826d1fe7cb..62a335f5edf5e 100644 --- a/components/camel-chaos/src/main/docs/chaos.adoc +++ b/components/camel-chaos/src/main/docs/chaos.adoc @@ -29,7 +29,7 @@ in dev mode, so with `--runtime=spring-boot` and `--runtime=quarkus` the run swi have it. A project of your own (`camel run pom.xml`) also gets chaos added for the run: plain `camel-chaos` for Spring Boot (there is no starter), and the `camel-quarkus-chaos` extension for Quarkus, which needs a Camel Quarkus release on Camel 4.24 (https://github.com/apache/camel-quarkus/issues/9459). Then add rules while it runs with `camel cmd chaos-add` (see <<_control_while_it_runs,Control while it runs>>), or -start with the rules of a scenario file with `--chaos=chaos/outage.chaos` (see <<_scenarios,Scenarios>>). +start with the rules of a scenario file with `--chaos=test/chaos/outage.chaos` (see <<_scenarios,Scenarios>>). * A plain `Main` or a test: add the `camel-chaos` dependency and set `camel.chaos.enabled=true`, for example in a `CamelTestSupport` test with `camelContextConfiguration.withUseOverridePropertiesWithPropertiesComponent(props)`, where `props` has @@ -80,7 +80,7 @@ include the startup. |`camel.chaos.maxDuration` |`10m` |The longest time a rule runs: a rule without an `until` duration ends after it, and a longer `until` duration, `delay`, or `duration` of `stall` and `lifecycle`, is rejected when the rule is added. |`camel.chaos.scenario` | |A scenario to load at startup: a file with one rule per line (see -<<_scenarios,Scenarios>>), such as `chaos/outage.chaos`, or `classpath:` and a name. Its rules are added before those of +<<_scenarios,Scenarios>>), such as `test/chaos/outage.chaos`, or `classpath:` and a name. Its rules are added before those of `camel.chaos.rules`, and its `seed=` is used unless `camel.chaos.seed` is set. A scenario that cannot be read, or has a line that is not valid, stops the application from starting. |`camel.chaos.reportOnShutdown` |`true` |Log the report when the context stops, if any rule was added. @@ -111,7 +111,7 @@ List warnings = chaos.checkRule(id); chaos.removeRule(id); List ids = chaos.addRules("endpoint=seda:dlq error at=dlq; endpoint=https:inventory* error status=503"); String text = chaos.report().toText(); -List loaded = chaos.loadScenario("outage.chaos", Files.readString(Path.of("chaos/outage.chaos"))); +List loaded = chaos.loadScenario("outage.chaos", Files.readString(Path.of("test/chaos/outage.chaos"))); ---- `addRules` adds rules separated by `;`, as in `camel.chaos.rules`, all of them or none when one is not valid, so they @@ -129,7 +129,7 @@ camel cmd chaos-change --id=r1 --rule='endpoint=kafka:orders* delay duration=5s camel cmd chaos-remove myapp --id=r1 camel cmd chaos-clear camel cmd chaos-clear myapp --reset -camel cmd chaos-load chaos/outage.chaos +camel cmd chaos-load test/chaos/outage.chaos camel cmd chaos-suggest camel get chaos camel get chaos myapp --report @@ -289,12 +289,14 @@ serves over HTTP have only the list and the report (not the check either: the in == Scenarios A scenario is the rules of an experiment in a file of the project, so it can be run again, shared and kept with the -code, instead of rules typed once at the command line. By convention it is in a `chaos` folder, with the extension -`.chaos`: +code, instead of rules typed once at the command line. By convention it is in the folder `test/chaos` of the project, +with the extension `.chaos`. The Camel CLI leaves the `test` folder alone: `camel run` does not load it, a run in dev +mode does not reload when a file there changes, and `camel export` copies only the Citrus tests from it. A scenario is +a test too, next to the Citrus tests of the project: [source] ---- -# chaos/outage.chaos: the stock service is down for a minute, then slow for a minute +# test/chaos/outage.chaos: the stock service is down for a minute, then slow for a minute seed=42 endpoint=http:stock* error status=503 until=1m @@ -319,7 +321,7 @@ To start an application with a scenario: [source,bash] ---- -camel run * --chaos=chaos/outage.chaos +camel run * --chaos=test/chaos/outage.chaos ---- `--chaos=` adds camel-chaos as `--chaos` does, and sets `camel.chaos.scenario` to the file (it must end with @@ -330,7 +332,7 @@ To load a scenario into an application that runs: [source,bash] ---- -$ camel cmd chaos-load chaos/outage.chaos +$ camel cmd chaos-load test/chaos/outage.chaos Loaded chaos scenario outage.chaos: 3 rules (the rules there were are removed, and the report starts again) r4: fail every send to http:stock* with HTTP status 503, for 1 minute r5: delay every send and poll of http:stock* by 2 seconds, starting after 1 minute, for 1 minute @@ -969,7 +971,7 @@ A run with chaos ends with the verdict of the report as its exit code, so a scen [source,bash] ---- -camel run * --chaos=chaos/outage.chaos --max-seconds=240 --chaos-report=target/chaos-report.json +camel run * --chaos=test/chaos/outage.chaos --max-seconds=240 --chaos-report=target/chaos-report.json ---- * The verdict FAIL ends the run with exit code 1, and the reasons are printed (an unmet expectation, messages lost at diff --git a/components/camel-chaos/src/main/java/org/apache/camel/component/chaos/ChaosScenario.java b/components/camel-chaos/src/main/java/org/apache/camel/component/chaos/ChaosScenario.java index 628e398ade208..cadf29d9b5ff9 100644 --- a/components/camel-chaos/src/main/java/org/apache/camel/component/chaos/ChaosScenario.java +++ b/components/camel-chaos/src/main/java/org/apache/camel/component/chaos/ChaosScenario.java @@ -21,8 +21,8 @@ import java.util.List; /** - * A chaos scenario: the rules of an experiment in a file of the project, such as {@code chaos/outage.chaos}, so it can - * be run again and shared. It has one rule per line, in the one-line form of {@code camel.chaos.rules}; a line that + * A chaos scenario: the rules of an experiment in a file of the project, such as {@code test/chaos/outage.chaos}, so it + * can be run again and shared. It has one rule per line, in the one-line form of {@code camel.chaos.rules}; a line that * starts with {@code #} is a comment, and a line {@code seed=} fixes the random draws of its rules, so the * scenario fails the same messages each time. The phases of an experiment come from {@code from=} and {@code until=} of * its rules. diff --git a/core/camel-main/src/generated/resources/META-INF/camel-main-configuration-metadata.json b/core/camel-main/src/generated/resources/META-INF/camel-main-configuration-metadata.json index ad53d9c2331b0..e28484cddfe34 100644 --- a/core/camel-main/src/generated/resources/META-INF/camel-main-configuration-metadata.json +++ b/core/camel-main/src/generated/resources/META-INF/camel-main-configuration-metadata.json @@ -178,7 +178,7 @@ { "name": "camel.chaos.reportFile", "required": false, "description": "A file to write the chaos report to as JSON when the CamelContext stops, such as target\/chaos-report.json.", "sourceType": "org.apache.camel.main.ChaosConfigurationProperties", "type": "string", "javaType": "java.lang.String", "secret": false }, { "name": "camel.chaos.reportOnShutdown", "required": false, "description": "Whether to log the chaos report when the CamelContext stops, if any rule was added.", "sourceType": "org.apache.camel.main.ChaosConfigurationProperties", "type": "boolean", "javaType": "boolean", "defaultValue": true, "secret": false }, { "name": "camel.chaos.rules", "required": false, "description": "Rules to add at startup, in the one-line text form of a rule, separated by semicolons.", "sourceType": "org.apache.camel.main.ChaosConfigurationProperties", "type": "string", "javaType": "java.lang.String", "secret": false, "security": "insecure:dev" }, - { "name": "camel.chaos.scenario", "required": false, "description": "A scenario to load at startup: a file with one rule per line, # comments and an optional seed= line (such as chaos\/outage.chaos), or classpath:name. Its rules are added before the rules option, and its seed is used unless the seed option is set.", "sourceType": "org.apache.camel.main.ChaosConfigurationProperties", "type": "string", "javaType": "java.lang.String", "secret": false, "security": "insecure:dev" }, + { "name": "camel.chaos.scenario", "required": false, "description": "A scenario to load at startup: a file with one rule per line, # comments and an optional seed= line (such as test\/chaos\/outage.chaos), or classpath:name. Its rules are added before the rules option, and its seed is used unless the seed option is set.", "sourceType": "org.apache.camel.main.ChaosConfigurationProperties", "type": "string", "javaType": "java.lang.String", "secret": false, "security": "insecure:dev" }, { "name": "camel.chaos.seed", "required": false, "description": "The seed of the random draws of the rules. Without it a seed is picked at startup, and shown in the report.", "sourceType": "org.apache.camel.main.ChaosConfigurationProperties", "type": "integer", "javaType": "java.lang.Long", "secret": false }, { "name": "camel.cluster.consul.aclToken", "required": false, "description": "Sets the ACL token to be used with Consul", "sourceType": "org.apache.camel.component.consul.cluster.ConsulClusterService", "type": "string", "javaType": "java.lang.String", "secret": true, "security": "secret" }, { "name": "camel.cluster.consul.blockSeconds", "required": false, "description": "The second to wait for a watch event, default 10 seconds", "sourceType": "org.apache.camel.component.consul.cluster.ConsulClusterService", "type": "integer", "javaType": "int", "defaultValue": 10, "secret": false }, diff --git a/core/camel-main/src/main/docs/main.adoc b/core/camel-main/src/main/docs/main.adoc index 98fc48694c8bf..4a160876d4431 100644 --- a/core/camel-main/src/main/docs/main.adoc +++ b/core/camel-main/src/main/docs/main.adoc @@ -797,7 +797,7 @@ The camel.chaos supports 7 options, which are listed below. | `camel.chaos.reportFile` | A file to write the chaos report to as JSON when the CamelContext stops, such as target/chaos-report.json. | | String | `camel.chaos.reportOnShutdown` | Whether to log the chaos report when the CamelContext stops, if any rule was added. | true | boolean | `camel.chaos.rules` | Rules to add at startup, in the one-line text form of a rule, separated by semicolons. | | String -| `camel.chaos.scenario` | A scenario to load at startup: a file with one rule per line, # comments and an optional seed= line (such as chaos/outage.chaos), or classpath:name. Its rules are added before the rules option, and its seed is used unless the seed option is set. | | String +| `camel.chaos.scenario` | A scenario to load at startup: a file with one rule per line, # comments and an optional seed= line (such as test/chaos/outage.chaos), or classpath:name. Its rules are added before the rules option, and its seed is used unless the seed option is set. | | String | `camel.chaos.seed` | The seed of the random draws of the rules. Without it a seed is picked at startup, and shown in the report. | | Long |=== diff --git a/core/camel-main/src/main/java/org/apache/camel/main/ChaosConfigurationProperties.java b/core/camel-main/src/main/java/org/apache/camel/main/ChaosConfigurationProperties.java index df7260afbf7d6..e4972ded127b3 100644 --- a/core/camel-main/src/main/java/org/apache/camel/main/ChaosConfigurationProperties.java +++ b/core/camel-main/src/main/java/org/apache/camel/main/ChaosConfigurationProperties.java @@ -97,8 +97,8 @@ public String getScenario() { /** * A scenario to load at startup: a file with one rule per line, # comments and an optional seed= line (such as - * chaos/outage.chaos), or classpath:name. Its rules are added before the rules option, and its seed is used unless - * the seed option is set. + * test/chaos/outage.chaos), or classpath:name. Its rules are added before the rules option, and its seed is used + * unless the seed option is set. */ public void setScenario(String scenario) { this.scenario = scenario; @@ -165,8 +165,8 @@ public ChaosConfigurationProperties withRules(String rules) { /** * A scenario to load at startup: a file with one rule per line, # comments and an optional seed= line (such as - * chaos/outage.chaos), or classpath:name. Its rules are added before the rules option, and its seed is used unless - * the seed option is set. + * test/chaos/outage.chaos), or classpath:name. Its rules are added before the rules option, and its seed is used + * unless the seed option is set. */ public ChaosConfigurationProperties withScenario(String scenario) { this.scenario = scenario; diff --git a/design/chaos.adoc b/design/chaos.adoc index 323975f7c3b17..5587dc28b895b 100644 --- a/design/chaos.adoc +++ b/design/chaos.adoc @@ -424,7 +424,7 @@ framework, so camel-test does not depend on camel-chaos; the rules come from the list of the running integrations (exit code 2), never acting on all of them (CAMEL-26717). The MCP tools pick the integration the same way. `chaos-clear` and `camel get chaos` may omit it and then act on all that have chaos switched on, as `stop-route` does. -- A scenario (stage 2, CAMEL-26722) keeps the rules of an experiment in a file of the project, `chaos/.chaos`: +- A scenario (stage 2, CAMEL-26722) keeps the rules of an experiment in a file of the project, `test/chaos/.chaos`: one rule per line, `#` comments and a `seed=` line, with the phases from `from=`/`until=`. `camel cmd chaos-load` sends its text through the same `chaos` action (`ChaosManager.loadScenario`: a new report, then all its rules or none), and `camel run --chaos=` starts with it (`camel.chaos.scenario`, `insecure:dev` like diff --git a/docs/user-manual/modules/ROOT/pages/camel-jbang-managing.adoc b/docs/user-manual/modules/ROOT/pages/camel-jbang-managing.adoc index 0188c1921aad9..db2a227f25d01 100644 --- a/docs/user-manual/modules/ROOT/pages/camel-jbang-managing.adoc +++ b/docs/user-manual/modules/ROOT/pages/camel-jbang-managing.adoc @@ -915,7 +915,7 @@ development only: it stays off with profile `prod`, and the commands cannot swit === Chaos scenarios -A scenario keeps the rules of an experiment in a file of the project, such as `chaos/outage.chaos`: one rule per line, +A scenario keeps the rules of an experiment in a file of the project, such as `test/chaos/outage.chaos`: one rule per line, `#` comments, and an optional `seed=` line so it fails the same messages each time. The phases come from `from=` and `until=` of its rules. @@ -932,8 +932,8 @@ Start with it, or load it into an integration that runs (which removes the rules [source,bash] ---- -camel run * --chaos=chaos/outage.chaos -camel cmd chaos-load chaos/outage.chaos +camel run * --chaos=test/chaos/outage.chaos +camel cmd chaos-load test/chaos/outage.chaos ---- `camel run *` and `camel export` leave `.chaos` files out. A run with chaos ends with exit code 1 when the verdict is @@ -941,7 +941,7 @@ FAIL, so a scenario can gate a pipeline; `--chaos-report` writes the report as J [source,bash] ---- -camel run * --chaos=chaos/outage.chaos --max-seconds=240 --chaos-report=target/chaos-report.json +camel run * --chaos=test/chaos/outage.chaos --max-seconds=240 --chaos-report=target/chaos-report.json ---- Without an expectation (`expect=`) there is no verdict, and the run ends with exit code 0 and a line that says so. See diff --git a/docs/user-manual/modules/ROOT/pages/camel-jbang-tui-observe.adoc b/docs/user-manual/modules/ROOT/pages/camel-jbang-tui-observe.adoc index 0e308f1b0fdfb..c4b256c593d85 100644 --- a/docs/user-manual/modules/ROOT/pages/camel-jbang-tui-observe.adoc +++ b/docs/user-manual/modules/ROOT/pages/camel-jbang-tui-observe.adoc @@ -359,7 +359,7 @@ the rule, the seed and what the rule did. For a Maven project the AI writes a JU `ChaosAssertions` (see the camel-chaos documentation); for a folder that runs with `camel run`, a scenario with an expectation and the `camel run --chaos= --max-seconds=` command whose exit code is the verdict. It adds an expectation when the rule has none, and asks before it writes the file. -* *s* saves the rules as a scenario in the folder of the integration: `chaos/.chaos` unless you type another file, +* *s* saves the rules as a scenario in the folder of the integration: `test/chaos/.chaos` unless you type another file, with the seed and one rule per line, so the experiment can run again with `camel cmd chaos-load` or `camel run --chaos=`. A file that is there already is replaced only when you say yes. * *d* describes the chaos with AI, when the AI panel is there: say the chaos you want in your own words, such as "the diff --git a/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-debug.adoc b/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-debug.adoc index 0e96bb98fe1cb..08c8bf8ad6a6b 100644 --- a/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-debug.adoc +++ b/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-debug.adoc @@ -26,7 +26,7 @@ camel debug [options] | `--breakpoint` | To set breakpoint at the given node id (Multiple ids can be separated by comma). If no breakpoint is set, then the first route is automatic selected. | | String | `--camel-spring-boot-version` | To run using a different Camel Spring Boot version than the default version. | | String | `--camel-version` | To run using a different Camel version than the default version. | | String -| `--chaos` | Add camel-chaos, to turn on faults while running (camel cmd chaos-add); on with profile dev, never with prod. With a scenario file (such as --chaos=chaos/outage.chaos) its rules are added at startup. A run with chaos ends with exit code 1 when the chaos verdict is FAIL. With Quarkus it needs Camel Quarkus on Camel 4.24 or newer | false | boolean +| `--chaos` | Add camel-chaos, to turn on faults while running (camel cmd chaos-add); on with profile dev, never with prod. With a scenario file (such as --chaos=test/chaos/outage.chaos) its rules are added at startup. A run with chaos ends with exit code 1 when the chaos verdict is FAIL. With Quarkus it needs Camel Quarkus on Camel 4.24 or newer | false | boolean | `--chaos-report` | Write the chaos report as JSON to this file when the run ends (with --chaos) | | String | `--code` | Run the given text or file as Java DSL routes | | String | `--console` | Developer console on the local HTTP server (port 8080 by default): /q/dev with the jbang and Camel Main runtimes, /actuator/camel with Spring Boot, and /q/camel/dev-console with Quarkus | false | boolean diff --git a/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-dev.adoc b/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-dev.adoc index 164916e78a37d..cb8743a4c75c9 100644 --- a/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-dev.adoc +++ b/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-dev.adoc @@ -24,7 +24,7 @@ camel dev [options] | `--backlog-trace` | Enables backlog tracing of the routed messages | false | boolean | `--camel-spring-boot-version` | To run using a different Camel Spring Boot version than the default version. | | String | `--camel-version` | To run using a different Camel version than the default version. | | String -| `--chaos` | Add camel-chaos, to turn on faults while running (camel cmd chaos-add); on with profile dev, never with prod. With a scenario file (such as --chaos=chaos/outage.chaos) its rules are added at startup. A run with chaos ends with exit code 1 when the chaos verdict is FAIL. With Quarkus it needs Camel Quarkus on Camel 4.24 or newer | false | boolean +| `--chaos` | Add camel-chaos, to turn on faults while running (camel cmd chaos-add); on with profile dev, never with prod. With a scenario file (such as --chaos=test/chaos/outage.chaos) its rules are added at startup. A run with chaos ends with exit code 1 when the chaos verdict is FAIL. With Quarkus it needs Camel Quarkus on Camel 4.24 or newer | false | boolean | `--chaos-report` | Write the chaos report as JSON to this file when the run ends (with --chaos) | | String | `--code` | Run the given text or file as Java DSL routes | | String | `--console` | Developer console on the local HTTP server (port 8080 by default): /q/dev with the jbang and Camel Main runtimes, /actuator/camel with Spring Boot, and /q/camel/dev-console with Quarkus | false | boolean diff --git a/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-run.adoc b/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-run.adoc index 7c0e08cc48c81..79e078cb0d635 100644 --- a/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-run.adoc +++ b/docs/user-manual/modules/ROOT/pages/jbang-commands/camel-jbang-run.adoc @@ -24,7 +24,7 @@ camel run [options] | `--backlog-trace` | Enables backlog tracing of the routed messages | false | boolean | `--camel-spring-boot-version` | To run using a different Camel Spring Boot version than the default version. | | String | `--camel-version` | To run using a different Camel version than the default version. | | String -| `--chaos` | Add camel-chaos, to turn on faults while running (camel cmd chaos-add); on with profile dev, never with prod. With a scenario file (such as --chaos=chaos/outage.chaos) its rules are added at startup. A run with chaos ends with exit code 1 when the chaos verdict is FAIL. With Quarkus it needs Camel Quarkus on Camel 4.24 or newer | false | boolean +| `--chaos` | Add camel-chaos, to turn on faults while running (camel cmd chaos-add); on with profile dev, never with prod. With a scenario file (such as --chaos=test/chaos/outage.chaos) its rules are added at startup. A run with chaos ends with exit code 1 when the chaos verdict is FAIL. With Quarkus it needs Camel Quarkus on Camel 4.24 or newer | false | boolean | `--chaos-report` | Write the chaos report as JSON to this file when the run ends (with --chaos) | | String | `--code` | Run the given text or file as Java DSL routes | | String | `--console` | Developer console on the local HTTP server (port 8080 by default): /q/dev with the jbang and Camel Main runtimes, /actuator/camel with Spring Boot, and /q/camel/dev-console with Quarkus | false | boolean diff --git a/dsl/camel-jbang/camel-jbang-core/src/generated/resources/META-INF/camel-jbang-commands-metadata.json b/dsl/camel-jbang/camel-jbang-core/src/generated/resources/META-INF/camel-jbang-commands-metadata.json index 0e2630182f095..e58c1560d2bc5 100644 --- a/dsl/camel-jbang/camel-jbang-core/src/generated/resources/META-INF/camel-jbang-commands-metadata.json +++ b/dsl/camel-jbang/camel-jbang-core/src/generated/resources/META-INF/camel-jbang-commands-metadata.json @@ -6,9 +6,9 @@ { "name": "cmd", "fullName": "cmd", "description": "Performs commands in the running Camel integrations, such as start\/stop route, or change logging levels.", "sourceClass": "org.apache.camel.dsl.jbang.core.commands.action.CamelAction", "options": [ { "names": "-h,--help", "description": "Display the help and sub-commands", "javaType": "boolean", "type": "boolean" } ], "subcommands": [ { "name": "browse", "fullName": "cmd browse", "description": "Browse pending messages on endpoints", "sourceClass": "org.apache.camel.dsl.jbang.core.commands.action.CamelBrowseAction", "options": [ { "names": "--body-max-chars", "description": "Maximum size of the message body to include in the dump", "javaType": "int", "type": "integer" }, { "names": "--dump", "description": "Whether to include message dumps", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--endpoint", "description": "Endpoint to browse messages from (can be uri, pattern, or refer to a route id)", "javaType": "java.lang.String", "type": "string" }, { "names": "--fresh-size", "description": "Whether to calculate fresh queue size information (performance overhead)", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--json", "description": "Output in JSON Format", "javaType": "boolean", "type": "boolean" }, { "names": "--limit", "description": "Limits the number of messages to dump per endpoint", "defaultValue": "100", "javaType": "int", "type": "integer" }, { "names": "--logging-color", "description": "Use colored logging", "defaultValue": "true", "javaType": "boolean", "type": "boolean" }, { "names": "--mask", "description": "Whether to mask endpoint URIs to avoid printing sensitive information such as password or access keys", "javaType": "boolean", "type": "boolean" }, { "names": "--only-body", "description": "Show only message body in browsed messages", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--pretty", "description": "Pretty print message body when using JSon or XML format", "javaType": "boolean", "type": "boolean" }, { "names": "--short-uri", "description": "List endpoint URI without query parameters (short)", "javaType": "boolean", "type": "boolean" }, { "names": "--show-body", "description": "Show message body in browsed messages", "defaultValue": "true", "javaType": "boolean", "type": "boolean" }, { "names": "--show-headers", "description": "Show message headers in browsed messages", "defaultValue": "true", "javaType": "boolean", "type": "boolean" }, { "names": "--sort", "description": "Sort by uri, or size", "defaultValue": "uri", "javaType": "java.lang.String", "type": "string" }, { "names": "--tail", "description": "The number of messages from the end (latest) to dump", "javaType": "int", "type": "integer" }, { "names": "--timeout", "description": "How long to wait for the integration to answer, in millis or as a duration such as 30s", "defaultValue": "10000", "javaType": "long", "type": "integer" }, { "names": "--wide-uri", "description": "List endpoint URI in full details", "javaType": "boolean", "type": "boolean" }, { "names": "-h,--help", "description": "Display the help and sub-commands", "javaType": "boolean", "type": "boolean" } ] }, { "name": "chaos-add", "fullName": "cmd chaos-add", "description": "Add chaos rules to a running integration (camel-chaos, for development only)", "sourceClass": "org.apache.camel.dsl.jbang.core.commands.action.CamelChaosAddAction", "options": [ { "names": "--dry-run", "description": "Check the rules without adding them: each in plain words, and what it would hit in the integration now (the sends, polls, routes or steps, with their route)", "javaType": "boolean", "type": "boolean" }, { "names": "--rule", "description": "A rule in its one-line text form, as an entry of camel.chaos.rules; can be given more than once", "javaType": "java.util.List", "type": "array", "required": true }, { "names": "--timeout", "description": "How long to wait for the integration to answer, in millis or as a duration such as 30s", "defaultValue": "10000", "javaType": "long", "type": "integer" }, { "names": "-h,--help", "description": "Display the help and sub-commands", "javaType": "boolean", "type": "boolean" } ] }, { "name": "chaos-change", "fullName": "cmd chaos-change", "description": "Change a chaos rule of a running integration (camel-chaos, for development only)", "sourceClass": "org.apache.camel.dsl.jbang.core.commands.action.CamelChaosChangeAction", "options": [ { "names": "--id", "description": "The id of the rule, such as r1", "javaType": "java.lang.String", "type": "string", "required": true }, { "names": "--rule", "description": "The new rule, one rule in its one-line text form, as one entry of camel.chaos.rules", "javaType": "java.lang.String", "type": "string", "required": true }, { "names": "--timeout", "description": "How long to wait for the integration to answer, in millis or as a duration such as 30s", "defaultValue": "10000", "javaType": "long", "type": "integer" }, { "names": "-h,--help", "description": "Display the help and sub-commands", "javaType": "boolean", "type": "boolean" } ] }, { "name": "chaos-clear", "fullName": "cmd chaos-clear", "description": "Remove all chaos rules of running integrations (camel-chaos, for development only)", "sourceClass": "org.apache.camel.dsl.jbang.core.commands.action.CamelChaosClearAction", "options": [ { "names": "--reset", "description": "Also start a new report: the removed rules, the counts per route and the verdict are gone", "javaType": "boolean", "type": "boolean" }, { "names": "--timeout", "description": "How long to wait for the integration to answer, in millis or as a duration such as 30s", "defaultValue": "10000", "javaType": "long", "type": "integer" }, { "names": "-h,--help", "description": "Display the help and sub-commands", "javaType": "boolean", "type": "boolean" } ] }, { "name": "chaos-load", "fullName": "cmd chaos-load", "description": "Load a chaos scenario into a running integration (camel-chaos, for development only)", "sourceClass": "org.apache.camel.dsl.jbang.core.commands.action.CamelChaosLoadAction", "options": [ { "names": "--timeout", "description": "How long to wait for the integration to answer, in millis or as a duration such as 30s", "defaultValue": "10000", "javaType": "long", "type": "integer" }, { "names": "-h,--help", "description": "Display the help and sub-commands", "javaType": "boolean", "type": "boolean" } ] }, { "name": "chaos-remove", "fullName": "cmd chaos-remove", "description": "Remove a chaos rule of a running integration (camel-chaos, for development only)", "sourceClass": "org.apache.camel.dsl.jbang.core.commands.action.CamelChaosRemoveAction", "options": [ { "names": "--id", "description": "The id of the rule, such as r1", "javaType": "java.lang.String", "type": "string", "required": true }, { "names": "--timeout", "description": "How long to wait for the integration to answer, in millis or as a duration such as 30s", "defaultValue": "10000", "javaType": "long", "type": "integer" }, { "names": "-h,--help", "description": "Display the help and sub-commands", "javaType": "boolean", "type": "boolean" } ] }, { "name": "chaos-suggest", "fullName": "cmd chaos-suggest", "description": "Suggest chaos rules to try in a running integration, per route (camel-chaos, for development only)", "sourceClass": "org.apache.camel.dsl.jbang.core.commands.action.CamelChaosSuggestAction", "options": [ { "names": "--timeout", "description": "How long to wait for the integration to answer, in millis or as a duration such as 30s", "defaultValue": "10000", "javaType": "long", "type": "integer" }, { "names": "-h,--help", "description": "Display the help and sub-commands", "javaType": "boolean", "type": "boolean" } ] }, { "name": "disable-processor", "fullName": "cmd disable-processor", "description": "Disable Camel processor", "sourceClass": "org.apache.camel.dsl.jbang.core.commands.action.CamelProcessorDisableAction", "options": [ { "names": "--id", "description": "Processor ids (multiple ids can be separated by comma)", "defaultValue": "*", "javaType": "java.lang.String", "type": "string" }, { "names": "--timeout", "description": "How long to wait for the integration to answer, in millis or as a duration such as 30s", "defaultValue": "10000", "javaType": "long", "type": "integer" }, { "names": "-h,--help", "description": "Display the help and sub-commands", "javaType": "boolean", "type": "boolean" } ] }, { "name": "enable-processor", "fullName": "cmd enable-processor", "description": "Enable Camel processor", "sourceClass": "org.apache.camel.dsl.jbang.core.commands.action.CamelProcessorEnableAction", "options": [ { "names": "--id", "description": "Processor ids (multiple ids can be separated by comma)", "defaultValue": "*", "javaType": "java.lang.String", "type": "string" }, { "names": "--timeout", "description": "How long to wait for the integration to answer, in millis or as a duration such as 30s", "defaultValue": "10000", "javaType": "long", "type": "integer" }, { "names": "-h,--help", "description": "Display the help and sub-commands", "javaType": "boolean", "type": "boolean" } ] }, { "name": "gc", "fullName": "cmd gc", "description": "Trigger Java Memory Garbage Collector", "sourceClass": "org.apache.camel.dsl.jbang.core.commands.action.CamelGCAction", "options": [ { "names": "--timeout", "description": "How long to wait for the integration to answer, in millis or as a duration such as 30s", "defaultValue": "10000", "javaType": "long", "type": "integer" }, { "names": "-h,--help", "description": "Display the help and sub-commands", "javaType": "boolean", "type": "boolean" } ] }, { "name": "heap-dump", "fullName": "cmd heap-dump", "description": "Write a heap dump (.hprof) file for deep memory analysis", "sourceClass": "org.apache.camel.dsl.jbang.core.commands.action.CamelHeapDump", "options": [ { "names": "--dump-name", "description": "File name for the heap dump (without .hprof extension)", "javaType": "java.lang.String", "type": "string" }, { "names": "--json", "description": "Output in JSON Format", "javaType": "boolean", "type": "boolean" }, { "names": "--live", "description": "Whether to dump only live objects", "defaultValue": "true", "javaType": "boolean", "type": "boolean" }, { "names": "--timeout", "description": "How long to wait for the heap dump to be written, in millis or as a duration such as 2m", "defaultValue": "60000", "javaType": "long", "type": "integer" }, { "names": "-h,--help", "description": "Display the help and sub-commands", "javaType": "boolean", "type": "boolean" } ] }, { "name": "heap-histogram", "fullName": "cmd heap-histogram", "description": "Display class-level heap memory usage in a running Camel integration", "sourceClass": "org.apache.camel.dsl.jbang.core.commands.action.CamelHeapHistogram", "options": [ { "names": "--duration", "description": "How long to keep watching or following, in millis or as a duration such as 30s (default: until Enter is pressed)", "javaType": "long", "type": "integer" }, { "names": "--filter", "description": "Filter class names (use all to include all classes)", "defaultValue": "all", "javaType": "java.lang.String", "type": "string" }, { "names": "--json", "description": "Output in JSON Format", "javaType": "boolean", "type": "boolean" }, { "names": "--sort", "description": "Sort by bytes, instances, or className", "defaultValue": "bytes", "javaType": "java.lang.String", "type": "string" }, { "names": "--timeout", "description": "How long to wait for the integration to answer, in millis or as a duration such as 30s", "defaultValue": "10000", "javaType": "long", "type": "integer" }, { "names": "--top", "description": "Show only the top N classes", "defaultValue": "50", "javaType": "int", "type": "integer" }, { "names": "--watch", "description": "Execute periodically and showing output fullscreen", "javaType": "boolean", "type": "boolean" }, { "names": "-h,--help", "description": "Display the help and sub-commands", "javaType": "boolean", "type": "boolean" } ] }, { "name": "load", "fullName": "cmd load", "description": "Loads new source files into an existing Camel", "sourceClass": "org.apache.camel.dsl.jbang.core.commands.action.CamelLoadAction", "options": [ { "names": "--restart", "description": "To force restart all routes after loading source files", "javaType": "boolean", "type": "boolean" }, { "names": "--source", "description": "Source file(s) to load", "javaType": "java.util.List", "type": "array" }, { "names": "--timeout", "description": "How long to wait for the integration to answer, in millis or as a duration such as 30s", "defaultValue": "10000", "javaType": "long", "type": "integer" }, { "names": "-h,--help", "description": "Display the help and sub-commands", "javaType": "boolean", "type": "boolean" } ] }, { "name": "logger", "fullName": "cmd logger", "description": "List or change logging levels", "sourceClass": "org.apache.camel.dsl.jbang.core.commands.action.LoggerAction", "options": [ { "names": "--json", "description": "Output the logging levels in JSON Format", "javaType": "boolean", "type": "boolean" }, { "names": "--logger", "description": "The logger name", "defaultValue": "root", "javaType": "java.lang.String", "type": "string" }, { "names": "--logging-level", "description": "To change logging level (ERROR, WARN, INFO, DEBUG, TRACE)", "javaType": "java.lang.String", "type": "string" }, { "names": "--sort", "description": "Sort by pid, name or age", "defaultValue": "pid", "javaType": "java.lang.String", "type": "string" }, { "names": "--timeout", "description": "How long to wait for the integration to answer, in millis or as a duration such as 30s", "defaultValue": "10000", "javaType": "long", "type": "integer" }, { "names": "-h,--help", "description": "Display the help and sub-commands", "javaType": "boolean", "type": "boolean" } ] }, { "name": "memory-leak", "fullName": "cmd memory-leak", "description": "Diagnose memory leaks in a running Camel integration", "sourceClass": "org.apache.camel.dsl.jbang.core.commands.action.CamelMemoryLeak", "options": [ { "names": "--duration", "description": "Recording duration in seconds (auto-stops after this time)", "defaultValue": "60", "javaType": "int", "type": "integer" }, { "names": "--min-size", "description": "Only show samples with total size above this value (e.g. 1024, 10KB, 1MB). Default 1KB in dual mode to filter noise", "defaultValue": "0", "javaType": "java.lang.String", "type": "string" }, { "names": "--mode", "description": "Recording mode: dual (default, two recordings with trend comparison) or single (one recording)", "defaultValue": "dual", "javaType": "java.lang.String", "type": "string" }, { "names": "--query", "description": "Query cached results from the last recording", "javaType": "boolean", "type": "boolean" }, { "names": "--stacktrace", "description": "Show allocation stack trace for each sample", "javaType": "boolean", "type": "boolean" }, { "names": "--start", "description": "Start a JFR recording for OldObjectSample events", "javaType": "boolean", "type": "boolean" }, { "names": "--status", "description": "Check recording status", "javaType": "boolean", "type": "boolean" }, { "names": "--stop", "description": "Stop the active recording and display results", "javaType": "boolean", "type": "boolean" }, { "names": "--top", "description": "Show only the top N samples", "defaultValue": "50", "javaType": "int", "type": "integer" }, { "names": "-h,--help", "description": "Display the help and sub-commands", "javaType": "boolean", "type": "boolean" } ] }, { "name": "receive", "fullName": "cmd receive", "description": "Receive and dump messages from remote endpoints", "sourceClass": "org.apache.camel.dsl.jbang.core.commands.action.CamelReceiveAction", "options": [ { "names": "--action", "description": "Action to start, stop, clear, status, or dump messages", "defaultValue": "status", "javaType": "java.lang.String", "type": "string" }, { "names": "--compact", "description": "Compact output (no empty line separating messages)", "defaultValue": "true", "javaType": "boolean", "type": "boolean" }, { "names": "--download", "description": "Whether to allow automatic downloading JAR dependencies (over the internet)", "defaultValue": "true", "javaType": "boolean", "type": "boolean" }, { "names": "--duration", "description": "How long to keep watching or following, in millis or as a duration such as 30s (default: until Enter is pressed)", "javaType": "long", "type": "integer" }, { "names": "--endpoint,--uri", "description": "Endpoint to receive messages from (can be uri or pattern to refer to existing endpoint)", "javaType": "java.lang.String", "type": "string" }, { "names": "--find", "description": "Find and highlight matching text (ignore case).", "javaType": "java.lang.String[]", "type": "array" }, { "names": "--follow", "description": "Keep following and outputting new messages (press enter to exit). Without an interactive terminal the default is false, unless --duration is given.", "defaultValue": "true", "javaType": "boolean", "type": "boolean" }, { "names": "--fresh", "description": "Make sure we use fresh (i.e. non-cached) resources", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--grep", "description": "Filter messages to only output matching text (ignore case).", "javaType": "java.lang.String[]", "type": "array" }, { "names": "--logging-color", "description": "Use colored logging", "defaultValue": "true", "javaType": "boolean", "type": "boolean" }, { "names": "--mask", "description": "Whether to mask endpoint URIs to avoid printing sensitive information such as password or access keys", "javaType": "boolean", "type": "boolean" }, { "names": "--only-body", "description": "Show only message body in received messages", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--output", "description": "Output format (text, json)", "javaType": "java.lang.String", "type": "string" }, { "names": "--prefix", "description": "Print prefix with running Camel integration name. auto=only prefix when running multiple integrations. true=always prefix. false=prefix off.", "defaultValue": "auto", "javaType": "java.lang.String", "type": "string" }, { "names": "--pretty", "description": "Pretty print message body when using JSon or XML format", "javaType": "boolean", "type": "boolean" }, { "names": "--prop,--property", "description": "Additional properties; override existing (only applicable when NOT using an existing running Camel)", "javaType": "java.lang.String[]", "type": "array" }, { "names": "--properties", "description": "comma separated list of properties file (only applicable when NOT using an existing running Camel) (ex. \/path\/to\/file.properties,\/path\/to\/other.properties", "javaType": "java.lang.String", "type": "string" }, { "names": "--repo,--repos", "description": "Additional maven repositories for download on-demand (Use commas to separate multiple repositories)", "javaType": "java.lang.String", "type": "string" }, { "names": "--short-uri", "description": "List endpoint URI without query parameters (short)", "javaType": "boolean", "type": "boolean" }, { "names": "--show-body", "description": "Show message body in received messages", "defaultValue": "true", "javaType": "boolean", "type": "boolean" }, { "names": "--show-exchange-properties", "description": "Show exchange properties in received messages", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--show-exchange-variables", "description": "Show exchange variables in received messages", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--show-headers", "description": "Show message headers in received messages", "defaultValue": "true", "javaType": "boolean", "type": "boolean" }, { "names": "--since", "description": "Return messages newer than a relative duration like 5s, 2m, or 1h. The value is in seconds if no unit specified.", "javaType": "java.lang.String", "type": "string" }, { "names": "--sort", "description": "Sort by pid, name or age for showing status of messages", "defaultValue": "pid", "javaType": "java.lang.String", "type": "string" }, { "names": "--tail", "description": "The number of messages from the end to show. Use -1 to read from the beginning. Use 0 to read only new lines. Defaults to showing all messages from beginning.", "defaultValue": "-1", "javaType": "int", "type": "integer" }, { "names": "--timeout", "description": "Timeout waiting for message to be received, in millis or as a duration such as 30s", "defaultValue": "20000", "javaType": "long", "type": "integer" }, { "names": "--wide-uri", "description": "List endpoint URI in full details", "javaType": "boolean", "type": "boolean" }, { "names": "-h,--help", "description": "Display the help and sub-commands", "javaType": "boolean", "type": "boolean" } ] }, { "name": "reload", "fullName": "cmd reload", "description": "Trigger reloading Camel", "sourceClass": "org.apache.camel.dsl.jbang.core.commands.action.CamelReloadAction", "options": [ { "names": "--timeout", "description": "How long to wait for the integration to answer, in millis or as a duration such as 30s", "defaultValue": "10000", "javaType": "long", "type": "integer" }, { "names": "-h,--help", "description": "Display the help and sub-commands", "javaType": "boolean", "type": "boolean" } ] }, { "name": "reset-stats", "fullName": "cmd reset-stats", "description": "Reset performance statistics", "sourceClass": "org.apache.camel.dsl.jbang.core.commands.action.CamelResetStatsAction", "options": [ { "names": "--timeout", "description": "How long to wait for the integration to answer, in millis or as a duration such as 30s", "defaultValue": "10000", "javaType": "long", "type": "integer" }, { "names": "-h,--help", "description": "Display the help and sub-commands", "javaType": "boolean", "type": "boolean" } ] }, { "name": "resume-route", "fullName": "cmd resume-route", "description": "Resume Camel routes", "sourceClass": "org.apache.camel.dsl.jbang.core.commands.action.CamelRouteResumeAction", "options": [ { "names": "--id", "description": "Route ids (multiple ids can be separated by comma)", "defaultValue": "*", "javaType": "java.lang.String", "type": "string" }, { "names": "--timeout", "description": "How long to wait for the integration to answer, in millis or as a duration such as 30s", "defaultValue": "10000", "javaType": "long", "type": "integer" }, { "names": "-h,--help", "description": "Display the help and sub-commands", "javaType": "boolean", "type": "boolean" } ] }, { "name": "route-diagram", "fullName": "cmd route-diagram", "description": "Display Camel route diagram in the terminal", "sourceClass": "org.apache.camel.dsl.jbang.core.commands.action.CamelRouteDiagramAction", "options": [ { "names": "--body-types", "description": "Whether to show the body types each step has been reached with, on the arrow into the step, in an image (only for a running Camel application whose message history recorded them, such as in the dev profile)", "defaultValue": "true", "javaType": "boolean", "type": "boolean" }, { "names": "--box-width", "description": "Node box width in logical pixels", "defaultValue": "180", "javaType": "int", "type": "integer" }, { "names": "--compile", "description": "Whether to compile Java source files and load their routes. By default Java routes are read by the Java DSL parser, without compiling them", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--duration", "description": "How long to keep watching or following, in millis or as a duration such as 30s (default: until Enter is pressed)", "javaType": "long", "type": "integer" }, { "names": "--errors", "description": "Draw the error handling of each route in a frame below its steps: its onException clauses, where its failures go and where it is reached on error from. Without it only the steps of the route are drawn", "javaType": "boolean", "type": "boolean" }, { "names": "--filter", "description": "Filter route by filename or route id", "javaType": "java.lang.String", "type": "string" }, { "names": "--font-size", "description": "Font size in logical pixels for node text", "defaultValue": "12", "javaType": "int", "type": "integer" }, { "names": "--highlight", "description": "Comma-separated node IDs to highlight in the diagram", "javaType": "java.lang.String", "type": "string" }, { "names": "--highlight-style", "description": "Highlight style: success (green) or fail (red)", "defaultValue": "success", "javaType": "java.lang.String", "type": "string" }, { "names": "--ignore-loading-error", "description": "Whether to ignore route loading and compilation errors (use this with care!)", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--metric", "description": "Whether to include live metrics (only possible for running Camel application)", "defaultValue": "true", "javaType": "boolean", "type": "boolean" }, { "names": "--node-label", "description": "What text to display in diagram nodes: code, description, or both (default)", "defaultValue": "both", "javaType": "java.lang.String", "type": "string" }, { "names": "--output", "description": "Save diagram to a file (PNG for image themes, text for ascii theme)", "javaType": "java.lang.String", "type": "string" }, { "names": "--problems", "description": "Whether to mark the steps that the checks of camel validate find a problem with, and say what it is beside the route, in an image of source files", "defaultValue": "true", "javaType": "boolean", "type": "boolean" }, { "names": "--theme", "description": "Color theme preset (dark, light, transparent, ascii, unicode) or custom colors (e.g. bg=#1e1e1e:from=#2e7d32:to=#1565c0). Values can be #hex or ANSI color names (e.g. from=seagreen:to=steelblue). Use bg= for transparent. Use ascii\/unicode for plain text output. Can also be set via DIAGRAM_COLORS env var. Default: unicode in the terminal, and light when --output is a .png file.", "javaType": "java.lang.String", "type": "string" }, { "names": "--timeout", "description": "How long to wait for the integration to answer, in millis or as a duration such as 30s", "defaultValue": "10000", "javaType": "long", "type": "integer" }, { "names": "--watch", "description": "Execute periodically and showing output fullscreen", "javaType": "boolean", "type": "boolean" }, { "names": "--width", "description": "Image width in pixels (0 = auto)", "defaultValue": "0", "javaType": "int", "type": "integer" }, { "names": "-h,--help", "description": "Display the help and sub-commands", "javaType": "boolean", "type": "boolean" } ] }, { "name": "route-dump", "fullName": "cmd route-dump", "description": "Dump Camel route in XML, YAML, or Java DSL format", "sourceClass": "org.apache.camel.dsl.jbang.core.commands.action.CamelRouteDumpAction", "options": [ { "names": "--filter", "description": "Filter route by filename or route id (multiple names can be separated by comma)", "javaType": "java.lang.String", "type": "string" }, { "names": "--format", "description": "Output format (xml, yaml, or java)", "defaultValue": "yaml", "javaType": "java.lang.String", "type": "string" }, { "names": "--json", "description": "Output in JSON Format", "javaType": "boolean", "type": "boolean" }, { "names": "--raw", "description": "To output raw without metadata", "javaType": "boolean", "type": "boolean" }, { "names": "--sort", "description": "Sort route by name or id", "defaultValue": "name", "javaType": "java.lang.String", "type": "string" }, { "names": "--timeout", "description": "How long to wait for the integration to answer, in millis or as a duration such as 30s", "defaultValue": "10000", "javaType": "long", "type": "integer" }, { "names": "--uri-as-parameters", "description": "Whether to expand URIs into separated key\/value parameters (only in use for YAML format)", "defaultValue": "true", "javaType": "boolean", "type": "boolean" }, { "names": "-h,--help", "description": "Display the help and sub-commands", "javaType": "boolean", "type": "boolean" } ] }, { "name": "route-structure", "fullName": "cmd route-structure", "description": "Dump Camel route structure", "sourceClass": "org.apache.camel.dsl.jbang.core.commands.action.CamelRouteStructureAction", "options": [ { "names": "--brief", "description": "To show less detailed route structure", "javaType": "boolean", "type": "boolean" }, { "names": "--compile", "description": "Whether to compile Java source files and load their routes. By default Java routes are read by the Java DSL parser, without compiling them", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--description", "description": "To show description instead of code", "javaType": "boolean", "type": "boolean" }, { "names": "--filter", "description": "Filter route by filename or route id (multiple names can be separated by comma)", "javaType": "java.lang.String", "type": "string" }, { "names": "--ignore-loading-error", "description": "Whether to ignore route loading and compilation errors (use this with care!)", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--json", "description": "Output in JSON Format", "javaType": "boolean", "type": "boolean" }, { "names": "--raw", "description": "To output raw without metadata", "javaType": "boolean", "type": "boolean" }, { "names": "--sort", "description": "Sort route by name or id", "defaultValue": "name", "javaType": "java.lang.String", "type": "string" }, { "names": "--timeout", "description": "How long to wait for the integration to answer, in millis or as a duration such as 30s", "defaultValue": "10000", "javaType": "long", "type": "integer" }, { "names": "--varied", "description": "To show only the steps that have been reached with more than one body type, as the running integration has seen them (the message history records them, such as with camel run --dev)", "javaType": "boolean", "type": "boolean" }, { "names": "-h,--help", "description": "Display the help and sub-commands", "javaType": "boolean", "type": "boolean" } ] }, { "name": "route-topology", "fullName": "cmd route-topology", "description": "Display inter-route topology connections", "sourceClass": "org.apache.camel.dsl.jbang.core.commands.action.CamelRouteTopologyAction", "options": [ { "names": "--box-width", "description": "Width of diagram node boxes", "defaultValue": "180", "javaType": "int", "type": "integer" }, { "names": "--compile", "description": "Whether to compile Java source files and load their routes. By default Java routes are read by the Java DSL parser, without compiling them", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--description", "description": "Prefer route description over route id in node labels", "javaType": "boolean", "type": "boolean" }, { "names": "--errors", "description": "Draw the error handling: the routes reached only on error in a frame of their own below the routes, with where their failures come from (with --theme)", "javaType": "boolean", "type": "boolean" }, { "names": "--external", "description": "Include external systems (consumers at top, producers at bottom)", "javaType": "boolean", "type": "boolean" }, { "names": "--font-size", "description": "Font size in logical pixels for node text", "defaultValue": "12", "javaType": "int", "type": "integer" }, { "names": "--ignore-loading-error", "description": "Whether to ignore route loading and compilation errors (use this with care!)", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--json", "description": "Output in JSON Format", "javaType": "boolean", "type": "boolean" }, { "names": "--kamelets", "description": "Include routes created by Kamelets (hidden by default, only for a running Camel application)", "javaType": "boolean", "type": "boolean" }, { "names": "--metric", "description": "Whether to include live metrics (only possible for a running Camel application)", "defaultValue": "true", "javaType": "boolean", "type": "boolean" }, { "names": "--output", "description": "Save diagram to a file (PNG for image themes, text for ascii theme)", "javaType": "java.lang.String", "type": "string" }, { "names": "--theme", "description": "Color theme preset (dark, light, transparent, ascii, unicode) or custom colors (e.g. bg=#1e1e1e:from=#2e7d32:to=#1565c0). Use ascii\/unicode for plain text output.", "javaType": "java.lang.String", "type": "string" }, { "names": "--timeout", "description": "How long to wait for the integration to answer, in millis or as a duration such as 30s", "defaultValue": "10000", "javaType": "long", "type": "integer" }, { "names": "-h,--help", "description": "Display the help and sub-commands", "javaType": "boolean", "type": "boolean" } ] }, { "name": "send", "fullName": "cmd send", "description": "Send messages to endpoints", "sourceClass": "org.apache.camel.dsl.jbang.core.commands.action.CamelSendAction", "options": [ { "names": "--body", "description": "Message body to send (prefix with file: to refer to loading message body from file)", "javaType": "java.lang.String", "type": "string" }, { "names": "--download", "description": "Whether to allow automatic downloading JAR dependencies (over the internet)", "defaultValue": "true", "javaType": "boolean", "type": "boolean" }, { "names": "--endpoint,--uri", "description": "Endpoint where to send the message (can be uri, pattern, or refer to a route id)", "javaType": "java.lang.String", "type": "string" }, { "names": "--fresh", "description": "Make sure we use fresh (i.e. non-cached) resources", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--header", "description": "Message header (key=value)", "javaType": "java.util.List", "type": "array" }, { "names": "--infra", "description": "Send to infrastructure service (e.g., nats, kafka)", "javaType": "java.lang.String", "type": "string" }, { "names": "--logging-color", "description": "Use colored logging", "defaultValue": "true", "javaType": "boolean", "type": "boolean" }, { "names": "--poll", "description": "Poll instead of sending a message. This can be used to receive latest message from a Kafka topic or JMS queue.", "javaType": "boolean", "type": "boolean" }, { "names": "--pretty", "description": "Pretty print response message body (InOut) when using JSon or XML format", "javaType": "boolean", "type": "boolean" }, { "names": "--prop,--property", "description": "Additional properties; override existing (only applicable when NOT using an existing running Camel)", "javaType": "java.lang.String[]", "type": "array" }, { "names": "--properties", "description": "comma separated list of properties file (only applicable when NOT using an existing running Camel) (ex. \/path\/to\/file.properties,\/path\/to\/other.properties", "javaType": "java.lang.String", "type": "string" }, { "names": "--reply", "description": "Whether to expect a reply message (InOut vs InOut messaging style)", "javaType": "boolean", "type": "boolean" }, { "names": "--reply-file", "description": "Saves reply message to the file with the given name (override if exists)", "javaType": "java.lang.String", "type": "string" }, { "names": "--repo,--repos", "description": "Additional maven repositories for download on-demand (Use commas to separate multiple repositories)", "javaType": "java.lang.String", "type": "string" }, { "names": "--show-body", "description": "Show message body from response message (InOut)", "defaultValue": "true", "javaType": "boolean", "type": "boolean" }, { "names": "--show-exception", "description": "Show exception and stacktrace for failed messages", "defaultValue": "true", "javaType": "boolean", "type": "boolean" }, { "names": "--show-exchange-properties", "description": "Show exchange properties from response message (InOut)", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--show-exchange-variables", "description": "Show exchange variables from response message (InOut)", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--show-headers", "description": "Show message headers from response message (InOut)", "defaultValue": "true", "javaType": "boolean", "type": "boolean" }, { "names": "--timeout", "description": "Timeout waiting for message to be sent (and reply message if InOut messaging), in millis or as a duration such as 30s", "defaultValue": "20000", "javaType": "long", "type": "integer" }, { "names": "-h,--help", "description": "Display the help and sub-commands", "javaType": "boolean", "type": "boolean" } ] }, { "name": "span", "fullName": "cmd span", "description": "Display OpenTelemetry spans from running Camel integrations", "sourceClass": "org.apache.camel.dsl.jbang.core.commands.action.CamelSpanAction", "options": [ { "names": "--filter", "description": "Filter by trace ID, route, component, or exchange ID (substring match)", "javaType": "java.lang.String", "type": "string" }, { "names": "--flat", "description": "Show flat list of individual spans instead of grouped traces", "javaType": "boolean", "type": "boolean" }, { "names": "--json", "description": "Output the spans in JSON Format", "javaType": "boolean", "type": "boolean" }, { "names": "--limit", "description": "Maximum number of spans to display", "defaultValue": "500", "javaType": "int", "type": "integer" }, { "names": "--logging-color", "description": "Use colored logging", "defaultValue": "true", "javaType": "boolean", "type": "boolean" }, { "names": "--sort", "description": "Sort by trace, route, from, spans, routes, status, or duration", "javaType": "java.lang.String", "type": "string" }, { "names": "--timeout", "description": "How long to wait for the integration to answer, in millis or as a duration such as 30s", "defaultValue": "10000", "javaType": "long", "type": "integer" }, { "names": "--trace", "description": "Show waterfall view for a specific trace ID (substring match)", "javaType": "java.lang.String", "type": "string" }, { "names": "-h,--help", "description": "Display the help and sub-commands", "javaType": "boolean", "type": "boolean" } ] }, { "name": "sql", "fullName": "cmd sql", "description": "Execute SQL query on a DataSource", "sourceClass": "org.apache.camel.dsl.jbang.core.commands.action.CamelSqlQueryAction", "options": [ { "names": "--datasource", "description": "Name of the DataSource bean (auto-detected if only one exists)", "javaType": "java.lang.String", "type": "string" }, { "names": "--json", "description": "Output in JSON Format", "javaType": "boolean", "type": "boolean" }, { "names": "--max-rows", "description": "Maximum number of rows to return", "defaultValue": "100", "javaType": "int", "type": "integer" }, { "names": "--query,--sql", "description": "The SQL query to execute, or file: to load from a file", "javaType": "java.lang.String", "type": "string", "required": true }, { "names": "--query-timeout", "description": "Query timeout in seconds", "defaultValue": "30", "javaType": "int", "type": "integer" }, { "names": "-h,--help", "description": "Display the help and sub-commands", "javaType": "boolean", "type": "boolean" } ] }, { "name": "start-group", "fullName": "cmd start-group", "description": "Start Camel route groups", "sourceClass": "org.apache.camel.dsl.jbang.core.commands.action.CamelRouteGroupStartAction", "options": [ { "names": "--id", "description": "Route ids (multiple ids can be separated by comma)", "defaultValue": "*", "javaType": "java.lang.String", "type": "string" }, { "names": "--timeout", "description": "How long to wait for the integration to answer, in millis or as a duration such as 30s", "defaultValue": "10000", "javaType": "long", "type": "integer" }, { "names": "-h,--help", "description": "Display the help and sub-commands", "javaType": "boolean", "type": "boolean" } ] }, { "name": "start-route", "fullName": "cmd start-route", "description": "Start Camel routes", "sourceClass": "org.apache.camel.dsl.jbang.core.commands.action.CamelRouteStartAction", "options": [ { "names": "--id", "description": "Route ids (multiple ids can be separated by comma)", "defaultValue": "*", "javaType": "java.lang.String", "type": "string" }, { "names": "--timeout", "description": "How long to wait for the integration to answer, in millis or as a duration such as 30s", "defaultValue": "10000", "javaType": "long", "type": "integer" }, { "names": "-h,--help", "description": "Display the help and sub-commands", "javaType": "boolean", "type": "boolean" } ] }, { "name": "stop-group", "fullName": "cmd stop-group", "description": "Stop Camel route groups", "sourceClass": "org.apache.camel.dsl.jbang.core.commands.action.CamelRouteGroupStopAction", "options": [ { "names": "--id", "description": "Route ids (multiple ids can be separated by comma)", "defaultValue": "*", "javaType": "java.lang.String", "type": "string" }, { "names": "--timeout", "description": "How long to wait for the integration to answer, in millis or as a duration such as 30s", "defaultValue": "10000", "javaType": "long", "type": "integer" }, { "names": "-h,--help", "description": "Display the help and sub-commands", "javaType": "boolean", "type": "boolean" } ] }, { "name": "stop-route", "fullName": "cmd stop-route", "description": "Stop Camel routes", "sourceClass": "org.apache.camel.dsl.jbang.core.commands.action.CamelRouteStopAction", "options": [ { "names": "--id", "description": "Route ids (multiple ids can be separated by comma)", "defaultValue": "*", "javaType": "java.lang.String", "type": "string" }, { "names": "--timeout", "description": "How long to wait for the integration to answer, in millis or as a duration such as 30s", "defaultValue": "10000", "javaType": "long", "type": "integer" }, { "names": "-h,--help", "description": "Display the help and sub-commands", "javaType": "boolean", "type": "boolean" } ] }, { "name": "stub", "fullName": "cmd stub", "description": "Browse stub endpoints", "sourceClass": "org.apache.camel.dsl.jbang.core.commands.action.CamelStubAction", "options": [ { "names": "--browse", "description": "Whether to browse messages queued in the stub endpoints", "javaType": "boolean", "type": "boolean" }, { "names": "--compact", "description": "Compact output (no empty line separating browsed messages)", "defaultValue": "true", "javaType": "boolean", "type": "boolean" }, { "names": "--duration", "description": "How long to keep watching or following, in millis or as a duration such as 30s (default: until Enter is pressed)", "javaType": "long", "type": "integer" }, { "names": "--filter", "description": "Filter endpoints by queue name", "javaType": "java.lang.String", "type": "string" }, { "names": "--find", "description": "Find and highlight matching text (ignore case).", "javaType": "java.lang.String[]", "type": "array" }, { "names": "--grep", "description": "Filter browsing messages to only output trace matching text (ignore case).", "javaType": "java.lang.String[]", "type": "array" }, { "names": "--json", "description": "Output in JSON Format", "javaType": "boolean", "type": "boolean" }, { "names": "--limit", "description": "Filter browsing queues by limiting to the given latest number of messages", "defaultValue": "10", "javaType": "int", "type": "integer" }, { "names": "--logging-color", "description": "Use colored logging", "defaultValue": "true", "javaType": "boolean", "type": "boolean" }, { "names": "--mask", "description": "Whether to mask endpoint URIs to avoid printing sensitive information such as password or access keys", "javaType": "boolean", "type": "boolean" }, { "names": "--pretty", "description": "Pretty print message body when using JSon or XML format", "javaType": "boolean", "type": "boolean" }, { "names": "--show-body", "description": "Show message body in traced messages", "defaultValue": "true", "javaType": "boolean", "type": "boolean" }, { "names": "--show-headers", "description": "Show message headers in traced messages", "defaultValue": "true", "javaType": "boolean", "type": "boolean" }, { "names": "--sort", "description": "Sort by name, or total", "defaultValue": "name", "javaType": "java.lang.String", "type": "string" }, { "names": "--timeout", "description": "How long to wait for the integration to answer, in millis or as a duration such as 30s", "defaultValue": "10000", "javaType": "long", "type": "integer" }, { "names": "--top", "description": "Whether to browse top (latest) messages queued in the stub endpoints", "defaultValue": "true", "javaType": "boolean", "type": "boolean" }, { "names": "--watch", "description": "Execute periodically and showing output fullscreen", "javaType": "boolean", "type": "boolean" }, { "names": "-h,--help", "description": "Display the help and sub-commands", "javaType": "boolean", "type": "boolean" } ] }, { "name": "suspend-route", "fullName": "cmd suspend-route", "description": "Suspend Camel routes", "sourceClass": "org.apache.camel.dsl.jbang.core.commands.action.CamelRouteSuspendAction", "options": [ { "names": "--id", "description": "Route ids (multiple ids can be separated by comma)", "defaultValue": "*", "javaType": "java.lang.String", "type": "string" }, { "names": "--timeout", "description": "How long to wait for the integration to answer, in millis or as a duration such as 30s", "defaultValue": "10000", "javaType": "long", "type": "integer" }, { "names": "-h,--help", "description": "Display the help and sub-commands", "javaType": "boolean", "type": "boolean" } ] }, { "name": "thread-dump", "fullName": "cmd thread-dump", "description": "List threads in a running Camel integration", "sourceClass": "org.apache.camel.dsl.jbang.core.commands.action.CamelThreadDump", "options": [ { "names": "--depth", "description": "Max depth of stack-trace", "defaultValue": "1", "javaType": "int", "type": "integer" }, { "names": "--duration", "description": "How long to keep watching or following, in millis or as a duration such as 30s (default: until Enter is pressed)", "javaType": "long", "type": "integer" }, { "names": "--filter", "description": "Filter thread names\/ids (use all to include all threads)", "defaultValue": "Camel", "javaType": "java.lang.String[]", "type": "array" }, { "names": "--json", "description": "Output in JSON Format", "javaType": "boolean", "type": "boolean" }, { "names": "--sort", "description": "Sort by id, name or state", "defaultValue": "id", "javaType": "java.lang.String", "type": "string" }, { "names": "--state", "description": "To only show threads for a given state", "javaType": "java.lang.String", "type": "string" }, { "names": "--timeout", "description": "How long to wait for the integration to answer, in millis or as a duration such as 30s", "defaultValue": "10000", "javaType": "long", "type": "integer" }, { "names": "--trace", "description": "Include stack-traces", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--watch", "description": "Execute periodically and showing output fullscreen", "javaType": "boolean", "type": "boolean" }, { "names": "-h,--help", "description": "Display the help and sub-commands", "javaType": "boolean", "type": "boolean" } ] } ] }, { "name": "completion", "fullName": "completion", "description": "Generate completion script for bash\/zsh", "sourceClass": "org.apache.camel.dsl.jbang.core.commands.Complete", "options": [ { "names": "-h,--help", "description": "Display the help and sub-commands", "javaType": "boolean", "type": "boolean" } ] }, { "name": "config", "fullName": "config", "description": "Get and set user configuration values", "sourceClass": "org.apache.camel.dsl.jbang.core.commands.config.ConfigCommand", "options": [ { "names": "-h,--help", "description": "Display the help and sub-commands", "javaType": "boolean", "type": "boolean" } ], "subcommands": [ { "name": "get", "fullName": "config get", "description": "Display user configuration value", "sourceClass": "org.apache.camel.dsl.jbang.core.commands.config.ConfigGet", "options": [ { "names": "--global", "description": "Use global or local configuration", "javaType": "boolean", "type": "boolean" }, { "names": "--json", "description": "Output in JSON Format", "javaType": "boolean", "type": "boolean" }, { "names": "-h,--help", "description": "Display the help and sub-commands", "javaType": "boolean", "type": "boolean" } ] }, { "name": "list", "fullName": "config list", "description": "Displays user configuration", "sourceClass": "org.apache.camel.dsl.jbang.core.commands.config.ConfigList", "options": [ { "names": "--global", "description": "Use global or local configuration", "javaType": "boolean", "type": "boolean" }, { "names": "--json", "description": "Output in JSON Format: one entry per key, with its scope (local or global)", "javaType": "boolean", "type": "boolean" }, { "names": "-h,--help", "description": "Display the help and sub-commands", "javaType": "boolean", "type": "boolean" } ] }, { "name": "set", "fullName": "config set", "description": "Set user configuration value", "sourceClass": "org.apache.camel.dsl.jbang.core.commands.config.ConfigSet", "options": [ { "names": "--global", "description": "Use global or local configuration", "javaType": "boolean", "type": "boolean" }, { "names": "-h,--help", "description": "Display the help and sub-commands", "javaType": "boolean", "type": "boolean" } ] }, { "name": "unset", "fullName": "config unset", "description": "Remove user configuration value", "sourceClass": "org.apache.camel.dsl.jbang.core.commands.config.ConfigUnset", "options": [ { "names": "--global", "description": "Use global or local configurations", "javaType": "boolean", "type": "boolean" }, { "names": "-h,--help", "description": "Display the help and sub-commands", "javaType": "boolean", "type": "boolean" } ] } ] }, - { "name": "debug", "fullName": "debug", "description": "Debug local Camel integration", "sourceClass": "org.apache.camel.dsl.jbang.core.commands.Debug", "options": [ { "names": "--ago", "description": "Use ago instead of yyyy-MM-dd HH:mm:ss in timestamp.", "javaType": "boolean", "type": "boolean" }, { "names": "--background", "description": "Run in the background", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--background-wait", "description": "How long to wait for the integration in the background to start, before returning, in millis or as a duration such as 2m (true waits 60 seconds, false does not wait)", "defaultValue": "60s", "javaType": "long", "type": "integer" }, { "names": "--backlog-trace", "description": "Enables backlog tracing of the routed messages", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--breakpoint", "description": "To set breakpoint at the given node id (Multiple ids can be separated by comma). If no breakpoint is set, then the first route is automatic selected.", "javaType": "java.lang.String", "type": "string" }, { "names": "--camel-spring-boot-version", "description": "To run using a different Camel Spring Boot version than the default version.", "javaType": "java.lang.String", "type": "string" }, { "names": "--camel-version", "description": "To run using a different Camel version than the default version.", "javaType": "java.lang.String", "type": "string" }, { "names": "--chaos", "description": "Add camel-chaos, to turn on faults while running (camel cmd chaos-add); on with profile dev, never with prod. With a scenario file (such as --chaos=chaos\/outage.chaos) its rules are added at startup. A run with chaos ends with exit code 1 when the chaos verdict is FAIL. With Quarkus it needs Camel Quarkus on Camel 4.24 or newer", "defaultValue": "false", "javaType": "boolean", "type": "boolean", "paramLabel": "" }, { "names": "--chaos-report", "description": "Write the chaos report as JSON to this file when the run ends (with --chaos)", "javaType": "java.lang.String", "type": "string", "paramLabel": "" }, { "names": "--code", "description": "Run the given text or file as Java DSL routes", "javaType": "java.lang.String", "type": "string" }, { "names": "--console", "description": "Developer console on the local HTTP server (port 8080 by default): \/q\/dev with the jbang and Camel Main runtimes, \/actuator\/camel with Spring Boot, and \/q\/camel\/dev-console with Quarkus", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--data-dir", "description": "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 (such as inbox,archive).", "javaType": "java.lang.String", "type": "string" }, { "names": "--dep,--dependency", "description": "Add additional dependencies", "javaType": "java.util.List", "type": "array" }, { "names": "--download", "description": "Whether to allow automatic downloading JAR dependencies (over the internet)", "defaultValue": "true", "javaType": "boolean", "type": "boolean" }, { "names": "--empty", "description": "Run an empty Camel without loading source files", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--example", "description": "Run an example by name (timer-log or route\/aggregator), list the groups when no name is given, or list one group by its name (route).", "javaType": "java.lang.String", "type": "string" }, { "names": "--exclude", "description": "Exclude files by name or pattern", "javaType": "java.util.List", "type": "array" }, { "names": "--fresh", "description": "Make sure we use fresh (i.e. non-cached) resources", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--gav", "description": "The Maven group:artifact:version (used during exporting)", "javaType": "java.lang.String", "type": "string" }, { "names": "--health", "description": "Deprecated: use --observe instead. Health check at \/q\/health on local HTTP server (port 8080 by default)", "defaultValue": "false", "javaType": "boolean", "type": "boolean", "deprecated": true }, { "names": "--ignore-loading-error", "description": "Whether to ignore route loading and compilation errors (use this with care!)", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--java-version,--java", "description": "Java version (21, 25)", "defaultValue": "21", "javaType": "java.lang.String", "type": "string" }, { "names": "--jfr", "description": "Enables Java Flight Recorder, saving a recording to .jfr on exit. Automatically adds JFR support for the runtime and turns on the Camel runtime instrumentation events (route, processor, exchange, etc.).", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--jfr-profile", "description": "Java Flight Recorder settings profile to use (such as default or profile). Implies --jfr.", "javaType": "java.lang.String", "type": "string" }, { "names": "--jvm-args", "description": "Additional JVM arguments (e.g. -Xmx256m -Xms128m)", "javaType": "java.lang.String", "type": "string" }, { "names": "--jvm-debug", "description": "To enable JVM remote debugging on port 4004 by default. The supported values are true to enable the remote debugging, false to disable the remote debugging or a number to use a custom port", "javaType": "int", "type": "integer", "paramLabel": "" }, { "names": "--kamelets-version", "description": "Apache Camel Kamelets version (auto-detected from classpath if not set)", "javaType": "java.lang.String", "type": "string" }, { "names": "--lazy-bean", "description": "Whether to use lazy bean initialization (can help with complex classloading issues)", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--local-kamelet-dir", "description": "Local directory (or github link) for loading Kamelets (takes precedence). Multiple directories can be specified separated by comma.", "javaType": "java.lang.String", "type": "string" }, { "names": "--log-lines", "description": "Number of log lines to display on top of screen", "defaultValue": "10", "javaType": "int", "type": "integer" }, { "names": "--logging", "description": "Can be used to turn off logging", "defaultValue": "true", "javaType": "boolean", "type": "boolean" }, { "names": "--logging-category", "description": "Used for individual logging levels (ex: org.apache.kafka=DEBUG)", "javaType": "java.util.List", "type": "array" }, { "names": "--logging-color", "description": "Use colored logging. Default is auto-detected based on NO_COLOR, CI, FORCE_COLOR environment variables and terminal capabilities", "javaType": "boolean", "type": "boolean" }, { "names": "--logging-config-path", "description": "Path to file with custom logging configuration", "javaType": "java.lang.String", "type": "string" }, { "names": "--logging-json", "description": "Use JSON logging (ECS Layout)", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--logging-level", "description": "Logging level (ERROR, WARN, INFO, DEBUG, TRACE)", "defaultValue": "info", "javaType": "java.lang.String", "type": "string" }, { "names": "--management-port", "description": "To use a dedicated port for HTTP management (use 0 to dynamic assign a free random port number)", "javaType": "int", "type": "integer" }, { "names": "--mask", "description": "Whether to mask endpoint URIs to avoid printing sensitive information such as password or access keys", "javaType": "boolean", "type": "boolean" }, { "names": "--maven-apache-snapshot-enabled", "description": "Whether downloading JARs from ASF Maven Snapshot repository is enabled", "defaultValue": "true", "javaType": "boolean", "type": "boolean" }, { "names": "--maven-central-enabled", "description": "Whether downloading JARs from Maven Central repository is enabled", "defaultValue": "true", "javaType": "boolean", "type": "boolean" }, { "names": "--maven-settings", "description": "Optional location of Maven settings.xml file to configure servers, repositories, mirrors and proxies. If set to \"false\", not even the default ~\/.m2\/settings.xml will be used.", "javaType": "java.lang.String", "type": "string" }, { "names": "--maven-settings-security", "description": "Optional location of Maven settings-security.xml file to decrypt settings.xml", "javaType": "java.lang.String", "type": "string" }, { "names": "--max-idle-seconds", "description": "For how long time in seconds Camel can be idle before stopping", "defaultValue": "0", "javaType": "int", "type": "integer" }, { "names": "--max-messages", "description": "Max number of messages to process before stopping", "defaultValue": "0", "javaType": "int", "type": "integer" }, { "names": "--max-seconds", "description": "Max seconds to run before stopping", "defaultValue": "0", "javaType": "int", "type": "integer" }, { "names": "--mcp", "description": "Embed dev\/diagnostics MCP tools on the local HTTP management server (\/mcp by default). When management shares the main HTTP port, MCP is served on the main server bind address. Also binds the management server to 127.0.0.1 (affecting health\/metrics when --observe is used).", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--mcp-stdio", "description": "Expose tagged ai-tool routes as MCP tools over process stdin\/stdout for IDE subprocess integration (no HTTP port). Requires --mcp-tags or camel.server.mcp-tags. Logging and startup summaries are routed to stderr so stdout carries MCP protocol only.", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--mcp-tags", "description": "Comma-separated ai-tool tags to expose on the ai-tool MCP server (maps to camel.server.mcp-tags). Use with --mcp-stdio or when camel.server.mcp-enabled is configured for HTTP transport. Not used by --mcp (dev\/diagnostics MCP).", "javaType": "java.lang.String", "type": "string" }, { "names": "--metrics", "description": "Deprecated: use --observe instead. Metrics (Micrometer and Prometheus) at \/q\/metrics on local HTTP server (port 8080 by default)", "defaultValue": "false", "javaType": "boolean", "type": "boolean", "deprecated": true }, { "names": "--modeline", "description": "Whether to support JBang style \/\/DEPS to specify additional dependencies", "defaultValue": "true", "javaType": "boolean", "type": "boolean" }, { "names": "--name", "description": "The name of the Camel application. By default the name of the directory when running a whole directory (--source-dir, or a directory), else the name of the first file", "defaultValue": "CamelJBang", "javaType": "java.lang.String", "type": "string" }, { "names": "--observe", "description": "Enable observability services (health, metrics, dev console, and lightweight Camel-only tracing in the TUI Spans tab)", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--open-api", "description": "Adds an OpenAPI spec from the given file (json or yaml file)", "javaType": "java.lang.String", "type": "string" }, { "names": "--open-telemetry-agent", "description": "Enable OpenTelemetry Java Agent for auto-instrumentation of third-party libraries (HTTP clients, JDBC, Kafka clients, gRPC, etc.). Traces are shown in the TUI Spans tab with Camel spans in cyan and 3rd-party agent spans in magenta.", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--open-telemetry-agent-export", "description": "Where to export OpenTelemetry Agent telemetry: tui (embedded receiver in TUI), otlp (external OTLP collector for traces), or observability (full stack with traces and logs). With otlp, start a trace backend first (e.g. 'camel infra run jaeger'). With observability, start the stack via 'camel infra run observability'. The value 'jaeger' is deprecated and works as an alias for 'otlp'.", "defaultValue": "tui", "javaType": "java.lang.String", "type": "string" }, { "names": "--openapi-ui", "description": "Swagger UI for REST OpenAPI at \/q\/openapi (OpenAPI document at \/q\/openapi.json; port 8080 by default)", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--output", "description": "File to store the current message body (will override). This allows for manual inspecting the message later.", "javaType": "java.lang.String", "type": "string" }, { "names": "--package-scan-jars", "description": "Whether to automatic package scan JARs for custom Spring or Quarkus beans making them available for Camel CLI", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--port", "description": "Embeds a local HTTP server on this port (port 8080 by default; use 0 to dynamic assign a free random port number)", "javaType": "int", "type": "integer" }, { "names": "--pretty", "description": "Pretty print message body when using JSon or XML format", "javaType": "boolean", "type": "boolean" }, { "names": "--profile", "description": "Profile to run (dev, test, prod).", "defaultValue": "dev", "javaType": "java.lang.String", "type": "string" }, { "names": "--prompt", "description": "Allow user to type in required parameters in prompt if not present in application", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--prop,--property", "description": "Additional properties (override existing)", "javaType": "java.lang.String[]", "type": "array" }, { "names": "--properties", "description": "comma separated list of properties file (ex. \/path\/to\/file.properties,\/path\/to\/other.properties", "javaType": "java.lang.String", "type": "string" }, { "names": "--quarkus-artifact-id", "description": "Deprecated. This value is not used anymore. It is kept only for backwards compatibility and will be removed in Camel 5.x. Camel commands may use either 'quarkus-bom' or 'quarkus-camel-bom' artifactIds depending on the context.", "defaultValue": "quarkus-bom", "javaType": "java.lang.String", "type": "string", "deprecated": true }, { "names": "--quarkus-ext-registry", "description": "The base URI of Quarkus Extension Registry. The default is https:\/\/registry.quarkus.io unless camel.jbang.quarkus.platform.url system property is set (the \"\/client\/platforms\" suffix is removed if present).", "javaType": "java.lang.String", "type": "string" }, { "names": "--quarkus-group-id", "description": "groupId of Quarkus Platform BOM; honored only if --quarkus-version is set", "defaultValue": "io.quarkus.platform", "javaType": "java.lang.String", "type": "string" }, { "names": "--quarkus-version", "description": "version of Quarkus Platform BOM; the default value is looked up in Quarkus Extension Registry", "javaType": "java.lang.String", "type": "string" }, { "names": "--reload,--dev", "description": "Enables dev mode (live reload when source files are updated and saved)", "javaType": "boolean", "type": "boolean" }, { "names": "--remote-attach", "description": "Attaches debugger remotely to an existing running Camel integration. (Add camel-cli-debug JAR to the existing Camel application and run before attaching this debugger)", "javaType": "boolean", "type": "boolean" }, { "names": "--repo,--repos", "description": "Additional maven repositories for download on-demand (Use commas to separate multiple repositories)", "javaType": "java.lang.String", "type": "string" }, { "names": "--resource-dir,--resource-dirs", "description": "Additional resource directories to include on the classpath (recursive, preserving structure)", "javaType": "java.util.List", "type": "array" }, { "names": "--runtime", "description": "Runtime (jbang, camel-main, spring-boot, quarkus). The jbang runtime runs in-process in the Camel CLI JVM which is fast and intended for prototyping. The other runtimes export to a temporary project and run in a separate JVM via Maven, similar to a production deployment.", "defaultValue": "jbang", "javaType": "org.apache.camel.dsl.jbang.run.common.RuntimeType", "type": "object" }, { "names": "--show-body", "description": "Show message body in debug messages", "defaultValue": "true", "javaType": "boolean", "type": "boolean" }, { "names": "--show-exception", "description": "Show exception and stacktrace for failed messages", "defaultValue": "true", "javaType": "boolean", "type": "boolean" }, { "names": "--show-exchange-properties", "description": "Show exchange properties in debug messages", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--show-exchange-variables", "description": "Show exchange variables in debug messages", "defaultValue": "true", "javaType": "boolean", "type": "boolean" }, { "names": "--show-headers", "description": "Show message headers in debug messages", "defaultValue": "true", "javaType": "boolean", "type": "boolean" }, { "names": "--skip-plugins", "description": "Skip resolving plugin dependencies", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--source", "description": "Prefer to display source filename\/code instead of IDs", "javaType": "boolean", "type": "boolean" }, { "names": "--source-dir", "description": "Source directory for dynamically loading Camel file(s) to run. When using this, then files cannot be specified at the same time.", "javaType": "java.lang.String", "type": "string" }, { "names": "--spring-boot-version", "description": "Spring Boot version", "defaultValue": "4.1.2", "javaType": "java.lang.String", "type": "string" }, { "names": "--stop-on-exit", "description": "Whether to stop the running Camel on exit", "defaultValue": "true", "javaType": "boolean", "type": "boolean" }, { "names": "--stub", "description": "Stubs all the matching endpoint uri with the given component name or pattern. Multiple names can be separated by comma. (all = stub all endpoints, remote = stub only remote components).", "javaType": "java.lang.String", "type": "string" }, { "names": "--timestamp", "description": "Print timestamp.", "defaultValue": "true", "javaType": "boolean", "type": "boolean" }, { "names": "--trace", "description": "Enables trace logging of the routed messages", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--verbose", "description": "Verbose output of startup activity (dependency resolution and downloading", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "-h,--help", "description": "Display the help and sub-commands", "javaType": "boolean", "type": "boolean" } ] }, + { "name": "debug", "fullName": "debug", "description": "Debug local Camel integration", "sourceClass": "org.apache.camel.dsl.jbang.core.commands.Debug", "options": [ { "names": "--ago", "description": "Use ago instead of yyyy-MM-dd HH:mm:ss in timestamp.", "javaType": "boolean", "type": "boolean" }, { "names": "--background", "description": "Run in the background", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--background-wait", "description": "How long to wait for the integration in the background to start, before returning, in millis or as a duration such as 2m (true waits 60 seconds, false does not wait)", "defaultValue": "60s", "javaType": "long", "type": "integer" }, { "names": "--backlog-trace", "description": "Enables backlog tracing of the routed messages", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--breakpoint", "description": "To set breakpoint at the given node id (Multiple ids can be separated by comma). If no breakpoint is set, then the first route is automatic selected.", "javaType": "java.lang.String", "type": "string" }, { "names": "--camel-spring-boot-version", "description": "To run using a different Camel Spring Boot version than the default version.", "javaType": "java.lang.String", "type": "string" }, { "names": "--camel-version", "description": "To run using a different Camel version than the default version.", "javaType": "java.lang.String", "type": "string" }, { "names": "--chaos", "description": "Add camel-chaos, to turn on faults while running (camel cmd chaos-add); on with profile dev, never with prod. With a scenario file (such as --chaos=test\/chaos\/outage.chaos) its rules are added at startup. A run with chaos ends with exit code 1 when the chaos verdict is FAIL. With Quarkus it needs Camel Quarkus on Camel 4.24 or newer", "defaultValue": "false", "javaType": "boolean", "type": "boolean", "paramLabel": "" }, { "names": "--chaos-report", "description": "Write the chaos report as JSON to this file when the run ends (with --chaos)", "javaType": "java.lang.String", "type": "string", "paramLabel": "" }, { "names": "--code", "description": "Run the given text or file as Java DSL routes", "javaType": "java.lang.String", "type": "string" }, { "names": "--console", "description": "Developer console on the local HTTP server (port 8080 by default): \/q\/dev with the jbang and Camel Main runtimes, \/actuator\/camel with Spring Boot, and \/q\/camel\/dev-console with Quarkus", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--data-dir", "description": "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 (such as inbox,archive).", "javaType": "java.lang.String", "type": "string" }, { "names": "--dep,--dependency", "description": "Add additional dependencies", "javaType": "java.util.List", "type": "array" }, { "names": "--download", "description": "Whether to allow automatic downloading JAR dependencies (over the internet)", "defaultValue": "true", "javaType": "boolean", "type": "boolean" }, { "names": "--empty", "description": "Run an empty Camel without loading source files", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--example", "description": "Run an example by name (timer-log or route\/aggregator), list the groups when no name is given, or list one group by its name (route).", "javaType": "java.lang.String", "type": "string" }, { "names": "--exclude", "description": "Exclude files by name or pattern", "javaType": "java.util.List", "type": "array" }, { "names": "--fresh", "description": "Make sure we use fresh (i.e. non-cached) resources", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--gav", "description": "The Maven group:artifact:version (used during exporting)", "javaType": "java.lang.String", "type": "string" }, { "names": "--health", "description": "Deprecated: use --observe instead. Health check at \/q\/health on local HTTP server (port 8080 by default)", "defaultValue": "false", "javaType": "boolean", "type": "boolean", "deprecated": true }, { "names": "--ignore-loading-error", "description": "Whether to ignore route loading and compilation errors (use this with care!)", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--java-version,--java", "description": "Java version (21, 25)", "defaultValue": "21", "javaType": "java.lang.String", "type": "string" }, { "names": "--jfr", "description": "Enables Java Flight Recorder, saving a recording to .jfr on exit. Automatically adds JFR support for the runtime and turns on the Camel runtime instrumentation events (route, processor, exchange, etc.).", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--jfr-profile", "description": "Java Flight Recorder settings profile to use (such as default or profile). Implies --jfr.", "javaType": "java.lang.String", "type": "string" }, { "names": "--jvm-args", "description": "Additional JVM arguments (e.g. -Xmx256m -Xms128m)", "javaType": "java.lang.String", "type": "string" }, { "names": "--jvm-debug", "description": "To enable JVM remote debugging on port 4004 by default. The supported values are true to enable the remote debugging, false to disable the remote debugging or a number to use a custom port", "javaType": "int", "type": "integer", "paramLabel": "" }, { "names": "--kamelets-version", "description": "Apache Camel Kamelets version (auto-detected from classpath if not set)", "javaType": "java.lang.String", "type": "string" }, { "names": "--lazy-bean", "description": "Whether to use lazy bean initialization (can help with complex classloading issues)", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--local-kamelet-dir", "description": "Local directory (or github link) for loading Kamelets (takes precedence). Multiple directories can be specified separated by comma.", "javaType": "java.lang.String", "type": "string" }, { "names": "--log-lines", "description": "Number of log lines to display on top of screen", "defaultValue": "10", "javaType": "int", "type": "integer" }, { "names": "--logging", "description": "Can be used to turn off logging", "defaultValue": "true", "javaType": "boolean", "type": "boolean" }, { "names": "--logging-category", "description": "Used for individual logging levels (ex: org.apache.kafka=DEBUG)", "javaType": "java.util.List", "type": "array" }, { "names": "--logging-color", "description": "Use colored logging. Default is auto-detected based on NO_COLOR, CI, FORCE_COLOR environment variables and terminal capabilities", "javaType": "boolean", "type": "boolean" }, { "names": "--logging-config-path", "description": "Path to file with custom logging configuration", "javaType": "java.lang.String", "type": "string" }, { "names": "--logging-json", "description": "Use JSON logging (ECS Layout)", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--logging-level", "description": "Logging level (ERROR, WARN, INFO, DEBUG, TRACE)", "defaultValue": "info", "javaType": "java.lang.String", "type": "string" }, { "names": "--management-port", "description": "To use a dedicated port for HTTP management (use 0 to dynamic assign a free random port number)", "javaType": "int", "type": "integer" }, { "names": "--mask", "description": "Whether to mask endpoint URIs to avoid printing sensitive information such as password or access keys", "javaType": "boolean", "type": "boolean" }, { "names": "--maven-apache-snapshot-enabled", "description": "Whether downloading JARs from ASF Maven Snapshot repository is enabled", "defaultValue": "true", "javaType": "boolean", "type": "boolean" }, { "names": "--maven-central-enabled", "description": "Whether downloading JARs from Maven Central repository is enabled", "defaultValue": "true", "javaType": "boolean", "type": "boolean" }, { "names": "--maven-settings", "description": "Optional location of Maven settings.xml file to configure servers, repositories, mirrors and proxies. If set to \"false\", not even the default ~\/.m2\/settings.xml will be used.", "javaType": "java.lang.String", "type": "string" }, { "names": "--maven-settings-security", "description": "Optional location of Maven settings-security.xml file to decrypt settings.xml", "javaType": "java.lang.String", "type": "string" }, { "names": "--max-idle-seconds", "description": "For how long time in seconds Camel can be idle before stopping", "defaultValue": "0", "javaType": "int", "type": "integer" }, { "names": "--max-messages", "description": "Max number of messages to process before stopping", "defaultValue": "0", "javaType": "int", "type": "integer" }, { "names": "--max-seconds", "description": "Max seconds to run before stopping", "defaultValue": "0", "javaType": "int", "type": "integer" }, { "names": "--mcp", "description": "Embed dev\/diagnostics MCP tools on the local HTTP management server (\/mcp by default). When management shares the main HTTP port, MCP is served on the main server bind address. Also binds the management server to 127.0.0.1 (affecting health\/metrics when --observe is used).", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--mcp-stdio", "description": "Expose tagged ai-tool routes as MCP tools over process stdin\/stdout for IDE subprocess integration (no HTTP port). Requires --mcp-tags or camel.server.mcp-tags. Logging and startup summaries are routed to stderr so stdout carries MCP protocol only.", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--mcp-tags", "description": "Comma-separated ai-tool tags to expose on the ai-tool MCP server (maps to camel.server.mcp-tags). Use with --mcp-stdio or when camel.server.mcp-enabled is configured for HTTP transport. Not used by --mcp (dev\/diagnostics MCP).", "javaType": "java.lang.String", "type": "string" }, { "names": "--metrics", "description": "Deprecated: use --observe instead. Metrics (Micrometer and Prometheus) at \/q\/metrics on local HTTP server (port 8080 by default)", "defaultValue": "false", "javaType": "boolean", "type": "boolean", "deprecated": true }, { "names": "--modeline", "description": "Whether to support JBang style \/\/DEPS to specify additional dependencies", "defaultValue": "true", "javaType": "boolean", "type": "boolean" }, { "names": "--name", "description": "The name of the Camel application. By default the name of the directory when running a whole directory (--source-dir, or a directory), else the name of the first file", "defaultValue": "CamelJBang", "javaType": "java.lang.String", "type": "string" }, { "names": "--observe", "description": "Enable observability services (health, metrics, dev console, and lightweight Camel-only tracing in the TUI Spans tab)", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--open-api", "description": "Adds an OpenAPI spec from the given file (json or yaml file)", "javaType": "java.lang.String", "type": "string" }, { "names": "--open-telemetry-agent", "description": "Enable OpenTelemetry Java Agent for auto-instrumentation of third-party libraries (HTTP clients, JDBC, Kafka clients, gRPC, etc.). Traces are shown in the TUI Spans tab with Camel spans in cyan and 3rd-party agent spans in magenta.", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--open-telemetry-agent-export", "description": "Where to export OpenTelemetry Agent telemetry: tui (embedded receiver in TUI), otlp (external OTLP collector for traces), or observability (full stack with traces and logs). With otlp, start a trace backend first (e.g. 'camel infra run jaeger'). With observability, start the stack via 'camel infra run observability'. The value 'jaeger' is deprecated and works as an alias for 'otlp'.", "defaultValue": "tui", "javaType": "java.lang.String", "type": "string" }, { "names": "--openapi-ui", "description": "Swagger UI for REST OpenAPI at \/q\/openapi (OpenAPI document at \/q\/openapi.json; port 8080 by default)", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--output", "description": "File to store the current message body (will override). This allows for manual inspecting the message later.", "javaType": "java.lang.String", "type": "string" }, { "names": "--package-scan-jars", "description": "Whether to automatic package scan JARs for custom Spring or Quarkus beans making them available for Camel CLI", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--port", "description": "Embeds a local HTTP server on this port (port 8080 by default; use 0 to dynamic assign a free random port number)", "javaType": "int", "type": "integer" }, { "names": "--pretty", "description": "Pretty print message body when using JSon or XML format", "javaType": "boolean", "type": "boolean" }, { "names": "--profile", "description": "Profile to run (dev, test, prod).", "defaultValue": "dev", "javaType": "java.lang.String", "type": "string" }, { "names": "--prompt", "description": "Allow user to type in required parameters in prompt if not present in application", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--prop,--property", "description": "Additional properties (override existing)", "javaType": "java.lang.String[]", "type": "array" }, { "names": "--properties", "description": "comma separated list of properties file (ex. \/path\/to\/file.properties,\/path\/to\/other.properties", "javaType": "java.lang.String", "type": "string" }, { "names": "--quarkus-artifact-id", "description": "Deprecated. This value is not used anymore. It is kept only for backwards compatibility and will be removed in Camel 5.x. Camel commands may use either 'quarkus-bom' or 'quarkus-camel-bom' artifactIds depending on the context.", "defaultValue": "quarkus-bom", "javaType": "java.lang.String", "type": "string", "deprecated": true }, { "names": "--quarkus-ext-registry", "description": "The base URI of Quarkus Extension Registry. The default is https:\/\/registry.quarkus.io unless camel.jbang.quarkus.platform.url system property is set (the \"\/client\/platforms\" suffix is removed if present).", "javaType": "java.lang.String", "type": "string" }, { "names": "--quarkus-group-id", "description": "groupId of Quarkus Platform BOM; honored only if --quarkus-version is set", "defaultValue": "io.quarkus.platform", "javaType": "java.lang.String", "type": "string" }, { "names": "--quarkus-version", "description": "version of Quarkus Platform BOM; the default value is looked up in Quarkus Extension Registry", "javaType": "java.lang.String", "type": "string" }, { "names": "--reload,--dev", "description": "Enables dev mode (live reload when source files are updated and saved)", "javaType": "boolean", "type": "boolean" }, { "names": "--remote-attach", "description": "Attaches debugger remotely to an existing running Camel integration. (Add camel-cli-debug JAR to the existing Camel application and run before attaching this debugger)", "javaType": "boolean", "type": "boolean" }, { "names": "--repo,--repos", "description": "Additional maven repositories for download on-demand (Use commas to separate multiple repositories)", "javaType": "java.lang.String", "type": "string" }, { "names": "--resource-dir,--resource-dirs", "description": "Additional resource directories to include on the classpath (recursive, preserving structure)", "javaType": "java.util.List", "type": "array" }, { "names": "--runtime", "description": "Runtime (jbang, camel-main, spring-boot, quarkus). The jbang runtime runs in-process in the Camel CLI JVM which is fast and intended for prototyping. The other runtimes export to a temporary project and run in a separate JVM via Maven, similar to a production deployment.", "defaultValue": "jbang", "javaType": "org.apache.camel.dsl.jbang.run.common.RuntimeType", "type": "object" }, { "names": "--show-body", "description": "Show message body in debug messages", "defaultValue": "true", "javaType": "boolean", "type": "boolean" }, { "names": "--show-exception", "description": "Show exception and stacktrace for failed messages", "defaultValue": "true", "javaType": "boolean", "type": "boolean" }, { "names": "--show-exchange-properties", "description": "Show exchange properties in debug messages", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--show-exchange-variables", "description": "Show exchange variables in debug messages", "defaultValue": "true", "javaType": "boolean", "type": "boolean" }, { "names": "--show-headers", "description": "Show message headers in debug messages", "defaultValue": "true", "javaType": "boolean", "type": "boolean" }, { "names": "--skip-plugins", "description": "Skip resolving plugin dependencies", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--source", "description": "Prefer to display source filename\/code instead of IDs", "javaType": "boolean", "type": "boolean" }, { "names": "--source-dir", "description": "Source directory for dynamically loading Camel file(s) to run. When using this, then files cannot be specified at the same time.", "javaType": "java.lang.String", "type": "string" }, { "names": "--spring-boot-version", "description": "Spring Boot version", "defaultValue": "4.1.2", "javaType": "java.lang.String", "type": "string" }, { "names": "--stop-on-exit", "description": "Whether to stop the running Camel on exit", "defaultValue": "true", "javaType": "boolean", "type": "boolean" }, { "names": "--stub", "description": "Stubs all the matching endpoint uri with the given component name or pattern. Multiple names can be separated by comma. (all = stub all endpoints, remote = stub only remote components).", "javaType": "java.lang.String", "type": "string" }, { "names": "--timestamp", "description": "Print timestamp.", "defaultValue": "true", "javaType": "boolean", "type": "boolean" }, { "names": "--trace", "description": "Enables trace logging of the routed messages", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--verbose", "description": "Verbose output of startup activity (dependency resolution and downloading", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "-h,--help", "description": "Display the help and sub-commands", "javaType": "boolean", "type": "boolean" } ] }, { "name": "dependency", "fullName": "dependency", "description": "Displays all Camel dependencies required to run", "sourceClass": "org.apache.camel.dsl.jbang.core.commands.DependencyCommand", "options": [ { "names": "-h,--help", "description": "Display the help and sub-commands", "javaType": "boolean", "type": "boolean" } ], "subcommands": [ { "name": "copy", "fullName": "dependency copy", "description": "Copies all Camel dependencies required to run to a specific directory", "sourceClass": "org.apache.camel.dsl.jbang.core.commands.DependencyCopy", "options": [ { "names": "--build-property", "description": "Maven build properties, ex. --build-property=prop1=foo", "javaType": "java.util.List", "type": "array" }, { "names": "--camel-spring-boot-version", "description": "Camel version to use with Spring Boot", "javaType": "java.lang.String", "type": "string" }, { "names": "--camel-version", "description": "To export using a different Camel version than the default version.", "javaType": "java.lang.String", "type": "string" }, { "names": "--camel-wrapper", "description": "Include Camel Wrapper scripts in exported project for version pinning", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--clean-dir", "description": "If exporting to current directory (default) then all existing files are preserved. Enabling this option will force cleaning current directory including all sub dirs (use this with care)", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--console", "description": "Developer console on the local HTTP server (port 8080 by default): \/q\/dev with Camel Main, \/actuator\/camel with Spring Boot, and \/q\/camel\/dev-console with Quarkus. The exported project only has the console with the dev profile.", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--dep,--dependency", "description": "Add additional dependencies", "javaType": "java.util.List", "type": "array" }, { "names": "--dir,--directory", "description": "Directory where the project will be exported", "defaultValue": ".", "javaType": "java.lang.String", "type": "string" }, { "names": "--docker", "description": "Include Docker files in exported project", "defaultValue": "true", "javaType": "boolean", "type": "boolean" }, { "names": "--download", "description": "Whether to allow automatic downloading JAR dependencies (over the internet)", "defaultValue": "true", "javaType": "boolean", "type": "boolean" }, { "names": "--dry-run", "description": "Preview export without writing files", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--exclude", "description": "Exclude files by name or pattern", "javaType": "java.util.List", "type": "array" }, { "names": "--fresh", "description": "Make sure we use fresh (i.e. non-cached) resources", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--gav", "description": "The Maven group:artifact:version", "javaType": "java.lang.String", "type": "string" }, { "names": "--groovy-pre-compiled", "description": "Whether to include pre-compiled Groovy classes in the export (only supported with runtime=camel-main)", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--hawtio", "description": "Whether to include Hawtio web console (only available for exporting to Spring Boot or Quarkus)", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--hawtio-version", "description": "Version of the Hawtio web console", "defaultValue": "5.3.0", "javaType": "java.lang.String", "type": "string" }, { "names": "--ignore-loading-error", "description": "Whether to ignore route loading and compilation errors (use this with care!)", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--java-version,--java", "description": "Java version (21, 25)", "defaultValue": "21", "javaType": "java.lang.String", "type": "string" }, { "names": "--kamelets-version", "description": "Apache Camel Kamelets version (auto-detected from classpath if not set)", "javaType": "java.lang.String", "type": "string" }, { "names": "--lazy-bean", "description": "Whether to use lazy bean initialization (can help with complex classloading issues", "defaultValue": "true", "javaType": "boolean", "type": "boolean" }, { "names": "--local-kamelet-dir", "description": "Local directory for loading Kamelets (takes precedence)", "javaType": "java.lang.String", "type": "string" }, { "names": "--logging", "description": "Can be used to turn on logging to console (logs by default to file in \/.camel directory)", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--logging-level", "description": "Logging level (ERROR, WARN, INFO, DEBUG, TRACE)", "defaultValue": "info", "javaType": "java.lang.String", "type": "string" }, { "names": "--main-classname", "description": "The class name of the Camel Main application class", "defaultValue": "CamelApplication", "javaType": "java.lang.String", "type": "string" }, { "names": "--management-port", "description": "To use a dedicated port for HTTP management", "javaType": "int", "type": "integer" }, { "names": "--maven-apache-snapshot-enabled", "description": "Whether downloading JARs from ASF Maven Snapshot repository is enabled", "defaultValue": "true", "javaType": "boolean", "type": "boolean" }, { "names": "--maven-central-enabled", "description": "Whether downloading JARs from Maven Central repository is enabled", "defaultValue": "true", "javaType": "boolean", "type": "boolean" }, { "names": "--maven-settings", "description": "Optional location of Maven settings.xml file to configure servers, repositories, mirrors and proxies. If set to \"false\", not even the default ~\/.m2\/settings.xml will be used.", "javaType": "java.lang.String", "type": "string" }, { "names": "--maven-settings-security", "description": "Optional location of Maven settings-security.xml file to decrypt settings.xml", "javaType": "java.lang.String", "type": "string" }, { "names": "--maven-wrapper", "description": "Include Maven Wrapper files in exported project", "defaultValue": "true", "javaType": "boolean", "type": "boolean" }, { "names": "--name", "description": "The integration name. Use this when the name should not get derived otherwise.", "javaType": "java.lang.String", "type": "string" }, { "names": "--observe", "description": "Enable observability services", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--open-api", "description": "Adds an OpenAPI spec from the given file (json or yaml file)", "javaType": "java.lang.String", "type": "string" }, { "names": "--output", "description": "Output format (gav, maven, jbang)", "defaultValue": "gav", "javaType": "java.lang.String", "type": "string" }, { "names": "--output-directory", "description": "Directory where dependencies should be copied", "defaultValue": "lib", "javaType": "java.lang.String", "type": "string" }, { "names": "--package-name", "description": "For Java source files should they have the given package name. By default the package name is computed from the Maven GAV. Use false to turn off and not include package name in the Java source files.", "javaType": "java.lang.String", "type": "string" }, { "names": "--package-scan-jars", "description": "Whether to automatic package scan JARs for custom Spring or Quarkus beans making them available for Camel CLI", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--parent-pom", "description": "The Maven parent POM group:artifact:version", "javaType": "java.lang.String", "type": "string" }, { "names": "--port", "description": "Embeds a local HTTP server on this port", "javaType": "int", "type": "integer" }, { "names": "--profile", "description": "Profile to export (dev, test, prod).", "javaType": "java.lang.String", "type": "string" }, { "names": "--prop,--property", "description": "Camel application properties, ex. --property=prop1=foo", "javaType": "java.lang.String[]", "type": "array" }, { "names": "--quarkus-artifact-id", "description": "Deprecated. This value is not used anymore. It is kept only for backwards compatibility and will be removed in Camel 5.x. Camel commands may use either 'quarkus-bom' or 'quarkus-camel-bom' artifactIds depending on the context.", "defaultValue": "quarkus-bom", "javaType": "java.lang.String", "type": "string", "deprecated": true }, { "names": "--quarkus-ext-registry", "description": "The base URI of Quarkus Extension Registry. The default is https:\/\/registry.quarkus.io unless camel.jbang.quarkus.platform.url system property is set (the \"\/client\/platforms\" suffix is removed if present).", "javaType": "java.lang.String", "type": "string" }, { "names": "--quarkus-group-id", "description": "groupId of Quarkus Platform BOM; honored only if --quarkus-version is set", "defaultValue": "io.quarkus.platform", "javaType": "java.lang.String", "type": "string" }, { "names": "--quarkus-version", "description": "version of Quarkus Platform BOM; the default value is looked up in Quarkus Extension Registry", "javaType": "java.lang.String", "type": "string" }, { "names": "--quiet", "description": "Will be quiet, only print when error occurs", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--repo,--repos", "description": "Additional maven repositories for download on-demand (Use commas to separate multiple repositories)", "javaType": "java.lang.String", "type": "string" }, { "names": "--resource-dir,--resource-dirs", "description": "Additional resource directories to include in src\/main\/resources (recursive, preserving structure)", "javaType": "java.util.List", "type": "array" }, { "names": "--runtime", "description": "Runtime (camel-main, spring-boot, quarkus)", "javaType": "org.apache.camel.dsl.jbang.run.common.RuntimeType", "type": "object" }, { "names": "--skip-plugins", "description": "Skip plugins during export", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--spring-boot-version", "description": "Spring Boot version", "defaultValue": "4.1.2", "javaType": "java.lang.String", "type": "string" }, { "names": "--verbose", "description": "Verbose output of startup activity (dependency resolution and downloading", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--yes,-y", "description": "Automatically answer yes to confirmation prompts (e.g. when using --clean-dir)", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "-h,--help", "description": "Display the help and sub-commands", "javaType": "boolean", "type": "boolean" } ] }, { "name": "list", "fullName": "dependency list", "description": "Displays all Camel dependencies required to run", "sourceClass": "org.apache.camel.dsl.jbang.core.commands.DependencyList", "options": [ { "names": "--build-property", "description": "Maven build properties, ex. --build-property=prop1=foo", "javaType": "java.util.List", "type": "array" }, { "names": "--camel-spring-boot-version", "description": "Camel version to use with Spring Boot", "javaType": "java.lang.String", "type": "string" }, { "names": "--camel-version", "description": "To export using a different Camel version than the default version.", "javaType": "java.lang.String", "type": "string" }, { "names": "--camel-wrapper", "description": "Include Camel Wrapper scripts in exported project for version pinning", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--clean-dir", "description": "If exporting to current directory (default) then all existing files are preserved. Enabling this option will force cleaning current directory including all sub dirs (use this with care)", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--console", "description": "Developer console on the local HTTP server (port 8080 by default): \/q\/dev with Camel Main, \/actuator\/camel with Spring Boot, and \/q\/camel\/dev-console with Quarkus. The exported project only has the console with the dev profile.", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--dep,--dependency", "description": "Add additional dependencies", "javaType": "java.util.List", "type": "array" }, { "names": "--dir,--directory", "description": "Directory where the project will be exported", "defaultValue": ".", "javaType": "java.lang.String", "type": "string" }, { "names": "--docker", "description": "Include Docker files in exported project", "defaultValue": "true", "javaType": "boolean", "type": "boolean" }, { "names": "--download", "description": "Whether to allow automatic downloading JAR dependencies (over the internet)", "defaultValue": "true", "javaType": "boolean", "type": "boolean" }, { "names": "--dry-run", "description": "Preview export without writing files", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--exclude", "description": "Exclude files by name or pattern", "javaType": "java.util.List", "type": "array" }, { "names": "--fresh", "description": "Make sure we use fresh (i.e. non-cached) resources", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--gav", "description": "The Maven group:artifact:version", "javaType": "java.lang.String", "type": "string" }, { "names": "--groovy-pre-compiled", "description": "Whether to include pre-compiled Groovy classes in the export (only supported with runtime=camel-main)", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--hawtio", "description": "Whether to include Hawtio web console (only available for exporting to Spring Boot or Quarkus)", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--hawtio-version", "description": "Version of the Hawtio web console", "defaultValue": "5.3.0", "javaType": "java.lang.String", "type": "string" }, { "names": "--ignore-loading-error", "description": "Whether to ignore route loading and compilation errors (use this with care!)", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--java-version,--java", "description": "Java version (21, 25)", "defaultValue": "21", "javaType": "java.lang.String", "type": "string" }, { "names": "--kamelets-version", "description": "Apache Camel Kamelets version (auto-detected from classpath if not set)", "javaType": "java.lang.String", "type": "string" }, { "names": "--lazy-bean", "description": "Whether to use lazy bean initialization (can help with complex classloading issues", "defaultValue": "true", "javaType": "boolean", "type": "boolean" }, { "names": "--local-kamelet-dir", "description": "Local directory for loading Kamelets (takes precedence)", "javaType": "java.lang.String", "type": "string" }, { "names": "--logging", "description": "Can be used to turn on logging to console (logs by default to file in \/.camel directory)", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--logging-level", "description": "Logging level (ERROR, WARN, INFO, DEBUG, TRACE)", "defaultValue": "info", "javaType": "java.lang.String", "type": "string" }, { "names": "--main-classname", "description": "The class name of the Camel Main application class", "defaultValue": "CamelApplication", "javaType": "java.lang.String", "type": "string" }, { "names": "--management-port", "description": "To use a dedicated port for HTTP management", "javaType": "int", "type": "integer" }, { "names": "--maven-apache-snapshot-enabled", "description": "Whether downloading JARs from ASF Maven Snapshot repository is enabled", "defaultValue": "true", "javaType": "boolean", "type": "boolean" }, { "names": "--maven-central-enabled", "description": "Whether downloading JARs from Maven Central repository is enabled", "defaultValue": "true", "javaType": "boolean", "type": "boolean" }, { "names": "--maven-settings", "description": "Optional location of Maven settings.xml file to configure servers, repositories, mirrors and proxies. If set to \"false\", not even the default ~\/.m2\/settings.xml will be used.", "javaType": "java.lang.String", "type": "string" }, { "names": "--maven-settings-security", "description": "Optional location of Maven settings-security.xml file to decrypt settings.xml", "javaType": "java.lang.String", "type": "string" }, { "names": "--maven-wrapper", "description": "Include Maven Wrapper files in exported project", "defaultValue": "true", "javaType": "boolean", "type": "boolean" }, { "names": "--name", "description": "The integration name. Use this when the name should not get derived otherwise.", "javaType": "java.lang.String", "type": "string" }, { "names": "--observe", "description": "Enable observability services", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--open-api", "description": "Adds an OpenAPI spec from the given file (json or yaml file)", "javaType": "java.lang.String", "type": "string" }, { "names": "--output", "description": "Output format (gav, maven, jbang)", "defaultValue": "gav", "javaType": "java.lang.String", "type": "string" }, { "names": "--package-name", "description": "For Java source files should they have the given package name. By default the package name is computed from the Maven GAV. Use false to turn off and not include package name in the Java source files.", "javaType": "java.lang.String", "type": "string" }, { "names": "--package-scan-jars", "description": "Whether to automatic package scan JARs for custom Spring or Quarkus beans making them available for Camel CLI", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--parent-pom", "description": "The Maven parent POM group:artifact:version", "javaType": "java.lang.String", "type": "string" }, { "names": "--port", "description": "Embeds a local HTTP server on this port", "javaType": "int", "type": "integer" }, { "names": "--profile", "description": "Profile to export (dev, test, prod).", "javaType": "java.lang.String", "type": "string" }, { "names": "--prop,--property", "description": "Camel application properties, ex. --property=prop1=foo", "javaType": "java.lang.String[]", "type": "array" }, { "names": "--quarkus-artifact-id", "description": "Deprecated. This value is not used anymore. It is kept only for backwards compatibility and will be removed in Camel 5.x. Camel commands may use either 'quarkus-bom' or 'quarkus-camel-bom' artifactIds depending on the context.", "defaultValue": "quarkus-bom", "javaType": "java.lang.String", "type": "string", "deprecated": true }, { "names": "--quarkus-ext-registry", "description": "The base URI of Quarkus Extension Registry. The default is https:\/\/registry.quarkus.io unless camel.jbang.quarkus.platform.url system property is set (the \"\/client\/platforms\" suffix is removed if present).", "javaType": "java.lang.String", "type": "string" }, { "names": "--quarkus-group-id", "description": "groupId of Quarkus Platform BOM; honored only if --quarkus-version is set", "defaultValue": "io.quarkus.platform", "javaType": "java.lang.String", "type": "string" }, { "names": "--quarkus-version", "description": "version of Quarkus Platform BOM; the default value is looked up in Quarkus Extension Registry", "javaType": "java.lang.String", "type": "string" }, { "names": "--quiet", "description": "Will be quiet, only print when error occurs", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--repo,--repos", "description": "Additional maven repositories for download on-demand (Use commas to separate multiple repositories)", "javaType": "java.lang.String", "type": "string" }, { "names": "--resource-dir,--resource-dirs", "description": "Additional resource directories to include in src\/main\/resources (recursive, preserving structure)", "javaType": "java.util.List", "type": "array" }, { "names": "--runtime", "description": "Runtime (camel-main, spring-boot, quarkus)", "javaType": "org.apache.camel.dsl.jbang.run.common.RuntimeType", "type": "object" }, { "names": "--skip-plugins", "description": "Skip plugins during export", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--spring-boot-version", "description": "Spring Boot version", "defaultValue": "4.1.2", "javaType": "java.lang.String", "type": "string" }, { "names": "--verbose", "description": "Verbose output of startup activity (dependency resolution and downloading", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--yes,-y", "description": "Automatically answer yes to confirmation prompts (e.g. when using --clean-dir)", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "-h,--help", "description": "Display the help and sub-commands", "javaType": "boolean", "type": "boolean" } ] }, { "name": "runtime", "fullName": "dependency runtime", "description": "Display Camel runtime and version for given Maven project", "sourceClass": "org.apache.camel.dsl.jbang.core.commands.DependencyRuntime", "options": [ { "names": "--download", "description": "Whether to allow automatic downloading JAR dependencies (over the internet)", "defaultValue": "true", "javaType": "boolean", "type": "boolean" }, { "names": "--fresh", "description": "Make sure we use fresh (i.e. non-cached) resources", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--json", "description": "Output in JSON Format", "javaType": "boolean", "type": "boolean" }, { "names": "--repo,--repos", "description": "Additional maven repositories for download on-demand (Use commas to separate multiple repositories)", "javaType": "java.lang.String", "type": "string" }, { "names": "-h,--help", "description": "Display the help and sub-commands", "javaType": "boolean", "type": "boolean" } ] }, { "name": "update", "fullName": "dependency update", "description": "Updates dependencies in Maven pom.xml or Java source files (JBang style)", "sourceClass": "org.apache.camel.dsl.jbang.core.commands.DependencyUpdate", "options": [ { "names": "--build-property", "description": "Maven build properties, ex. --build-property=prop1=foo", "javaType": "java.util.List", "type": "array" }, { "names": "--camel-spring-boot-version", "description": "Camel version to use with Spring Boot", "javaType": "java.lang.String", "type": "string" }, { "names": "--camel-version", "description": "To export using a different Camel version than the default version.", "javaType": "java.lang.String", "type": "string" }, { "names": "--camel-wrapper", "description": "Include Camel Wrapper scripts in exported project for version pinning", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--clean", "description": "Regenerate list of dependencies (do not keep existing dependencies). Not supported for pom.xml", "javaType": "boolean", "type": "boolean" }, { "names": "--clean-dir", "description": "If exporting to current directory (default) then all existing files are preserved. Enabling this option will force cleaning current directory including all sub dirs (use this with care)", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--console", "description": "Developer console on the local HTTP server (port 8080 by default): \/q\/dev with Camel Main, \/actuator\/camel with Spring Boot, and \/q\/camel\/dev-console with Quarkus. The exported project only has the console with the dev profile.", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--dep,--dependency", "description": "Add additional dependencies", "javaType": "java.util.List", "type": "array" }, { "names": "--dir,--directory", "description": "Directory where the project will be exported", "defaultValue": ".", "javaType": "java.lang.String", "type": "string" }, { "names": "--docker", "description": "Include Docker files in exported project", "defaultValue": "true", "javaType": "boolean", "type": "boolean" }, { "names": "--download", "description": "Whether to allow automatic downloading JAR dependencies (over the internet)", "defaultValue": "true", "javaType": "boolean", "type": "boolean" }, { "names": "--dry-run", "description": "Preview export without writing files", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--exclude", "description": "Exclude files by name or pattern", "javaType": "java.util.List", "type": "array" }, { "names": "--fresh", "description": "Make sure we use fresh (i.e. non-cached) resources", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--gav", "description": "The Maven group:artifact:version", "javaType": "java.lang.String", "type": "string" }, { "names": "--groovy-pre-compiled", "description": "Whether to include pre-compiled Groovy classes in the export (only supported with runtime=camel-main)", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--hawtio", "description": "Whether to include Hawtio web console (only available for exporting to Spring Boot or Quarkus)", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--hawtio-version", "description": "Version of the Hawtio web console", "defaultValue": "5.3.0", "javaType": "java.lang.String", "type": "string" }, { "names": "--ignore-loading-error", "description": "Whether to ignore route loading and compilation errors (use this with care!)", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--java-version,--java", "description": "Java version (21, 25)", "defaultValue": "21", "javaType": "java.lang.String", "type": "string" }, { "names": "--kamelets-version", "description": "Apache Camel Kamelets version (auto-detected from classpath if not set)", "javaType": "java.lang.String", "type": "string" }, { "names": "--lazy-bean", "description": "Whether to use lazy bean initialization (can help with complex classloading issues", "defaultValue": "true", "javaType": "boolean", "type": "boolean" }, { "names": "--local-kamelet-dir", "description": "Local directory for loading Kamelets (takes precedence)", "javaType": "java.lang.String", "type": "string" }, { "names": "--logging", "description": "Can be used to turn on logging to console (logs by default to file in \/.camel directory)", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--logging-level", "description": "Logging level (ERROR, WARN, INFO, DEBUG, TRACE)", "defaultValue": "info", "javaType": "java.lang.String", "type": "string" }, { "names": "--main-classname", "description": "The class name of the Camel Main application class", "defaultValue": "CamelApplication", "javaType": "java.lang.String", "type": "string" }, { "names": "--management-port", "description": "To use a dedicated port for HTTP management", "javaType": "int", "type": "integer" }, { "names": "--maven-apache-snapshot-enabled", "description": "Whether downloading JARs from ASF Maven Snapshot repository is enabled", "defaultValue": "true", "javaType": "boolean", "type": "boolean" }, { "names": "--maven-central-enabled", "description": "Whether downloading JARs from Maven Central repository is enabled", "defaultValue": "true", "javaType": "boolean", "type": "boolean" }, { "names": "--maven-settings", "description": "Optional location of Maven settings.xml file to configure servers, repositories, mirrors and proxies. If set to \"false\", not even the default ~\/.m2\/settings.xml will be used.", "javaType": "java.lang.String", "type": "string" }, { "names": "--maven-settings-security", "description": "Optional location of Maven settings-security.xml file to decrypt settings.xml", "javaType": "java.lang.String", "type": "string" }, { "names": "--maven-wrapper", "description": "Include Maven Wrapper files in exported project", "defaultValue": "true", "javaType": "boolean", "type": "boolean" }, { "names": "--name", "description": "The integration name. Use this when the name should not get derived otherwise.", "javaType": "java.lang.String", "type": "string" }, { "names": "--observe", "description": "Enable observability services", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--open-api", "description": "Adds an OpenAPI spec from the given file (json or yaml file)", "javaType": "java.lang.String", "type": "string" }, { "names": "--output", "description": "Output format (gav, maven, jbang)", "defaultValue": "gav", "javaType": "java.lang.String", "type": "string" }, { "names": "--package-name", "description": "For Java source files should they have the given package name. By default the package name is computed from the Maven GAV. Use false to turn off and not include package name in the Java source files.", "javaType": "java.lang.String", "type": "string" }, { "names": "--package-scan-jars", "description": "Whether to automatic package scan JARs for custom Spring or Quarkus beans making them available for Camel CLI", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--parent-pom", "description": "The Maven parent POM group:artifact:version", "javaType": "java.lang.String", "type": "string" }, { "names": "--port", "description": "Embeds a local HTTP server on this port", "javaType": "int", "type": "integer" }, { "names": "--profile", "description": "Profile to export (dev, test, prod).", "javaType": "java.lang.String", "type": "string" }, { "names": "--prop,--property", "description": "Camel application properties, ex. --property=prop1=foo", "javaType": "java.lang.String[]", "type": "array" }, { "names": "--quarkus-artifact-id", "description": "Deprecated. This value is not used anymore. It is kept only for backwards compatibility and will be removed in Camel 5.x. Camel commands may use either 'quarkus-bom' or 'quarkus-camel-bom' artifactIds depending on the context.", "defaultValue": "quarkus-bom", "javaType": "java.lang.String", "type": "string", "deprecated": true }, { "names": "--quarkus-ext-registry", "description": "The base URI of Quarkus Extension Registry. The default is https:\/\/registry.quarkus.io unless camel.jbang.quarkus.platform.url system property is set (the \"\/client\/platforms\" suffix is removed if present).", "javaType": "java.lang.String", "type": "string" }, { "names": "--quarkus-group-id", "description": "groupId of Quarkus Platform BOM; honored only if --quarkus-version is set", "defaultValue": "io.quarkus.platform", "javaType": "java.lang.String", "type": "string" }, { "names": "--quarkus-version", "description": "version of Quarkus Platform BOM; the default value is looked up in Quarkus Extension Registry", "javaType": "java.lang.String", "type": "string" }, { "names": "--quiet", "description": "Will be quiet, only print when error occurs", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--repo,--repos", "description": "Additional maven repositories for download on-demand (Use commas to separate multiple repositories)", "javaType": "java.lang.String", "type": "string" }, { "names": "--resource-dir,--resource-dirs", "description": "Additional resource directories to include in src\/main\/resources (recursive, preserving structure)", "javaType": "java.util.List", "type": "array" }, { "names": "--runtime", "description": "Runtime (camel-main, spring-boot, quarkus)", "javaType": "org.apache.camel.dsl.jbang.run.common.RuntimeType", "type": "object" }, { "names": "--scan-routes", "description": "Sync dependencies from route definitions. Only manages org.apache.camel dependencies, preserving non-Camel dependencies. Removes unused Camel dependencies.", "javaType": "boolean", "type": "boolean" }, { "names": "--skip-plugins", "description": "Skip plugins during export", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--spring-boot-version", "description": "Spring Boot version", "defaultValue": "4.1.2", "javaType": "java.lang.String", "type": "string" }, { "names": "--verbose", "description": "Verbose output of startup activity (dependency resolution and downloading", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--yes,-y", "description": "Automatically answer yes to confirmation prompts (e.g. when using --clean-dir)", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "-h,--help", "description": "Display the help and sub-commands", "javaType": "boolean", "type": "boolean" } ] } ] }, - { "name": "dev", "fullName": "dev", "description": "Run in dev mode with live reload", "sourceClass": "org.apache.camel.dsl.jbang.core.commands.Dev", "options": [ { "names": "--background", "description": "Run in the background", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--background-wait", "description": "How long to wait for the integration in the background to start, before returning, in millis or as a duration such as 2m (true waits 60 seconds, false does not wait)", "defaultValue": "60s", "javaType": "long", "type": "integer" }, { "names": "--backlog-trace", "description": "Enables backlog tracing of the routed messages", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--camel-spring-boot-version", "description": "To run using a different Camel Spring Boot version than the default version.", "javaType": "java.lang.String", "type": "string" }, { "names": "--camel-version", "description": "To run using a different Camel version than the default version.", "javaType": "java.lang.String", "type": "string" }, { "names": "--chaos", "description": "Add camel-chaos, to turn on faults while running (camel cmd chaos-add); on with profile dev, never with prod. With a scenario file (such as --chaos=chaos\/outage.chaos) its rules are added at startup. A run with chaos ends with exit code 1 when the chaos verdict is FAIL. With Quarkus it needs Camel Quarkus on Camel 4.24 or newer", "defaultValue": "false", "javaType": "boolean", "type": "boolean", "paramLabel": "" }, { "names": "--chaos-report", "description": "Write the chaos report as JSON to this file when the run ends (with --chaos)", "javaType": "java.lang.String", "type": "string", "paramLabel": "" }, { "names": "--code", "description": "Run the given text or file as Java DSL routes", "javaType": "java.lang.String", "type": "string" }, { "names": "--console", "description": "Developer console on the local HTTP server (port 8080 by default): \/q\/dev with the jbang and Camel Main runtimes, \/actuator\/camel with Spring Boot, and \/q\/camel\/dev-console with Quarkus", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--data-dir", "description": "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 (such as inbox,archive).", "javaType": "java.lang.String", "type": "string" }, { "names": "--dep,--dependency", "description": "Add additional dependencies", "javaType": "java.util.List", "type": "array" }, { "names": "--download", "description": "Whether to allow automatic downloading JAR dependencies (over the internet)", "defaultValue": "true", "javaType": "boolean", "type": "boolean" }, { "names": "--empty", "description": "Run an empty Camel without loading source files", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--example", "description": "Run an example by name (timer-log or route\/aggregator), list the groups when no name is given, or list one group by its name (route).", "javaType": "java.lang.String", "type": "string" }, { "names": "--exclude", "description": "Exclude files by name or pattern", "javaType": "java.util.List", "type": "array" }, { "names": "--fresh", "description": "Make sure we use fresh (i.e. non-cached) resources", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--gav", "description": "The Maven group:artifact:version (used during exporting)", "javaType": "java.lang.String", "type": "string" }, { "names": "--health", "description": "Deprecated: use --observe instead. Health check at \/q\/health on local HTTP server (port 8080 by default)", "defaultValue": "false", "javaType": "boolean", "type": "boolean", "deprecated": true }, { "names": "--ignore-loading-error", "description": "Whether to ignore route loading and compilation errors (use this with care!)", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--java-version,--java", "description": "Java version (21, 25)", "defaultValue": "21", "javaType": "java.lang.String", "type": "string" }, { "names": "--jfr", "description": "Enables Java Flight Recorder, saving a recording to .jfr on exit. Automatically adds JFR support for the runtime and turns on the Camel runtime instrumentation events (route, processor, exchange, etc.).", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--jfr-profile", "description": "Java Flight Recorder settings profile to use (such as default or profile). Implies --jfr.", "javaType": "java.lang.String", "type": "string" }, { "names": "--jvm-args", "description": "Additional JVM arguments (e.g. -Xmx256m -Xms128m)", "javaType": "java.lang.String", "type": "string" }, { "names": "--jvm-debug", "description": "To enable JVM remote debugging on port 4004 by default. The supported values are true to enable the remote debugging, false to disable the remote debugging or a number to use a custom port", "javaType": "int", "type": "integer", "paramLabel": "" }, { "names": "--kamelets-version", "description": "Apache Camel Kamelets version (auto-detected from classpath if not set)", "javaType": "java.lang.String", "type": "string" }, { "names": "--lazy-bean", "description": "Whether to use lazy bean initialization (can help with complex classloading issues)", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--local-kamelet-dir", "description": "Local directory (or github link) for loading Kamelets (takes precedence). Multiple directories can be specified separated by comma.", "javaType": "java.lang.String", "type": "string" }, { "names": "--logging", "description": "Can be used to turn off logging", "defaultValue": "true", "javaType": "boolean", "type": "boolean" }, { "names": "--logging-category", "description": "Used for individual logging levels (ex: org.apache.kafka=DEBUG)", "javaType": "java.util.List", "type": "array" }, { "names": "--logging-color", "description": "Use colored logging. Default is auto-detected based on NO_COLOR, CI, FORCE_COLOR environment variables and terminal capabilities", "javaType": "boolean", "type": "boolean" }, { "names": "--logging-config-path", "description": "Path to file with custom logging configuration", "javaType": "java.lang.String", "type": "string" }, { "names": "--logging-json", "description": "Use JSON logging (ECS Layout)", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--logging-level", "description": "Logging level (ERROR, WARN, INFO, DEBUG, TRACE)", "defaultValue": "info", "javaType": "java.lang.String", "type": "string" }, { "names": "--management-port", "description": "To use a dedicated port for HTTP management (use 0 to dynamic assign a free random port number)", "javaType": "int", "type": "integer" }, { "names": "--maven-apache-snapshot-enabled", "description": "Whether downloading JARs from ASF Maven Snapshot repository is enabled", "defaultValue": "true", "javaType": "boolean", "type": "boolean" }, { "names": "--maven-central-enabled", "description": "Whether downloading JARs from Maven Central repository is enabled", "defaultValue": "true", "javaType": "boolean", "type": "boolean" }, { "names": "--maven-settings", "description": "Optional location of Maven settings.xml file to configure servers, repositories, mirrors and proxies. If set to \"false\", not even the default ~\/.m2\/settings.xml will be used.", "javaType": "java.lang.String", "type": "string" }, { "names": "--maven-settings-security", "description": "Optional location of Maven settings-security.xml file to decrypt settings.xml", "javaType": "java.lang.String", "type": "string" }, { "names": "--max-idle-seconds", "description": "For how long time in seconds Camel can be idle before stopping", "defaultValue": "0", "javaType": "int", "type": "integer" }, { "names": "--max-messages", "description": "Max number of messages to process before stopping", "defaultValue": "0", "javaType": "int", "type": "integer" }, { "names": "--max-seconds", "description": "Max seconds to run before stopping", "defaultValue": "0", "javaType": "int", "type": "integer" }, { "names": "--mcp", "description": "Embed dev\/diagnostics MCP tools on the local HTTP management server (\/mcp by default). When management shares the main HTTP port, MCP is served on the main server bind address. Also binds the management server to 127.0.0.1 (affecting health\/metrics when --observe is used).", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--mcp-stdio", "description": "Expose tagged ai-tool routes as MCP tools over process stdin\/stdout for IDE subprocess integration (no HTTP port). Requires --mcp-tags or camel.server.mcp-tags. Logging and startup summaries are routed to stderr so stdout carries MCP protocol only.", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--mcp-tags", "description": "Comma-separated ai-tool tags to expose on the ai-tool MCP server (maps to camel.server.mcp-tags). Use with --mcp-stdio or when camel.server.mcp-enabled is configured for HTTP transport. Not used by --mcp (dev\/diagnostics MCP).", "javaType": "java.lang.String", "type": "string" }, { "names": "--metrics", "description": "Deprecated: use --observe instead. Metrics (Micrometer and Prometheus) at \/q\/metrics on local HTTP server (port 8080 by default)", "defaultValue": "false", "javaType": "boolean", "type": "boolean", "deprecated": true }, { "names": "--modeline", "description": "Whether to support JBang style \/\/DEPS to specify additional dependencies", "defaultValue": "true", "javaType": "boolean", "type": "boolean" }, { "names": "--name", "description": "The name of the Camel application. By default the name of the directory when running a whole directory (--source-dir, or a directory), else the name of the first file", "defaultValue": "CamelJBang", "javaType": "java.lang.String", "type": "string" }, { "names": "--observe", "description": "Enable observability services (health, metrics, dev console, and lightweight Camel-only tracing in the TUI Spans tab)", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--open-api", "description": "Adds an OpenAPI spec from the given file (json or yaml file)", "javaType": "java.lang.String", "type": "string" }, { "names": "--open-telemetry-agent", "description": "Enable OpenTelemetry Java Agent for auto-instrumentation of third-party libraries (HTTP clients, JDBC, Kafka clients, gRPC, etc.). Traces are shown in the TUI Spans tab with Camel spans in cyan and 3rd-party agent spans in magenta.", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--open-telemetry-agent-export", "description": "Where to export OpenTelemetry Agent telemetry: tui (embedded receiver in TUI), otlp (external OTLP collector for traces), or observability (full stack with traces and logs). With otlp, start a trace backend first (e.g. 'camel infra run jaeger'). With observability, start the stack via 'camel infra run observability'. The value 'jaeger' is deprecated and works as an alias for 'otlp'.", "defaultValue": "tui", "javaType": "java.lang.String", "type": "string" }, { "names": "--openapi-ui", "description": "Swagger UI for REST OpenAPI at \/q\/openapi (OpenAPI document at \/q\/openapi.json; port 8080 by default)", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--package-scan-jars", "description": "Whether to automatic package scan JARs for custom Spring or Quarkus beans making them available for Camel CLI", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--port", "description": "Embeds a local HTTP server on this port (port 8080 by default; use 0 to dynamic assign a free random port number)", "javaType": "int", "type": "integer" }, { "names": "--profile", "description": "Profile to run (dev, test, prod).", "defaultValue": "dev", "javaType": "java.lang.String", "type": "string" }, { "names": "--prompt", "description": "Allow user to type in required parameters in prompt if not present in application", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--prop,--property", "description": "Additional properties (override existing)", "javaType": "java.lang.String[]", "type": "array" }, { "names": "--properties", "description": "comma separated list of properties file (ex. \/path\/to\/file.properties,\/path\/to\/other.properties", "javaType": "java.lang.String", "type": "string" }, { "names": "--quarkus-artifact-id", "description": "Deprecated. This value is not used anymore. It is kept only for backwards compatibility and will be removed in Camel 5.x. Camel commands may use either 'quarkus-bom' or 'quarkus-camel-bom' artifactIds depending on the context.", "defaultValue": "quarkus-bom", "javaType": "java.lang.String", "type": "string", "deprecated": true }, { "names": "--quarkus-ext-registry", "description": "The base URI of Quarkus Extension Registry. The default is https:\/\/registry.quarkus.io unless camel.jbang.quarkus.platform.url system property is set (the \"\/client\/platforms\" suffix is removed if present).", "javaType": "java.lang.String", "type": "string" }, { "names": "--quarkus-group-id", "description": "groupId of Quarkus Platform BOM; honored only if --quarkus-version is set", "defaultValue": "io.quarkus.platform", "javaType": "java.lang.String", "type": "string" }, { "names": "--quarkus-version", "description": "version of Quarkus Platform BOM; the default value is looked up in Quarkus Extension Registry", "javaType": "java.lang.String", "type": "string" }, { "names": "--reload,--dev", "description": "Enables dev mode (live reload when source files are updated and saved)", "javaType": "boolean", "type": "boolean" }, { "names": "--repo,--repos", "description": "Additional maven repositories for download on-demand (Use commas to separate multiple repositories)", "javaType": "java.lang.String", "type": "string" }, { "names": "--resource-dir,--resource-dirs", "description": "Additional resource directories to include on the classpath (recursive, preserving structure)", "javaType": "java.util.List", "type": "array" }, { "names": "--runtime", "description": "Runtime (jbang, camel-main, spring-boot, quarkus). The jbang runtime runs in-process in the Camel CLI JVM which is fast and intended for prototyping. The other runtimes export to a temporary project and run in a separate JVM via Maven, similar to a production deployment.", "defaultValue": "jbang", "javaType": "org.apache.camel.dsl.jbang.run.common.RuntimeType", "type": "object" }, { "names": "--skip-plugins", "description": "Skip resolving plugin dependencies", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--source-dir", "description": "Source directory for dynamically loading Camel file(s) to run. When using this, then files cannot be specified at the same time.", "javaType": "java.lang.String", "type": "string" }, { "names": "--spring-boot-version", "description": "Spring Boot version", "defaultValue": "4.1.2", "javaType": "java.lang.String", "type": "string" }, { "names": "--stub", "description": "Stubs all the matching endpoint uri with the given component name or pattern. Multiple names can be separated by comma. (all = stub all endpoints, remote = stub only remote components).", "javaType": "java.lang.String", "type": "string" }, { "names": "--trace", "description": "Enables trace logging of the routed messages", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--verbose", "description": "Verbose output of startup activity (dependency resolution and downloading", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "-h,--help", "description": "Display the help and sub-commands", "javaType": "boolean", "type": "boolean" } ] }, + { "name": "dev", "fullName": "dev", "description": "Run in dev mode with live reload", "sourceClass": "org.apache.camel.dsl.jbang.core.commands.Dev", "options": [ { "names": "--background", "description": "Run in the background", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--background-wait", "description": "How long to wait for the integration in the background to start, before returning, in millis or as a duration such as 2m (true waits 60 seconds, false does not wait)", "defaultValue": "60s", "javaType": "long", "type": "integer" }, { "names": "--backlog-trace", "description": "Enables backlog tracing of the routed messages", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--camel-spring-boot-version", "description": "To run using a different Camel Spring Boot version than the default version.", "javaType": "java.lang.String", "type": "string" }, { "names": "--camel-version", "description": "To run using a different Camel version than the default version.", "javaType": "java.lang.String", "type": "string" }, { "names": "--chaos", "description": "Add camel-chaos, to turn on faults while running (camel cmd chaos-add); on with profile dev, never with prod. With a scenario file (such as --chaos=test\/chaos\/outage.chaos) its rules are added at startup. A run with chaos ends with exit code 1 when the chaos verdict is FAIL. With Quarkus it needs Camel Quarkus on Camel 4.24 or newer", "defaultValue": "false", "javaType": "boolean", "type": "boolean", "paramLabel": "" }, { "names": "--chaos-report", "description": "Write the chaos report as JSON to this file when the run ends (with --chaos)", "javaType": "java.lang.String", "type": "string", "paramLabel": "" }, { "names": "--code", "description": "Run the given text or file as Java DSL routes", "javaType": "java.lang.String", "type": "string" }, { "names": "--console", "description": "Developer console on the local HTTP server (port 8080 by default): \/q\/dev with the jbang and Camel Main runtimes, \/actuator\/camel with Spring Boot, and \/q\/camel\/dev-console with Quarkus", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--data-dir", "description": "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 (such as inbox,archive).", "javaType": "java.lang.String", "type": "string" }, { "names": "--dep,--dependency", "description": "Add additional dependencies", "javaType": "java.util.List", "type": "array" }, { "names": "--download", "description": "Whether to allow automatic downloading JAR dependencies (over the internet)", "defaultValue": "true", "javaType": "boolean", "type": "boolean" }, { "names": "--empty", "description": "Run an empty Camel without loading source files", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--example", "description": "Run an example by name (timer-log or route\/aggregator), list the groups when no name is given, or list one group by its name (route).", "javaType": "java.lang.String", "type": "string" }, { "names": "--exclude", "description": "Exclude files by name or pattern", "javaType": "java.util.List", "type": "array" }, { "names": "--fresh", "description": "Make sure we use fresh (i.e. non-cached) resources", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--gav", "description": "The Maven group:artifact:version (used during exporting)", "javaType": "java.lang.String", "type": "string" }, { "names": "--health", "description": "Deprecated: use --observe instead. Health check at \/q\/health on local HTTP server (port 8080 by default)", "defaultValue": "false", "javaType": "boolean", "type": "boolean", "deprecated": true }, { "names": "--ignore-loading-error", "description": "Whether to ignore route loading and compilation errors (use this with care!)", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--java-version,--java", "description": "Java version (21, 25)", "defaultValue": "21", "javaType": "java.lang.String", "type": "string" }, { "names": "--jfr", "description": "Enables Java Flight Recorder, saving a recording to .jfr on exit. Automatically adds JFR support for the runtime and turns on the Camel runtime instrumentation events (route, processor, exchange, etc.).", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--jfr-profile", "description": "Java Flight Recorder settings profile to use (such as default or profile). Implies --jfr.", "javaType": "java.lang.String", "type": "string" }, { "names": "--jvm-args", "description": "Additional JVM arguments (e.g. -Xmx256m -Xms128m)", "javaType": "java.lang.String", "type": "string" }, { "names": "--jvm-debug", "description": "To enable JVM remote debugging on port 4004 by default. The supported values are true to enable the remote debugging, false to disable the remote debugging or a number to use a custom port", "javaType": "int", "type": "integer", "paramLabel": "" }, { "names": "--kamelets-version", "description": "Apache Camel Kamelets version (auto-detected from classpath if not set)", "javaType": "java.lang.String", "type": "string" }, { "names": "--lazy-bean", "description": "Whether to use lazy bean initialization (can help with complex classloading issues)", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--local-kamelet-dir", "description": "Local directory (or github link) for loading Kamelets (takes precedence). Multiple directories can be specified separated by comma.", "javaType": "java.lang.String", "type": "string" }, { "names": "--logging", "description": "Can be used to turn off logging", "defaultValue": "true", "javaType": "boolean", "type": "boolean" }, { "names": "--logging-category", "description": "Used for individual logging levels (ex: org.apache.kafka=DEBUG)", "javaType": "java.util.List", "type": "array" }, { "names": "--logging-color", "description": "Use colored logging. Default is auto-detected based on NO_COLOR, CI, FORCE_COLOR environment variables and terminal capabilities", "javaType": "boolean", "type": "boolean" }, { "names": "--logging-config-path", "description": "Path to file with custom logging configuration", "javaType": "java.lang.String", "type": "string" }, { "names": "--logging-json", "description": "Use JSON logging (ECS Layout)", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--logging-level", "description": "Logging level (ERROR, WARN, INFO, DEBUG, TRACE)", "defaultValue": "info", "javaType": "java.lang.String", "type": "string" }, { "names": "--management-port", "description": "To use a dedicated port for HTTP management (use 0 to dynamic assign a free random port number)", "javaType": "int", "type": "integer" }, { "names": "--maven-apache-snapshot-enabled", "description": "Whether downloading JARs from ASF Maven Snapshot repository is enabled", "defaultValue": "true", "javaType": "boolean", "type": "boolean" }, { "names": "--maven-central-enabled", "description": "Whether downloading JARs from Maven Central repository is enabled", "defaultValue": "true", "javaType": "boolean", "type": "boolean" }, { "names": "--maven-settings", "description": "Optional location of Maven settings.xml file to configure servers, repositories, mirrors and proxies. If set to \"false\", not even the default ~\/.m2\/settings.xml will be used.", "javaType": "java.lang.String", "type": "string" }, { "names": "--maven-settings-security", "description": "Optional location of Maven settings-security.xml file to decrypt settings.xml", "javaType": "java.lang.String", "type": "string" }, { "names": "--max-idle-seconds", "description": "For how long time in seconds Camel can be idle before stopping", "defaultValue": "0", "javaType": "int", "type": "integer" }, { "names": "--max-messages", "description": "Max number of messages to process before stopping", "defaultValue": "0", "javaType": "int", "type": "integer" }, { "names": "--max-seconds", "description": "Max seconds to run before stopping", "defaultValue": "0", "javaType": "int", "type": "integer" }, { "names": "--mcp", "description": "Embed dev\/diagnostics MCP tools on the local HTTP management server (\/mcp by default). When management shares the main HTTP port, MCP is served on the main server bind address. Also binds the management server to 127.0.0.1 (affecting health\/metrics when --observe is used).", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--mcp-stdio", "description": "Expose tagged ai-tool routes as MCP tools over process stdin\/stdout for IDE subprocess integration (no HTTP port). Requires --mcp-tags or camel.server.mcp-tags. Logging and startup summaries are routed to stderr so stdout carries MCP protocol only.", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--mcp-tags", "description": "Comma-separated ai-tool tags to expose on the ai-tool MCP server (maps to camel.server.mcp-tags). Use with --mcp-stdio or when camel.server.mcp-enabled is configured for HTTP transport. Not used by --mcp (dev\/diagnostics MCP).", "javaType": "java.lang.String", "type": "string" }, { "names": "--metrics", "description": "Deprecated: use --observe instead. Metrics (Micrometer and Prometheus) at \/q\/metrics on local HTTP server (port 8080 by default)", "defaultValue": "false", "javaType": "boolean", "type": "boolean", "deprecated": true }, { "names": "--modeline", "description": "Whether to support JBang style \/\/DEPS to specify additional dependencies", "defaultValue": "true", "javaType": "boolean", "type": "boolean" }, { "names": "--name", "description": "The name of the Camel application. By default the name of the directory when running a whole directory (--source-dir, or a directory), else the name of the first file", "defaultValue": "CamelJBang", "javaType": "java.lang.String", "type": "string" }, { "names": "--observe", "description": "Enable observability services (health, metrics, dev console, and lightweight Camel-only tracing in the TUI Spans tab)", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--open-api", "description": "Adds an OpenAPI spec from the given file (json or yaml file)", "javaType": "java.lang.String", "type": "string" }, { "names": "--open-telemetry-agent", "description": "Enable OpenTelemetry Java Agent for auto-instrumentation of third-party libraries (HTTP clients, JDBC, Kafka clients, gRPC, etc.). Traces are shown in the TUI Spans tab with Camel spans in cyan and 3rd-party agent spans in magenta.", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--open-telemetry-agent-export", "description": "Where to export OpenTelemetry Agent telemetry: tui (embedded receiver in TUI), otlp (external OTLP collector for traces), or observability (full stack with traces and logs). With otlp, start a trace backend first (e.g. 'camel infra run jaeger'). With observability, start the stack via 'camel infra run observability'. The value 'jaeger' is deprecated and works as an alias for 'otlp'.", "defaultValue": "tui", "javaType": "java.lang.String", "type": "string" }, { "names": "--openapi-ui", "description": "Swagger UI for REST OpenAPI at \/q\/openapi (OpenAPI document at \/q\/openapi.json; port 8080 by default)", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--package-scan-jars", "description": "Whether to automatic package scan JARs for custom Spring or Quarkus beans making them available for Camel CLI", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--port", "description": "Embeds a local HTTP server on this port (port 8080 by default; use 0 to dynamic assign a free random port number)", "javaType": "int", "type": "integer" }, { "names": "--profile", "description": "Profile to run (dev, test, prod).", "defaultValue": "dev", "javaType": "java.lang.String", "type": "string" }, { "names": "--prompt", "description": "Allow user to type in required parameters in prompt if not present in application", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--prop,--property", "description": "Additional properties (override existing)", "javaType": "java.lang.String[]", "type": "array" }, { "names": "--properties", "description": "comma separated list of properties file (ex. \/path\/to\/file.properties,\/path\/to\/other.properties", "javaType": "java.lang.String", "type": "string" }, { "names": "--quarkus-artifact-id", "description": "Deprecated. This value is not used anymore. It is kept only for backwards compatibility and will be removed in Camel 5.x. Camel commands may use either 'quarkus-bom' or 'quarkus-camel-bom' artifactIds depending on the context.", "defaultValue": "quarkus-bom", "javaType": "java.lang.String", "type": "string", "deprecated": true }, { "names": "--quarkus-ext-registry", "description": "The base URI of Quarkus Extension Registry. The default is https:\/\/registry.quarkus.io unless camel.jbang.quarkus.platform.url system property is set (the \"\/client\/platforms\" suffix is removed if present).", "javaType": "java.lang.String", "type": "string" }, { "names": "--quarkus-group-id", "description": "groupId of Quarkus Platform BOM; honored only if --quarkus-version is set", "defaultValue": "io.quarkus.platform", "javaType": "java.lang.String", "type": "string" }, { "names": "--quarkus-version", "description": "version of Quarkus Platform BOM; the default value is looked up in Quarkus Extension Registry", "javaType": "java.lang.String", "type": "string" }, { "names": "--reload,--dev", "description": "Enables dev mode (live reload when source files are updated and saved)", "javaType": "boolean", "type": "boolean" }, { "names": "--repo,--repos", "description": "Additional maven repositories for download on-demand (Use commas to separate multiple repositories)", "javaType": "java.lang.String", "type": "string" }, { "names": "--resource-dir,--resource-dirs", "description": "Additional resource directories to include on the classpath (recursive, preserving structure)", "javaType": "java.util.List", "type": "array" }, { "names": "--runtime", "description": "Runtime (jbang, camel-main, spring-boot, quarkus). The jbang runtime runs in-process in the Camel CLI JVM which is fast and intended for prototyping. The other runtimes export to a temporary project and run in a separate JVM via Maven, similar to a production deployment.", "defaultValue": "jbang", "javaType": "org.apache.camel.dsl.jbang.run.common.RuntimeType", "type": "object" }, { "names": "--skip-plugins", "description": "Skip resolving plugin dependencies", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--source-dir", "description": "Source directory for dynamically loading Camel file(s) to run. When using this, then files cannot be specified at the same time.", "javaType": "java.lang.String", "type": "string" }, { "names": "--spring-boot-version", "description": "Spring Boot version", "defaultValue": "4.1.2", "javaType": "java.lang.String", "type": "string" }, { "names": "--stub", "description": "Stubs all the matching endpoint uri with the given component name or pattern. Multiple names can be separated by comma. (all = stub all endpoints, remote = stub only remote components).", "javaType": "java.lang.String", "type": "string" }, { "names": "--trace", "description": "Enables trace logging of the routed messages", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--verbose", "description": "Verbose output of startup activity (dependency resolution and downloading", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "-h,--help", "description": "Display the help and sub-commands", "javaType": "boolean", "type": "boolean" } ] }, { "name": "dirty", "fullName": "dirty", "description": "Check if there are dirty files from previous Camel runs that did not terminate gracefully", "sourceClass": "org.apache.camel.dsl.jbang.core.commands.process.Dirty", "options": [ { "names": "--clean", "description": "Clean dirty files which are no longer in use, and the logs of the previous runs of the integrations (camel log --previous)", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "-h,--help", "description": "Display the help and sub-commands", "javaType": "boolean", "type": "boolean" } ] }, { "name": "doc", "fullName": "doc", "description": "Shows documentation for kamelet, component, EIP, and other Camel resources", "sourceClass": "org.apache.camel.dsl.jbang.core.commands.catalog.CatalogDoc", "options": [ { "names": "--camel-version", "description": "To use a different Camel version than the default version", "javaType": "java.lang.String", "type": "string" }, { "names": "--download", "description": "Whether to allow automatic downloading JAR dependencies (over the internet)", "defaultValue": "true", "javaType": "boolean", "type": "boolean" }, { "names": "--example", "description": "Prints a minimal working YAML route snippet for the component", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--filter", "description": "Filter option listed in tables by name, description, or group", "javaType": "java.lang.String", "type": "string" }, { "names": "--fresh", "description": "Make sure we use fresh (i.e. non-cached) resources", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--header", "description": "Whether to display component message headers", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--json", "description": "Output in JSON Format: the documentation the MCP tool camel_catalog_doc gives", "javaType": "boolean", "type": "boolean" }, { "names": "--kamelets-version", "description": "Apache Camel Kamelets version (auto-detected from classpath if not set)", "javaType": "java.lang.String", "type": "string" }, { "names": "--open-url", "description": "Opens the online documentation form the Camel website in the web browser", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--quarkus-artifact-id", "description": "Deprecated. This value is not used anymore. It is kept only for backwards compatibility and will be removed in Camel 5.x. Camel commands may use either 'quarkus-bom' or 'quarkus-camel-bom' artifactIds depending on the context.", "defaultValue": "quarkus-bom", "javaType": "java.lang.String", "type": "string", "deprecated": true }, { "names": "--quarkus-ext-registry", "description": "The base URI of Quarkus Extension Registry. The default is https:\/\/registry.quarkus.io unless camel.jbang.quarkus.platform.url system property is set (the \"\/client\/platforms\" suffix is removed if present).", "javaType": "java.lang.String", "type": "string" }, { "names": "--quarkus-group-id", "description": "groupId of Quarkus Platform BOM; honored only if --quarkus-version is set", "defaultValue": "io.quarkus.platform", "javaType": "java.lang.String", "type": "string" }, { "names": "--quarkus-version", "description": "version of Quarkus Platform BOM; the default value is looked up in Quarkus Extension Registry", "javaType": "java.lang.String", "type": "string" }, { "names": "--repo,--repos", "description": "Additional maven repositories for download on-demand (Use commas to separate multiple repositories)", "javaType": "java.lang.String", "type": "string" }, { "names": "--runtime", "description": "Runtime (camel-main, spring-boot, quarkus)", "javaType": "org.apache.camel.dsl.jbang.run.common.RuntimeType", "type": "object" }, { "names": "--url", "description": "Prints the link to the online documentation on the Camel website", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "-h,--help", "description": "Display the help and sub-commands", "javaType": "boolean", "type": "boolean" } ] }, { "name": "doctor", "fullName": "doctor", "description": "Checks the environment and reports potential issues", "sourceClass": "org.apache.camel.dsl.jbang.core.commands.Doctor", "options": [ { "names": "--json", "description": "Output in JSON Format: the status (OK, WARN or FAIL) of each check", "javaType": "boolean", "type": "boolean" }, { "names": "-h,--help", "description": "Display the help and sub-commands", "javaType": "boolean", "type": "boolean" } ] }, @@ -27,7 +27,7 @@ { "name": "plugin", "fullName": "plugin", "description": "Manage plugins that add sub-commands to this CLI", "sourceClass": "org.apache.camel.dsl.jbang.core.commands.plugin.PluginCommand", "options": [ { "names": "-h,--help", "description": "Display the help and sub-commands", "javaType": "boolean", "type": "boolean" } ], "subcommands": [ { "name": "add", "fullName": "plugin add", "description": "Add new plugin", "sourceClass": "org.apache.camel.dsl.jbang.core.commands.plugin.PluginAdd", "options": [ { "names": "--artifactId", "description": "Maven artifactId", "javaType": "java.lang.String", "type": "string" }, { "names": "--command", "description": "The command that the plugin uses", "javaType": "java.lang.String", "type": "string" }, { "names": "--description", "description": "A short description of the plugin", "javaType": "java.lang.String", "type": "string" }, { "names": "--first-version", "description": "First version of this plugin", "defaultValue": "", "javaType": "java.lang.String", "type": "string" }, { "names": "--gav", "description": "Maven group and artifact coordinates.", "javaType": "java.lang.String", "type": "string" }, { "names": "--groupId", "description": "Maven groupId", "defaultValue": "org.apache.camel", "javaType": "java.lang.String", "type": "string" }, { "names": "--repo,--repos", "description": "Additional maven repositories to use for downloading the plugin (Use commas to separate multiple repositories)", "javaType": "java.lang.String", "type": "string" }, { "names": "--version", "description": "Maven artifact version", "defaultValue": "", "javaType": "java.lang.String", "type": "string" }, { "names": "-h,--help", "description": "Display the help and sub-commands", "javaType": "boolean", "type": "boolean" } ] }, { "name": "delete", "fullName": "plugin delete", "description": "Removes a plugin", "sourceClass": "org.apache.camel.dsl.jbang.core.commands.plugin.PluginDelete", "options": [ { "names": "-h,--help", "description": "Display the help and sub-commands", "javaType": "boolean", "type": "boolean" } ] }, { "name": "get", "fullName": "plugin get", "description": "Get installed plugins", "sourceClass": "org.apache.camel.dsl.jbang.core.commands.plugin.PluginGet", "options": [ { "names": "--json", "description": "Output in JSON Format", "javaType": "boolean", "type": "boolean" }, { "names": "--repos", "description": "Display maven repository column", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "-h,--help", "description": "Display the help and sub-commands", "javaType": "boolean", "type": "boolean" } ] }, { "name": "list", "fullName": "plugin list", "description": "List all available plugins", "sourceClass": "org.apache.camel.dsl.jbang.core.commands.plugin.PluginList", "options": [ { "names": "--json", "description": "Output in JSON Format", "javaType": "boolean", "type": "boolean" }, { "names": "--repos", "description": "Display maven repository column", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "-h,--help", "description": "Display the help and sub-commands", "javaType": "boolean", "type": "boolean" } ] } ] }, { "name": "ps", "fullName": "ps", "description": "List running Camel integrations", "sourceClass": "org.apache.camel.dsl.jbang.core.commands.process.ListProcess", "options": [ { "names": "--duration", "description": "How long to keep watching or following, in millis or as a duration such as 30s (default: until Enter is pressed)", "javaType": "long", "type": "integer" }, { "names": "--json", "description": "Output in JSON Format", "javaType": "boolean", "type": "boolean" }, { "names": "--pid", "description": "List only pid in the output", "javaType": "boolean", "type": "boolean" }, { "names": "--remote", "description": "Break down counters into remote\/total pairs", "javaType": "boolean", "type": "boolean" }, { "names": "--sort", "description": "Sort by pid, name or age", "defaultValue": "pid", "javaType": "java.lang.String", "type": "string" }, { "names": "--watch", "description": "Execute periodically and showing output fullscreen", "javaType": "boolean", "type": "boolean" }, { "names": "-h,--help", "description": "Display the help and sub-commands", "javaType": "boolean", "type": "boolean" } ] }, { "name": "restart", "fullName": "restart", "description": "Restarts running Camel integrations (stop + re-launch)", "sourceClass": "org.apache.camel.dsl.jbang.core.commands.process.RestartProcess", "options": [ { "names": "--timeout", "description": "How long to wait for the integration to stop, and again to start, in millis or as a duration such as 30s", "defaultValue": "60000", "javaType": "long", "type": "integer" }, { "names": "-h,--help", "description": "Display the help and sub-commands", "javaType": "boolean", "type": "boolean" } ] }, - { "name": "run", "fullName": "run", "description": "Run as local Camel integration", "sourceClass": "org.apache.camel.dsl.jbang.core.commands.Run", "options": [ { "names": "--background", "description": "Run in the background", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--background-wait", "description": "How long to wait for the integration in the background to start, before returning, in millis or as a duration such as 2m (true waits 60 seconds, false does not wait)", "defaultValue": "60s", "javaType": "long", "type": "integer" }, { "names": "--backlog-trace", "description": "Enables backlog tracing of the routed messages", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--camel-spring-boot-version", "description": "To run using a different Camel Spring Boot version than the default version.", "javaType": "java.lang.String", "type": "string" }, { "names": "--camel-version", "description": "To run using a different Camel version than the default version.", "javaType": "java.lang.String", "type": "string" }, { "names": "--chaos", "description": "Add camel-chaos, to turn on faults while running (camel cmd chaos-add); on with profile dev, never with prod. With a scenario file (such as --chaos=chaos\/outage.chaos) its rules are added at startup. A run with chaos ends with exit code 1 when the chaos verdict is FAIL. With Quarkus it needs Camel Quarkus on Camel 4.24 or newer", "defaultValue": "false", "javaType": "boolean", "type": "boolean", "paramLabel": "" }, { "names": "--chaos-report", "description": "Write the chaos report as JSON to this file when the run ends (with --chaos)", "javaType": "java.lang.String", "type": "string", "paramLabel": "" }, { "names": "--code", "description": "Run the given text or file as Java DSL routes", "javaType": "java.lang.String", "type": "string" }, { "names": "--console", "description": "Developer console on the local HTTP server (port 8080 by default): \/q\/dev with the jbang and Camel Main runtimes, \/actuator\/camel with Spring Boot, and \/q\/camel\/dev-console with Quarkus", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--data-dir", "description": "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 (such as inbox,archive).", "javaType": "java.lang.String", "type": "string" }, { "names": "--dep,--dependency", "description": "Add additional dependencies", "javaType": "java.util.List", "type": "array" }, { "names": "--download", "description": "Whether to allow automatic downloading JAR dependencies (over the internet)", "defaultValue": "true", "javaType": "boolean", "type": "boolean" }, { "names": "--empty", "description": "Run an empty Camel without loading source files", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--example", "description": "Run an example by name (timer-log or route\/aggregator), list the groups when no name is given, or list one group by its name (route).", "javaType": "java.lang.String", "type": "string" }, { "names": "--exclude", "description": "Exclude files by name or pattern", "javaType": "java.util.List", "type": "array" }, { "names": "--fresh", "description": "Make sure we use fresh (i.e. non-cached) resources", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--gav", "description": "The Maven group:artifact:version (used during exporting)", "javaType": "java.lang.String", "type": "string" }, { "names": "--health", "description": "Deprecated: use --observe instead. Health check at \/q\/health on local HTTP server (port 8080 by default)", "defaultValue": "false", "javaType": "boolean", "type": "boolean", "deprecated": true }, { "names": "--ignore-loading-error", "description": "Whether to ignore route loading and compilation errors (use this with care!)", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--java-version,--java", "description": "Java version (21, 25)", "defaultValue": "21", "javaType": "java.lang.String", "type": "string" }, { "names": "--jfr", "description": "Enables Java Flight Recorder, saving a recording to .jfr on exit. Automatically adds JFR support for the runtime and turns on the Camel runtime instrumentation events (route, processor, exchange, etc.).", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--jfr-profile", "description": "Java Flight Recorder settings profile to use (such as default or profile). Implies --jfr.", "javaType": "java.lang.String", "type": "string" }, { "names": "--jvm-args", "description": "Additional JVM arguments (e.g. -Xmx256m -Xms128m)", "javaType": "java.lang.String", "type": "string" }, { "names": "--jvm-debug", "description": "To enable JVM remote debugging on port 4004 by default. The supported values are true to enable the remote debugging, false to disable the remote debugging or a number to use a custom port", "javaType": "int", "type": "integer", "paramLabel": "" }, { "names": "--kamelets-version", "description": "Apache Camel Kamelets version (auto-detected from classpath if not set)", "javaType": "java.lang.String", "type": "string" }, { "names": "--lazy-bean", "description": "Whether to use lazy bean initialization (can help with complex classloading issues)", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--local-kamelet-dir", "description": "Local directory (or github link) for loading Kamelets (takes precedence). Multiple directories can be specified separated by comma.", "javaType": "java.lang.String", "type": "string" }, { "names": "--logging", "description": "Can be used to turn off logging", "defaultValue": "true", "javaType": "boolean", "type": "boolean" }, { "names": "--logging-category", "description": "Used for individual logging levels (ex: org.apache.kafka=DEBUG)", "javaType": "java.util.List", "type": "array" }, { "names": "--logging-color", "description": "Use colored logging. Default is auto-detected based on NO_COLOR, CI, FORCE_COLOR environment variables and terminal capabilities", "javaType": "boolean", "type": "boolean" }, { "names": "--logging-config-path", "description": "Path to file with custom logging configuration", "javaType": "java.lang.String", "type": "string" }, { "names": "--logging-json", "description": "Use JSON logging (ECS Layout)", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--logging-level", "description": "Logging level (ERROR, WARN, INFO, DEBUG, TRACE)", "defaultValue": "info", "javaType": "java.lang.String", "type": "string" }, { "names": "--management-port", "description": "To use a dedicated port for HTTP management (use 0 to dynamic assign a free random port number)", "javaType": "int", "type": "integer" }, { "names": "--maven-apache-snapshot-enabled", "description": "Whether downloading JARs from ASF Maven Snapshot repository is enabled", "defaultValue": "true", "javaType": "boolean", "type": "boolean" }, { "names": "--maven-central-enabled", "description": "Whether downloading JARs from Maven Central repository is enabled", "defaultValue": "true", "javaType": "boolean", "type": "boolean" }, { "names": "--maven-settings", "description": "Optional location of Maven settings.xml file to configure servers, repositories, mirrors and proxies. If set to \"false\", not even the default ~\/.m2\/settings.xml will be used.", "javaType": "java.lang.String", "type": "string" }, { "names": "--maven-settings-security", "description": "Optional location of Maven settings-security.xml file to decrypt settings.xml", "javaType": "java.lang.String", "type": "string" }, { "names": "--max-idle-seconds", "description": "For how long time in seconds Camel can be idle before stopping", "defaultValue": "0", "javaType": "int", "type": "integer" }, { "names": "--max-messages", "description": "Max number of messages to process before stopping", "defaultValue": "0", "javaType": "int", "type": "integer" }, { "names": "--max-seconds", "description": "Max seconds to run before stopping", "defaultValue": "0", "javaType": "int", "type": "integer" }, { "names": "--mcp", "description": "Embed dev\/diagnostics MCP tools on the local HTTP management server (\/mcp by default). When management shares the main HTTP port, MCP is served on the main server bind address. Also binds the management server to 127.0.0.1 (affecting health\/metrics when --observe is used).", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--mcp-stdio", "description": "Expose tagged ai-tool routes as MCP tools over process stdin\/stdout for IDE subprocess integration (no HTTP port). Requires --mcp-tags or camel.server.mcp-tags. Logging and startup summaries are routed to stderr so stdout carries MCP protocol only.", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--mcp-tags", "description": "Comma-separated ai-tool tags to expose on the ai-tool MCP server (maps to camel.server.mcp-tags). Use with --mcp-stdio or when camel.server.mcp-enabled is configured for HTTP transport. Not used by --mcp (dev\/diagnostics MCP).", "javaType": "java.lang.String", "type": "string" }, { "names": "--metrics", "description": "Deprecated: use --observe instead. Metrics (Micrometer and Prometheus) at \/q\/metrics on local HTTP server (port 8080 by default)", "defaultValue": "false", "javaType": "boolean", "type": "boolean", "deprecated": true }, { "names": "--modeline", "description": "Whether to support JBang style \/\/DEPS to specify additional dependencies", "defaultValue": "true", "javaType": "boolean", "type": "boolean" }, { "names": "--name", "description": "The name of the Camel application. By default the name of the directory when running a whole directory (--source-dir, or a directory), else the name of the first file", "defaultValue": "CamelJBang", "javaType": "java.lang.String", "type": "string" }, { "names": "--observe", "description": "Enable observability services (health, metrics, dev console, and lightweight Camel-only tracing in the TUI Spans tab)", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--open-api", "description": "Adds an OpenAPI spec from the given file (json or yaml file)", "javaType": "java.lang.String", "type": "string" }, { "names": "--open-telemetry-agent", "description": "Enable OpenTelemetry Java Agent for auto-instrumentation of third-party libraries (HTTP clients, JDBC, Kafka clients, gRPC, etc.). Traces are shown in the TUI Spans tab with Camel spans in cyan and 3rd-party agent spans in magenta.", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--open-telemetry-agent-export", "description": "Where to export OpenTelemetry Agent telemetry: tui (embedded receiver in TUI), otlp (external OTLP collector for traces), or observability (full stack with traces and logs). With otlp, start a trace backend first (e.g. 'camel infra run jaeger'). With observability, start the stack via 'camel infra run observability'. The value 'jaeger' is deprecated and works as an alias for 'otlp'.", "defaultValue": "tui", "javaType": "java.lang.String", "type": "string" }, { "names": "--openapi-ui", "description": "Swagger UI for REST OpenAPI at \/q\/openapi (OpenAPI document at \/q\/openapi.json; port 8080 by default)", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--package-scan-jars", "description": "Whether to automatic package scan JARs for custom Spring or Quarkus beans making them available for Camel CLI", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--port", "description": "Embeds a local HTTP server on this port (port 8080 by default; use 0 to dynamic assign a free random port number)", "javaType": "int", "type": "integer" }, { "names": "--profile", "description": "Profile to run (dev, test, prod).", "defaultValue": "dev", "javaType": "java.lang.String", "type": "string" }, { "names": "--prompt", "description": "Allow user to type in required parameters in prompt if not present in application", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--prop,--property", "description": "Additional properties (override existing)", "javaType": "java.lang.String[]", "type": "array" }, { "names": "--properties", "description": "comma separated list of properties file (ex. \/path\/to\/file.properties,\/path\/to\/other.properties", "javaType": "java.lang.String", "type": "string" }, { "names": "--quarkus-artifact-id", "description": "Deprecated. This value is not used anymore. It is kept only for backwards compatibility and will be removed in Camel 5.x. Camel commands may use either 'quarkus-bom' or 'quarkus-camel-bom' artifactIds depending on the context.", "defaultValue": "quarkus-bom", "javaType": "java.lang.String", "type": "string", "deprecated": true }, { "names": "--quarkus-ext-registry", "description": "The base URI of Quarkus Extension Registry. The default is https:\/\/registry.quarkus.io unless camel.jbang.quarkus.platform.url system property is set (the \"\/client\/platforms\" suffix is removed if present).", "javaType": "java.lang.String", "type": "string" }, { "names": "--quarkus-group-id", "description": "groupId of Quarkus Platform BOM; honored only if --quarkus-version is set", "defaultValue": "io.quarkus.platform", "javaType": "java.lang.String", "type": "string" }, { "names": "--quarkus-version", "description": "version of Quarkus Platform BOM; the default value is looked up in Quarkus Extension Registry", "javaType": "java.lang.String", "type": "string" }, { "names": "--reload,--dev", "description": "Enables dev mode (live reload when source files are updated and saved)", "javaType": "boolean", "type": "boolean" }, { "names": "--repo,--repos", "description": "Additional maven repositories for download on-demand (Use commas to separate multiple repositories)", "javaType": "java.lang.String", "type": "string" }, { "names": "--resource-dir,--resource-dirs", "description": "Additional resource directories to include on the classpath (recursive, preserving structure)", "javaType": "java.util.List", "type": "array" }, { "names": "--runtime", "description": "Runtime (jbang, camel-main, spring-boot, quarkus). The jbang runtime runs in-process in the Camel CLI JVM which is fast and intended for prototyping. The other runtimes export to a temporary project and run in a separate JVM via Maven, similar to a production deployment.", "defaultValue": "jbang", "javaType": "org.apache.camel.dsl.jbang.run.common.RuntimeType", "type": "object" }, { "names": "--skip-plugins", "description": "Skip resolving plugin dependencies", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--source-dir", "description": "Source directory for dynamically loading Camel file(s) to run. When using this, then files cannot be specified at the same time.", "javaType": "java.lang.String", "type": "string" }, { "names": "--spring-boot-version", "description": "Spring Boot version", "defaultValue": "4.1.2", "javaType": "java.lang.String", "type": "string" }, { "names": "--stub", "description": "Stubs all the matching endpoint uri with the given component name or pattern. Multiple names can be separated by comma. (all = stub all endpoints, remote = stub only remote components).", "javaType": "java.lang.String", "type": "string" }, { "names": "--trace", "description": "Enables trace logging of the routed messages", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--verbose", "description": "Verbose output of startup activity (dependency resolution and downloading", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "-h,--help", "description": "Display the help and sub-commands", "javaType": "boolean", "type": "boolean" } ] }, + { "name": "run", "fullName": "run", "description": "Run as local Camel integration", "sourceClass": "org.apache.camel.dsl.jbang.core.commands.Run", "options": [ { "names": "--background", "description": "Run in the background", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--background-wait", "description": "How long to wait for the integration in the background to start, before returning, in millis or as a duration such as 2m (true waits 60 seconds, false does not wait)", "defaultValue": "60s", "javaType": "long", "type": "integer" }, { "names": "--backlog-trace", "description": "Enables backlog tracing of the routed messages", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--camel-spring-boot-version", "description": "To run using a different Camel Spring Boot version than the default version.", "javaType": "java.lang.String", "type": "string" }, { "names": "--camel-version", "description": "To run using a different Camel version than the default version.", "javaType": "java.lang.String", "type": "string" }, { "names": "--chaos", "description": "Add camel-chaos, to turn on faults while running (camel cmd chaos-add); on with profile dev, never with prod. With a scenario file (such as --chaos=test\/chaos\/outage.chaos) its rules are added at startup. A run with chaos ends with exit code 1 when the chaos verdict is FAIL. With Quarkus it needs Camel Quarkus on Camel 4.24 or newer", "defaultValue": "false", "javaType": "boolean", "type": "boolean", "paramLabel": "" }, { "names": "--chaos-report", "description": "Write the chaos report as JSON to this file when the run ends (with --chaos)", "javaType": "java.lang.String", "type": "string", "paramLabel": "" }, { "names": "--code", "description": "Run the given text or file as Java DSL routes", "javaType": "java.lang.String", "type": "string" }, { "names": "--console", "description": "Developer console on the local HTTP server (port 8080 by default): \/q\/dev with the jbang and Camel Main runtimes, \/actuator\/camel with Spring Boot, and \/q\/camel\/dev-console with Quarkus", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--data-dir", "description": "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 (such as inbox,archive).", "javaType": "java.lang.String", "type": "string" }, { "names": "--dep,--dependency", "description": "Add additional dependencies", "javaType": "java.util.List", "type": "array" }, { "names": "--download", "description": "Whether to allow automatic downloading JAR dependencies (over the internet)", "defaultValue": "true", "javaType": "boolean", "type": "boolean" }, { "names": "--empty", "description": "Run an empty Camel without loading source files", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--example", "description": "Run an example by name (timer-log or route\/aggregator), list the groups when no name is given, or list one group by its name (route).", "javaType": "java.lang.String", "type": "string" }, { "names": "--exclude", "description": "Exclude files by name or pattern", "javaType": "java.util.List", "type": "array" }, { "names": "--fresh", "description": "Make sure we use fresh (i.e. non-cached) resources", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--gav", "description": "The Maven group:artifact:version (used during exporting)", "javaType": "java.lang.String", "type": "string" }, { "names": "--health", "description": "Deprecated: use --observe instead. Health check at \/q\/health on local HTTP server (port 8080 by default)", "defaultValue": "false", "javaType": "boolean", "type": "boolean", "deprecated": true }, { "names": "--ignore-loading-error", "description": "Whether to ignore route loading and compilation errors (use this with care!)", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--java-version,--java", "description": "Java version (21, 25)", "defaultValue": "21", "javaType": "java.lang.String", "type": "string" }, { "names": "--jfr", "description": "Enables Java Flight Recorder, saving a recording to .jfr on exit. Automatically adds JFR support for the runtime and turns on the Camel runtime instrumentation events (route, processor, exchange, etc.).", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--jfr-profile", "description": "Java Flight Recorder settings profile to use (such as default or profile). Implies --jfr.", "javaType": "java.lang.String", "type": "string" }, { "names": "--jvm-args", "description": "Additional JVM arguments (e.g. -Xmx256m -Xms128m)", "javaType": "java.lang.String", "type": "string" }, { "names": "--jvm-debug", "description": "To enable JVM remote debugging on port 4004 by default. The supported values are true to enable the remote debugging, false to disable the remote debugging or a number to use a custom port", "javaType": "int", "type": "integer", "paramLabel": "" }, { "names": "--kamelets-version", "description": "Apache Camel Kamelets version (auto-detected from classpath if not set)", "javaType": "java.lang.String", "type": "string" }, { "names": "--lazy-bean", "description": "Whether to use lazy bean initialization (can help with complex classloading issues)", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--local-kamelet-dir", "description": "Local directory (or github link) for loading Kamelets (takes precedence). Multiple directories can be specified separated by comma.", "javaType": "java.lang.String", "type": "string" }, { "names": "--logging", "description": "Can be used to turn off logging", "defaultValue": "true", "javaType": "boolean", "type": "boolean" }, { "names": "--logging-category", "description": "Used for individual logging levels (ex: org.apache.kafka=DEBUG)", "javaType": "java.util.List", "type": "array" }, { "names": "--logging-color", "description": "Use colored logging. Default is auto-detected based on NO_COLOR, CI, FORCE_COLOR environment variables and terminal capabilities", "javaType": "boolean", "type": "boolean" }, { "names": "--logging-config-path", "description": "Path to file with custom logging configuration", "javaType": "java.lang.String", "type": "string" }, { "names": "--logging-json", "description": "Use JSON logging (ECS Layout)", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--logging-level", "description": "Logging level (ERROR, WARN, INFO, DEBUG, TRACE)", "defaultValue": "info", "javaType": "java.lang.String", "type": "string" }, { "names": "--management-port", "description": "To use a dedicated port for HTTP management (use 0 to dynamic assign a free random port number)", "javaType": "int", "type": "integer" }, { "names": "--maven-apache-snapshot-enabled", "description": "Whether downloading JARs from ASF Maven Snapshot repository is enabled", "defaultValue": "true", "javaType": "boolean", "type": "boolean" }, { "names": "--maven-central-enabled", "description": "Whether downloading JARs from Maven Central repository is enabled", "defaultValue": "true", "javaType": "boolean", "type": "boolean" }, { "names": "--maven-settings", "description": "Optional location of Maven settings.xml file to configure servers, repositories, mirrors and proxies. If set to \"false\", not even the default ~\/.m2\/settings.xml will be used.", "javaType": "java.lang.String", "type": "string" }, { "names": "--maven-settings-security", "description": "Optional location of Maven settings-security.xml file to decrypt settings.xml", "javaType": "java.lang.String", "type": "string" }, { "names": "--max-idle-seconds", "description": "For how long time in seconds Camel can be idle before stopping", "defaultValue": "0", "javaType": "int", "type": "integer" }, { "names": "--max-messages", "description": "Max number of messages to process before stopping", "defaultValue": "0", "javaType": "int", "type": "integer" }, { "names": "--max-seconds", "description": "Max seconds to run before stopping", "defaultValue": "0", "javaType": "int", "type": "integer" }, { "names": "--mcp", "description": "Embed dev\/diagnostics MCP tools on the local HTTP management server (\/mcp by default). When management shares the main HTTP port, MCP is served on the main server bind address. Also binds the management server to 127.0.0.1 (affecting health\/metrics when --observe is used).", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--mcp-stdio", "description": "Expose tagged ai-tool routes as MCP tools over process stdin\/stdout for IDE subprocess integration (no HTTP port). Requires --mcp-tags or camel.server.mcp-tags. Logging and startup summaries are routed to stderr so stdout carries MCP protocol only.", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--mcp-tags", "description": "Comma-separated ai-tool tags to expose on the ai-tool MCP server (maps to camel.server.mcp-tags). Use with --mcp-stdio or when camel.server.mcp-enabled is configured for HTTP transport. Not used by --mcp (dev\/diagnostics MCP).", "javaType": "java.lang.String", "type": "string" }, { "names": "--metrics", "description": "Deprecated: use --observe instead. Metrics (Micrometer and Prometheus) at \/q\/metrics on local HTTP server (port 8080 by default)", "defaultValue": "false", "javaType": "boolean", "type": "boolean", "deprecated": true }, { "names": "--modeline", "description": "Whether to support JBang style \/\/DEPS to specify additional dependencies", "defaultValue": "true", "javaType": "boolean", "type": "boolean" }, { "names": "--name", "description": "The name of the Camel application. By default the name of the directory when running a whole directory (--source-dir, or a directory), else the name of the first file", "defaultValue": "CamelJBang", "javaType": "java.lang.String", "type": "string" }, { "names": "--observe", "description": "Enable observability services (health, metrics, dev console, and lightweight Camel-only tracing in the TUI Spans tab)", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--open-api", "description": "Adds an OpenAPI spec from the given file (json or yaml file)", "javaType": "java.lang.String", "type": "string" }, { "names": "--open-telemetry-agent", "description": "Enable OpenTelemetry Java Agent for auto-instrumentation of third-party libraries (HTTP clients, JDBC, Kafka clients, gRPC, etc.). Traces are shown in the TUI Spans tab with Camel spans in cyan and 3rd-party agent spans in magenta.", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--open-telemetry-agent-export", "description": "Where to export OpenTelemetry Agent telemetry: tui (embedded receiver in TUI), otlp (external OTLP collector for traces), or observability (full stack with traces and logs). With otlp, start a trace backend first (e.g. 'camel infra run jaeger'). With observability, start the stack via 'camel infra run observability'. The value 'jaeger' is deprecated and works as an alias for 'otlp'.", "defaultValue": "tui", "javaType": "java.lang.String", "type": "string" }, { "names": "--openapi-ui", "description": "Swagger UI for REST OpenAPI at \/q\/openapi (OpenAPI document at \/q\/openapi.json; port 8080 by default)", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--package-scan-jars", "description": "Whether to automatic package scan JARs for custom Spring or Quarkus beans making them available for Camel CLI", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--port", "description": "Embeds a local HTTP server on this port (port 8080 by default; use 0 to dynamic assign a free random port number)", "javaType": "int", "type": "integer" }, { "names": "--profile", "description": "Profile to run (dev, test, prod).", "defaultValue": "dev", "javaType": "java.lang.String", "type": "string" }, { "names": "--prompt", "description": "Allow user to type in required parameters in prompt if not present in application", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--prop,--property", "description": "Additional properties (override existing)", "javaType": "java.lang.String[]", "type": "array" }, { "names": "--properties", "description": "comma separated list of properties file (ex. \/path\/to\/file.properties,\/path\/to\/other.properties", "javaType": "java.lang.String", "type": "string" }, { "names": "--quarkus-artifact-id", "description": "Deprecated. This value is not used anymore. It is kept only for backwards compatibility and will be removed in Camel 5.x. Camel commands may use either 'quarkus-bom' or 'quarkus-camel-bom' artifactIds depending on the context.", "defaultValue": "quarkus-bom", "javaType": "java.lang.String", "type": "string", "deprecated": true }, { "names": "--quarkus-ext-registry", "description": "The base URI of Quarkus Extension Registry. The default is https:\/\/registry.quarkus.io unless camel.jbang.quarkus.platform.url system property is set (the \"\/client\/platforms\" suffix is removed if present).", "javaType": "java.lang.String", "type": "string" }, { "names": "--quarkus-group-id", "description": "groupId of Quarkus Platform BOM; honored only if --quarkus-version is set", "defaultValue": "io.quarkus.platform", "javaType": "java.lang.String", "type": "string" }, { "names": "--quarkus-version", "description": "version of Quarkus Platform BOM; the default value is looked up in Quarkus Extension Registry", "javaType": "java.lang.String", "type": "string" }, { "names": "--reload,--dev", "description": "Enables dev mode (live reload when source files are updated and saved)", "javaType": "boolean", "type": "boolean" }, { "names": "--repo,--repos", "description": "Additional maven repositories for download on-demand (Use commas to separate multiple repositories)", "javaType": "java.lang.String", "type": "string" }, { "names": "--resource-dir,--resource-dirs", "description": "Additional resource directories to include on the classpath (recursive, preserving structure)", "javaType": "java.util.List", "type": "array" }, { "names": "--runtime", "description": "Runtime (jbang, camel-main, spring-boot, quarkus). The jbang runtime runs in-process in the Camel CLI JVM which is fast and intended for prototyping. The other runtimes export to a temporary project and run in a separate JVM via Maven, similar to a production deployment.", "defaultValue": "jbang", "javaType": "org.apache.camel.dsl.jbang.run.common.RuntimeType", "type": "object" }, { "names": "--skip-plugins", "description": "Skip resolving plugin dependencies", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--source-dir", "description": "Source directory for dynamically loading Camel file(s) to run. When using this, then files cannot be specified at the same time.", "javaType": "java.lang.String", "type": "string" }, { "names": "--spring-boot-version", "description": "Spring Boot version", "defaultValue": "4.1.2", "javaType": "java.lang.String", "type": "string" }, { "names": "--stub", "description": "Stubs all the matching endpoint uri with the given component name or pattern. Multiple names can be separated by comma. (all = stub all endpoints, remote = stub only remote components).", "javaType": "java.lang.String", "type": "string" }, { "names": "--trace", "description": "Enables trace logging of the routed messages", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--verbose", "description": "Verbose output of startup activity (dependency resolution and downloading", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "-h,--help", "description": "Display the help and sub-commands", "javaType": "boolean", "type": "boolean" } ] }, { "name": "sbom", "fullName": "sbom", "description": "Generate a CycloneDX or SPDX SBOM for a specific project", "sourceClass": "org.apache.camel.dsl.jbang.core.commands.SBOMGenerator", "options": [ { "names": "--build-property", "description": "Maven build properties, ex. --build-property=prop1=foo", "javaType": "java.util.List", "type": "array" }, { "names": "--camel-spring-boot-version", "description": "Camel version to use with Spring Boot", "javaType": "java.lang.String", "type": "string" }, { "names": "--camel-version", "description": "To export using a different Camel version than the default version.", "javaType": "java.lang.String", "type": "string" }, { "names": "--camel-wrapper", "description": "Include Camel Wrapper scripts in exported project for version pinning", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--clean-dir", "description": "If exporting to current directory (default) then all existing files are preserved. Enabling this option will force cleaning current directory including all sub dirs (use this with care)", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--console", "description": "Developer console on the local HTTP server (port 8080 by default): \/q\/dev with Camel Main, \/actuator\/camel with Spring Boot, and \/q\/camel\/dev-console with Quarkus. The exported project only has the console with the dev profile.", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--cyclonedx-plugin-version", "description": "The CycloneDX Maven Plugin version", "defaultValue": "2.9.1", "javaType": "java.lang.String", "type": "string" }, { "names": "--dep,--dependency", "description": "Add additional dependencies", "javaType": "java.util.List", "type": "array" }, { "names": "--dir,--directory", "description": "Directory where the project will be exported", "defaultValue": ".", "javaType": "java.lang.String", "type": "string" }, { "names": "--docker", "description": "Include Docker files in exported project", "defaultValue": "true", "javaType": "boolean", "type": "boolean" }, { "names": "--download", "description": "Whether to allow automatic downloading JAR dependencies (over the internet)", "defaultValue": "true", "javaType": "boolean", "type": "boolean" }, { "names": "--dry-run", "description": "Preview export without writing files", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--exclude", "description": "Exclude files by name or pattern", "javaType": "java.util.List", "type": "array" }, { "names": "--fresh", "description": "Make sure we use fresh (i.e. non-cached) resources", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--gav", "description": "The Maven group:artifact:version", "javaType": "java.lang.String", "type": "string" }, { "names": "--groovy-pre-compiled", "description": "Whether to include pre-compiled Groovy classes in the export (only supported with runtime=camel-main)", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--hawtio", "description": "Whether to include Hawtio web console (only available for exporting to Spring Boot or Quarkus)", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--hawtio-version", "description": "Version of the Hawtio web console", "defaultValue": "5.3.0", "javaType": "java.lang.String", "type": "string" }, { "names": "--ignore-loading-error", "description": "Whether to ignore route loading and compilation errors (use this with care!)", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--java-version,--java", "description": "Java version (21, 25)", "defaultValue": "21", "javaType": "java.lang.String", "type": "string" }, { "names": "--kamelets-version", "description": "Apache Camel Kamelets version (auto-detected from classpath if not set)", "javaType": "java.lang.String", "type": "string" }, { "names": "--lazy-bean", "description": "Whether to use lazy bean initialization (can help with complex classloading issues", "defaultValue": "true", "javaType": "boolean", "type": "boolean" }, { "names": "--local-kamelet-dir", "description": "Local directory for loading Kamelets (takes precedence)", "javaType": "java.lang.String", "type": "string" }, { "names": "--logging", "description": "Can be used to turn on logging to console (logs by default to file in \/.camel directory)", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--logging-level", "description": "Logging level (ERROR, WARN, INFO, DEBUG, TRACE)", "defaultValue": "info", "javaType": "java.lang.String", "type": "string" }, { "names": "--main-classname", "description": "The class name of the Camel Main application class", "defaultValue": "CamelApplication", "javaType": "java.lang.String", "type": "string" }, { "names": "--management-port", "description": "To use a dedicated port for HTTP management", "javaType": "int", "type": "integer" }, { "names": "--maven-apache-snapshot-enabled", "description": "Whether downloading JARs from ASF Maven Snapshot repository is enabled", "defaultValue": "true", "javaType": "boolean", "type": "boolean" }, { "names": "--maven-central-enabled", "description": "Whether downloading JARs from Maven Central repository is enabled", "defaultValue": "true", "javaType": "boolean", "type": "boolean" }, { "names": "--maven-settings", "description": "Optional location of Maven settings.xml file to configure servers, repositories, mirrors and proxies. If set to \"false\", not even the default ~\/.m2\/settings.xml will be used.", "javaType": "java.lang.String", "type": "string" }, { "names": "--maven-settings-security", "description": "Optional location of Maven settings-security.xml file to decrypt settings.xml", "javaType": "java.lang.String", "type": "string" }, { "names": "--maven-wrapper", "description": "Include Maven Wrapper files in exported project", "defaultValue": "true", "javaType": "boolean", "type": "boolean" }, { "names": "--name", "description": "The integration name. Use this when the name should not get derived otherwise.", "javaType": "java.lang.String", "type": "string" }, { "names": "--observe", "description": "Enable observability services", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--open-api", "description": "Adds an OpenAPI spec from the given file (json or yaml file)", "javaType": "java.lang.String", "type": "string" }, { "names": "--output-directory", "description": "Directory where the SBOM will be saved", "defaultValue": ".", "javaType": "java.lang.String", "type": "string" }, { "names": "--output-name", "description": "Output name of the SBOM file", "defaultValue": "sbom", "javaType": "java.lang.String", "type": "string" }, { "names": "--package-name", "description": "For Java source files should they have the given package name. By default the package name is computed from the Maven GAV. Use false to turn off and not include package name in the Java source files.", "javaType": "java.lang.String", "type": "string" }, { "names": "--package-scan-jars", "description": "Whether to automatic package scan JARs for custom Spring or Quarkus beans making them available for Camel CLI", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--parent-pom", "description": "The Maven parent POM group:artifact:version", "javaType": "java.lang.String", "type": "string" }, { "names": "--port", "description": "Embeds a local HTTP server on this port", "javaType": "int", "type": "integer" }, { "names": "--profile", "description": "Profile to export (dev, test, prod).", "javaType": "java.lang.String", "type": "string" }, { "names": "--prop,--property", "description": "Camel application properties, ex. --property=prop1=foo", "javaType": "java.lang.String[]", "type": "array" }, { "names": "--quarkus-artifact-id", "description": "Deprecated. This value is not used anymore. It is kept only for backwards compatibility and will be removed in Camel 5.x. Camel commands may use either 'quarkus-bom' or 'quarkus-camel-bom' artifactIds depending on the context.", "defaultValue": "quarkus-bom", "javaType": "java.lang.String", "type": "string", "deprecated": true }, { "names": "--quarkus-ext-registry", "description": "The base URI of Quarkus Extension Registry. The default is https:\/\/registry.quarkus.io unless camel.jbang.quarkus.platform.url system property is set (the \"\/client\/platforms\" suffix is removed if present).", "javaType": "java.lang.String", "type": "string" }, { "names": "--quarkus-group-id", "description": "groupId of Quarkus Platform BOM; honored only if --quarkus-version is set", "defaultValue": "io.quarkus.platform", "javaType": "java.lang.String", "type": "string" }, { "names": "--quarkus-version", "description": "version of Quarkus Platform BOM; the default value is looked up in Quarkus Extension Registry", "javaType": "java.lang.String", "type": "string" }, { "names": "--quiet", "description": "Will be quiet, only print when error occurs", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--repo,--repos", "description": "Additional maven repositories for download on-demand (Use commas to separate multiple repositories)", "javaType": "java.lang.String", "type": "string" }, { "names": "--resource-dir,--resource-dirs", "description": "Additional resource directories to include in src\/main\/resources (recursive, preserving structure)", "javaType": "java.util.List", "type": "array" }, { "names": "--runtime", "description": "Runtime (camel-main, spring-boot, quarkus)", "javaType": "org.apache.camel.dsl.jbang.run.common.RuntimeType", "type": "object" }, { "names": "--sbom-format", "description": "The SBOM format, possible values are cyclonedx or spdx", "defaultValue": "cyclonedx", "javaType": "java.lang.String", "type": "string" }, { "names": "--sbom-output-format", "description": "The SBOM output format, possible values are json or xml", "defaultValue": "json", "javaType": "java.lang.String", "type": "string" }, { "names": "--skip-plugins", "description": "Skip plugins during export", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--spdx-plugin-version", "description": "The SPDX Maven Plugin version", "defaultValue": "0.7.4", "javaType": "java.lang.String", "type": "string" }, { "names": "--spring-boot-version", "description": "Spring Boot version", "defaultValue": "4.1.2", "javaType": "java.lang.String", "type": "string" }, { "names": "--verbose", "description": "Verbose output of startup activity (dependency resolution and downloading", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--yes,-y", "description": "Automatically answer yes to confirmation prompts (e.g. when using --clean-dir)", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "-h,--help", "description": "Display the help and sub-commands", "javaType": "boolean", "type": "boolean" } ] }, { "name": "script", "fullName": "script", "description": "Run Camel integration as shell script for terminal scripting", "sourceClass": "org.apache.camel.dsl.jbang.core.commands.Script", "options": [ { "names": "--logging", "description": "Can be used to turn on logging (logs to file in \/.camel directory)", "defaultValue": "false", "javaType": "boolean", "type": "boolean" }, { "names": "--logging-level", "description": "Logging level (ERROR, WARN, INFO, DEBUG, TRACE)", "defaultValue": "info", "javaType": "java.lang.String", "type": "string" }, { "names": "--max-idle-seconds", "description": "For how long time in seconds Camel can be idle before stopping", "defaultValue": "1", "javaType": "int", "type": "integer" }, { "names": "--max-messages", "description": "Max number of messages to process before stopping", "defaultValue": "0", "javaType": "int", "type": "integer" }, { "names": "--max-seconds", "description": "Max seconds to run before stopping", "defaultValue": "0", "javaType": "int", "type": "integer" }, { "names": "--prop,--property", "description": "Additional properties (override existing)", "javaType": "java.lang.String[]", "type": "array" }, { "names": "--properties", "description": "Load properties file for route placeholders (ex. \/path\/to\/file.properties", "javaType": "java.lang.String", "type": "string" }, { "names": "-h,--help", "description": "Display the help and sub-commands", "javaType": "boolean", "type": "boolean" } ] }, { "name": "semantic", "fullName": "semantic", "description": "List semantic definitions and expert contracts", "sourceClass": "org.apache.camel.dsl.jbang.core.commands.action.CamelSemantic", "options": [ { "names": "--expert", "description": "Show the operations and parameter contract of this expert", "javaType": "java.lang.String", "type": "string" }, { "names": "--json", "description": "Output a single JSON document", "javaType": "boolean", "type": "boolean" }, { "names": "--timeout", "description": "Timeout waiting for the integration, in millis or as a duration such as 30s", "defaultValue": "60000", "javaType": "long", "type": "integer" }, { "names": "-h,--help", "description": "Display the help and sub-commands", "javaType": "boolean", "type": "boolean" } ], "subcommands": [ { "name": "audit", "fullName": "semantic audit", "description": "Retrieve retained expert evaluations and related lifecycle records", "sourceClass": "org.apache.camel.dsl.jbang.core.commands.action.SemanticAudit", "options": [ { "names": "--breadcrumb-id", "description": "Filter by Camel breadcrumb ID", "javaType": "java.lang.String", "type": "string" }, { "names": "--case-event-id", "description": "Retrieve a source-local case anchored at this event", "javaType": "java.lang.String", "type": "string" }, { "names": "--category", "description": "Filter by record category: evaluation or request", "javaType": "java.lang.String", "type": "string" }, { "names": "--cursor", "description": "Opaque cursor for an older page; retain the original filters", "javaType": "java.lang.String", "type": "string" }, { "names": "--definition", "description": "Filter by recorded definition name", "javaType": "java.lang.String", "type": "string" }, { "names": "--event-id", "description": "Retrieve one recorded event instead of a page", "javaType": "java.lang.String", "type": "string" }, { "names": "--event-ids", "description": "Export these event IDs; at most 1000", "javaType": "java.util.List", "type": "array" }, { "names": "--exchange-id", "description": "Filter by recorded exchange ID, when supported", "javaType": "java.lang.String", "type": "string" }, { "names": "--executing-route-id", "description": "Filter by executing route ID, when supported", "javaType": "java.lang.String", "type": "string" }, { "names": "--expert", "description": "Filter by expert bean reference", "javaType": "java.lang.String", "type": "string" }, { "names": "--include-input", "description": "Include untrusted captured input in an explicit case\/export", "javaType": "boolean", "type": "boolean" }, { "names": "--json", "description": "Output a single JSON document", "javaType": "boolean", "type": "boolean" }, { "names": "--limit", "description": "Maximum records per page (1-200)", "defaultValue": "50", "javaType": "int", "type": "integer" }, { "names": "--max-records", "description": "Case\/export retrieval budget (1-1000)", "defaultValue": "200", "javaType": "int", "type": "integer" }, { "names": "--operation", "description": "Filter by recorded expert operation", "javaType": "java.lang.String", "type": "string" }, { "names": "--output", "description": "Write the full JSON response to a new file, including requested captured image data", "javaType": "java.nio.file.Path", "type": "object" }, { "names": "--result-label", "description": "Exact Classification member; requires --result-type=CLASSIFICATION", "javaType": "java.lang.String", "type": "string" }, { "names": "--result-type", "description": "Captured result type: BOOLEAN, CHOICE, SCORE or CLASSIFICATION", "javaType": "java.lang.String", "type": "string" }, { "names": "--result-value", "description": "Exact Boolean, Choice or numeric Score value; requires --result-type", "javaType": "java.lang.String", "type": "string" }, { "names": "--route-id", "description": "Filter by entry route ID", "javaType": "java.lang.String", "type": "string" }, { "names": "--score-max", "description": "Inclusive numeric upper bound; requires --result-type=SCORE", "javaType": "java.lang.String", "type": "string" }, { "names": "--score-min", "description": "Inclusive numeric lower bound; requires --result-type=SCORE", "javaType": "java.lang.String", "type": "string" }, { "names": "--since", "description": "Earliest timestamp, inclusive, in ISO-8601 format with a UTC offset", "javaType": "java.lang.String", "type": "string" }, { "names": "--timeout", "description": "Timeout waiting for the integration, in millis or as a duration such as 30s", "defaultValue": "60000", "javaType": "long", "type": "integer" }, { "names": "--until", "description": "Latest timestamp, exclusive, in ISO-8601 format with a UTC offset", "javaType": "java.lang.String", "type": "string" }, { "names": "-h,--help", "description": "Display the help and sub-commands", "javaType": "boolean", "type": "boolean" } ] }, { "name": "eval", "fullName": "semantic eval", "description": "Evaluate a semantic definition or expert operation", "sourceClass": "org.apache.camel.dsl.jbang.core.commands.action.SemanticEvaluate", "options": [ { "names": "--body", "description": "Sample body (text, file:path, image:path or json:value)", "javaType": "java.lang.String", "type": "string" }, { "names": "--evaluation", "description": "Named semantic definition to evaluate", "javaType": "java.lang.String", "type": "string" }, { "names": "--evaluation-timeout", "description": "Provider evaluation timeout in milliseconds (1-50000)", "defaultValue": "50000", "javaType": "long", "type": "integer" }, { "names": "--expert", "description": "Expert to call directly", "javaType": "java.lang.String", "type": "string" }, { "names": "--header", "description": "Sample header (key=value; use json: for a typed value)", "javaType": "java.util.List", "type": "array" }, { "names": "--input", "description": "Direct input (text, file:path, image:path or json:value)", "javaType": "java.lang.String", "type": "string" }, { "names": "--json", "description": "Output a single JSON document", "javaType": "boolean", "type": "boolean" }, { "names": "--operation", "description": "Expert operation to call directly", "javaType": "java.lang.String", "type": "string" }, { "names": "--parameter", "description": "Expert parameter (key=value; use json: for a typed value)", "javaType": "java.util.List", "type": "array" }, { "names": "--timeout", "description": "Timeout waiting for the integration, in millis or as a duration such as 30s", "defaultValue": "60000", "javaType": "long", "type": "integer" }, { "names": "--variable", "description": "Sample exchange-local variable (key=value; use json: for a typed value)", "javaType": "java.util.List", "type": "array" }, { "names": "-h,--help", "description": "Display the help and sub-commands", "javaType": "boolean", "type": "boolean" } ] }, { "name": "get", "fullName": "semantic get", "description": "List semantic definitions and expert contracts", "sourceClass": "org.apache.camel.dsl.jbang.core.commands.action.SemanticGet", "options": [ { "names": "--expert", "description": "Show the operations and parameter contract of this expert", "javaType": "java.lang.String", "type": "string" }, { "names": "--json", "description": "Output a single JSON document", "javaType": "boolean", "type": "boolean" }, { "names": "--timeout", "description": "Timeout waiting for the integration, in millis or as a duration such as 30s", "defaultValue": "60000", "javaType": "long", "type": "integer" }, { "names": "-h,--help", "description": "Display the help and sub-commands", "javaType": "boolean", "type": "boolean" } ] }, { "name": "monitoring", "fullName": "semantic monitoring", "description": "Read current semantic measurements", "sourceClass": "org.apache.camel.dsl.jbang.core.commands.action.SemanticMonitoring", "options": [ { "names": "--json", "description": "Output a single JSON document", "javaType": "boolean", "type": "boolean" }, { "names": "--source", "description": "Producer or configured metric source name", "javaType": "java.lang.String", "type": "string" }, { "names": "--timeout", "description": "Timeout waiting for the integration, in millis or as a duration such as 30s", "defaultValue": "60000", "javaType": "long", "type": "integer" }, { "names": "-h,--help", "description": "Display the help and sub-commands", "javaType": "boolean", "type": "boolean" } ] } ] }, diff --git a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/Run.java b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/Run.java index 1e1a83476bad2..acbee92ea3b47 100644 --- a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/Run.java +++ b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/Run.java @@ -274,7 +274,7 @@ public class Run extends CamelCommand { @Option(names = { "--chaos" }, defaultValue = "false", arity = "0..1", paramLabel = "", parameterConsumer = ChaosConsumer.class, description = "Add camel-chaos, to turn on faults while running (camel cmd chaos-add); on with profile dev," - + " never with prod. With a scenario file (such as --chaos=chaos/outage.chaos) its rules are" + + " never with prod. With a scenario file (such as --chaos=test/chaos/outage.chaos) its rules are" + " added at startup. A run with chaos ends with exit code 1 when the chaos verdict is FAIL." + " With Quarkus it needs Camel Quarkus on Camel 4.24 or newer") boolean chaos; diff --git a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/action/CamelChaosLoadAction.java b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/action/CamelChaosLoadAction.java index 40bf8684ffec1..9c8b2df4659f4 100644 --- a/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/action/CamelChaosLoadAction.java +++ b/dsl/camel-jbang/camel-jbang-core/src/main/java/org/apache/camel/dsl/jbang/core/commands/action/CamelChaosLoadAction.java @@ -30,22 +30,22 @@ description = "Load a chaos scenario into a running integration (camel-chaos, for development only)", sortOptions = false, showDefaultValues = true, footer = { - "%nA scenario is a file of the project, such as chaos/outage.chaos, with one rule", - "per line, # comments and an optional seed= line, which makes it fail the same", - "messages each time. The phases of an experiment come from from= and until= of", - "its rules. Loading it removes the rules there are and starts a new report, then", - "adds the rules of the scenario, all or none: a line that is not valid is refused", - "with its line number, and the rules there are stay.", - "%nTo start with a scenario: camel run --chaos=chaos/outage.chaos", + "%nA scenario is a file of the project, such as test/chaos/outage.chaos, with one", + "rule per line, # comments and an optional seed= line, which makes it fail the", + "same messages each time. The phases of an experiment come from from= and until=", + "of its rules. Loading it removes the rules there are and starts a new report,", + "then adds the rules of the scenario, all or none: a line that is not valid is", + "refused with its line number, and the rules there are stay.", + "%nTo start with a scenario: camel run --chaos=test/chaos/outage.chaos", "%nWithout a name or pid, the scenario goes to the only integration that runs, or", "the only one with chaos switched on; when that is not clear, the command fails", "with the list of the running integrations (exit code 2).", "%nExamples:", - " camel cmd chaos-load chaos/outage.chaos", - " camel cmd chaos-load chaos/outage.chaos myApp" }) + " camel cmd chaos-load test/chaos/outage.chaos", + " camel cmd chaos-load test/chaos/outage.chaos myApp" }) public class CamelChaosLoadAction extends CamelChaosAction { - @CommandLine.Parameters(index = "0", description = "The scenario file, such as chaos/outage.chaos") + @CommandLine.Parameters(index = "0", description = "The scenario file, such as test/chaos/outage.chaos") Path file; @CommandLine.Parameters(index = "1", arity = "0..1", diff --git a/dsl/camel-jbang/camel-jbang-core/src/test/java/org/apache/camel/dsl/jbang/core/commands/RunTest.java b/dsl/camel-jbang/camel-jbang-core/src/test/java/org/apache/camel/dsl/jbang/core/commands/RunTest.java index bdef004042aff..dfdcbde8d60f1 100644 --- a/dsl/camel-jbang/camel-jbang-core/src/test/java/org/apache/camel/dsl/jbang/core/commands/RunTest.java +++ b/dsl/camel-jbang/camel-jbang-core/src/test/java/org/apache/camel/dsl/jbang/core/commands/RunTest.java @@ -293,11 +293,11 @@ void chaosWithAScenarioFileOrAFileToRun(@TempDir Path dir) throws Exception { assertThat(command.files).containsExactly("route.yaml"); for (String[] args : new String[][] { - { "--chaos=chaos/outage.chaos", "route.yaml" }, { "--chaos", "chaos/outage.chaos", "route.yaml" } }) { + { "--chaos=test/chaos/outage.chaos", "route.yaml" }, { "--chaos", "test/chaos/outage.chaos", "route.yaml" } }) { command = new Run(new CamelJBangMain()); CommandLineTestHelper.parse(command, args); assertThat(command.chaos).isTrue(); - assertThat(command.chaosScenario).isEqualTo("chaos/outage.chaos"); + assertThat(command.chaosScenario).isEqualTo("test/chaos/outage.chaos"); assertThat(command.files).containsExactly("route.yaml"); } diff --git a/dsl/camel-jbang/camel-jbang-core/src/test/resources/golden/cli-help.txt b/dsl/camel-jbang/camel-jbang-core/src/test/resources/golden/cli-help.txt index b10c2dcffd8c2..9d39b0ff31d1b 100644 --- a/dsl/camel-jbang/camel-jbang-core/src/test/resources/golden/cli-help.txt +++ b/dsl/camel-jbang/camel-jbang-core/src/test/resources/golden/cli-help.txt @@ -745,7 +745,7 @@ Examples: Usage: camel cmd chaos-load [-h] [--timeout=] [] Load a chaos scenario into a running integration (camel-chaos, for development only) - The scenario file, such as chaos/outage.chaos + The scenario file, such as test/chaos/outage.chaos [] Name or pid of the running Camel integration (must match one); without it, the only one running, or the only one with chaos switched on @@ -754,22 +754,22 @@ only) millis or as a duration such as 30s Default: 10000 -A scenario is a file of the project, such as chaos/outage.chaos, with one rule -per line, # comments and an optional seed= line, which makes it fail the same -messages each time. The phases of an experiment come from from= and until= of -its rules. Loading it removes the rules there are and starts a new report, then -adds the rules of the scenario, all or none: a line that is not valid is refused -with its line number, and the rules there are stay. +A scenario is a file of the project, such as test/chaos/outage.chaos, with one +rule per line, # comments and an optional seed= line, which makes it fail the +same messages each time. The phases of an experiment come from from= and until= +of its rules. Loading it removes the rules there are and starts a new report, +then adds the rules of the scenario, all or none: a line that is not valid is +refused with its line number, and the rules there are stay. -To start with a scenario: camel run --chaos=chaos/outage.chaos +To start with a scenario: camel run --chaos=test/chaos/outage.chaos Without a name or pid, the scenario goes to the only integration that runs, or the only one with chaos switched on; when that is not clear, the command fails with the list of the running integrations (exit code 2). Examples: - camel cmd chaos-load chaos/outage.chaos - camel cmd chaos-load chaos/outage.chaos myApp + camel cmd chaos-load test/chaos/outage.chaos + camel cmd chaos-load test/chaos/outage.chaos myApp == camel cmd chaos-remove --help Usage: camel cmd chaos-remove [-h] --id= [--timeout=] [] @@ -1889,10 +1889,11 @@ Debug local Camel integration --chaos[=] Add camel-chaos, to turn on faults while running (camel cmd chaos-add); on with profile dev, never with prod. With a scenario file (such as - --chaos=chaos/outage.chaos) its rules are added - at startup. A run with chaos ends with exit code - 1 when the chaos verdict is FAIL. With Quarkus - it needs Camel Quarkus on Camel 4.24 or newer + --chaos=test/chaos/outage.chaos) its rules are + added at startup. A run with chaos ends with + exit code 1 when the chaos verdict is FAIL. With + Quarkus it needs Camel Quarkus on Camel 4.24 or + newer --chaos-report= Write the chaos report as JSON to this file when the run ends (with --chaos) --local-kamelet-dir= @@ -2878,10 +2879,11 @@ Run in dev mode with live reload --chaos[=] Add camel-chaos, to turn on faults while running (camel cmd chaos-add); on with profile dev, never with prod. With a scenario file (such as - --chaos=chaos/outage.chaos) its rules are added - at startup. A run with chaos ends with exit code - 1 when the chaos verdict is FAIL. With Quarkus - it needs Camel Quarkus on Camel 4.24 or newer + --chaos=test/chaos/outage.chaos) its rules are + added at startup. A run with chaos ends with + exit code 1 when the chaos verdict is FAIL. With + Quarkus it needs Camel Quarkus on Camel 4.24 or + newer --chaos-report= Write the chaos report as JSON to this file when the run ends (with --chaos) --local-kamelet-dir= @@ -5030,10 +5032,11 @@ Run as local Camel integration --chaos[=] Add camel-chaos, to turn on faults while running (camel cmd chaos-add); on with profile dev, never with prod. With a scenario file (such as - --chaos=chaos/outage.chaos) its rules are added - at startup. A run with chaos ends with exit code - 1 when the chaos verdict is FAIL. With Quarkus - it needs Camel Quarkus on Camel 4.24 or newer + --chaos=test/chaos/outage.chaos) its rules are + added at startup. A run with chaos ends with + exit code 1 when the chaos verdict is FAIL. With + Quarkus it needs Camel Quarkus on Camel 4.24 or + newer --chaos-report= Write the chaos report as JSON to this file when the run ends (with --chaos) --local-kamelet-dir= diff --git a/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/ChaosAiPrompt.java b/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/ChaosAiPrompt.java index c1981efc810ee..c4d68d4d3d9e0 100644 --- a/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/ChaosAiPrompt.java +++ b/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/ChaosAiPrompt.java @@ -89,13 +89,13 @@ static String ofTest(IntegrationInfo info, ChaosInfo.Rule rule) { .append("\", Duration.ofSeconds(10)) and assertVerdict(context, ChaosReport.PASS, Duration.ofSeconds(10))."); } else { sb.append("The integration runs with camel run, without a Maven project, so the test is a scenario with an") - .append(" expectation, and a run whose exit code is the verdict. Write the scenario chaos/") + .append(" expectation, and a run whose exit code is the verdict. Write the scenario test/chaos/") .append(rule.id).append("-test.chaos: a comment line that says in words what it tests (not the rule") .append(" again), seed=").append(seed).append(", and the rule as the line ").append(replay) .append(" (draw=").append(rule.id).append(" makes it fail the same messages as rule ").append(rule.id) .append(" did). ").append(expectation) .append(" Then give the command that runs it, with --max-seconds longer than the within= of the") - .append(" expectation: camel run * --chaos=chaos/").append(rule.id) + .append(" expectation: camel run * --chaos=test/chaos/").append(rule.id) .append("-test.chaos --max-seconds= --chaos-report=target/chaos-report.json. It ends with exit") .append(" code 1 when the verdict is FAIL, so it can run in a pipeline."); } diff --git a/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/ChaosControl.java b/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/ChaosControl.java index 5c16edf51368f..46bdcf3961082 100644 --- a/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/ChaosControl.java +++ b/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/ChaosControl.java @@ -612,7 +612,7 @@ void render(Frame frame, Rect area) { "the order route fails 5% of the time, or when the country is Spain"); } else if (command == Command.SAVE) { DialogHelper.renderInputDialog(frame, area, "Save the chaos rules of " + name + " as a scenario", - input, "chaos/outage.chaos (in the folder of the integration)"); + input, "test/chaos/outage.chaos (in the folder of the integration)"); } else { DialogHelper.renderInputDialog(frame, area, command == Command.CHANGE ? "Change chaos rule " + id : "Add a chaos rule to " + name, input, diff --git a/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/ChaosScenarioFile.java b/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/ChaosScenarioFile.java index 9dc82632c733a..e4a8f2072a65d 100644 --- a/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/ChaosScenarioFile.java +++ b/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/ChaosScenarioFile.java @@ -22,7 +22,7 @@ /** * The rules of the chaos screen saved as a scenario (CAMEL-26722): a file of the project, such as - * {@code chaos/orders.chaos}, with one rule per line and the seed, which {@code camel cmd chaos-load} and + * {@code test/chaos/orders.chaos}, with one rule per line and the seed, which {@code camel cmd chaos-load} and * {@code camel run --chaos=} read. */ final class ChaosScenarioFile { @@ -34,10 +34,10 @@ final class ChaosScenarioFile { private ChaosScenarioFile() { } - /** The file offered for an integration: {@code chaos/.chaos}. */ + /** The file offered for an integration: {@code test/chaos/.chaos}. */ static String defaultPath(IntegrationInfo info) { String name = info.name != null ? info.name.replaceAll("[^A-Za-z0-9._-]", "-") : ""; - return "chaos/" + (name.isBlank() ? "scenario" : name) + EXTENSION; + return "test/chaos/" + (name.isBlank() ? "scenario" : name) + EXTENSION; } /** diff --git a/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/resources/tui/help/chaos.md b/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/resources/tui/help/chaos.md index 6f9331442905f..3d383ece17707 100644 --- a/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/resources/tui/help/chaos.md +++ b/dsl/camel-jbang/camel-jbang-plugin-tui/src/main/resources/tui/help/chaos.md @@ -12,12 +12,12 @@ remove rules on this screen (see Keys below), or with the Camel CLI: camel cmd chaos-add myapp --rule='endpoint=http:stock* error status=503 rate=0.25 until=10m' camel cmd chaos-remove myapp --id=r1 camel cmd chaos-clear myapp --reset -camel cmd chaos-load chaos/outage.chaos myapp +camel cmd chaos-load test/chaos/outage.chaos myapp ``` -A scenario (`chaos/outage.chaos`) keeps the rules of an experiment in +A scenario (`test/chaos/outage.chaos`) keeps the rules of an experiment in the project: one rule per line, `#` comments and a `seed=` line. -`camel run --chaos=chaos/outage.chaos` starts with one, and +`camel run --chaos=test/chaos/outage.chaos` starts with one, and `chaos-load` loads one into a running integration (a new report). While a rule injects faults, the title bar shows a badge on every @@ -85,16 +85,16 @@ error handler (HAND) and the redeliveries (REDEL). - **c** — Clear: remove all rules (the report keeps what they did) - **R** — A new experiment: no rules and a new report, with the same seed - **s** — Save the rules as a scenario: a file of the integration's - folder, `chaos/.chaos` unless you type another, with the seed and + folder, `test/chaos/.chaos` unless you type another, with the seed and one rule per line. Load it again with `camel cmd chaos-load`, or start - with it: `camel run --chaos=chaos/.chaos`. A file that is there + with it: `camel run --chaos=test/chaos/.chaos`. A file that is there already is replaced only when you say yes - **t** — Make a test of the selected rule with AI, so the finding runs again with the same faults: the AI panel opens with a question with the rule, the seed and what it did. For a Maven project the AI writes a JUnit test with chaos switched on and `ChaosAssertions`; for a folder that runs with `camel run` it writes a scenario with an expectation - (`chaos/r1-test.chaos`) and gives the `camel run --chaos=... + (`test/chaos/r1-test.chaos`) and gives the `camel run --chaos=... --max-seconds=...` command whose exit code is the verdict. It adds an expectation when the rule has none, and asks before it writes a file - **Shift+F8** — Explain with AI: the AI panel opens with a question about diff --git a/dsl/camel-jbang/camel-jbang-plugin-tui/src/test/java/org/apache/camel/dsl/jbang/core/commands/tui/ChaosAiPromptTest.java b/dsl/camel-jbang/camel-jbang-plugin-tui/src/test/java/org/apache/camel/dsl/jbang/core/commands/tui/ChaosAiPromptTest.java index 824dd02fa8d1a..5dda37d53ac4e 100644 --- a/dsl/camel-jbang/camel-jbang-plugin-tui/src/test/java/org/apache/camel/dsl/jbang/core/commands/tui/ChaosAiPromptTest.java +++ b/dsl/camel-jbang/camel-jbang-plugin-tui/src/test/java/org/apache/camel/dsl/jbang/core/commands/tui/ChaosAiPromptTest.java @@ -290,12 +290,12 @@ void aTestOfARuleForACamelRunFolderIsAScenarioAndTheRun(@TempDir Path dir) throw String question = ChaosAiPrompt.ofTest(info, rule); assertThat(question).contains("runs with camel run, without a Maven project") - .contains("Write the scenario chaos/r1-test.chaos").contains("seed=42") + .contains("Write the scenario test/chaos/r1-test.chaos").contains("seed=42") .contains("says in words what it tests (not the rule again)") .contains("the rule as the line endpoint=http://localhost:8765/stock* error status=503 rate=0.2" + " expect=orders:handled<=0 draw=r1") .contains("The rule has no expectation (expect=): add one") - .contains("camel run * --chaos=chaos/r1-test.chaos --max-seconds=") + .contains("camel run * --chaos=test/chaos/r1-test.chaos --max-seconds=") .doesNotContain("JUnit"); } diff --git a/dsl/camel-jbang/camel-jbang-plugin-tui/src/test/java/org/apache/camel/dsl/jbang/core/commands/tui/ChaosControlTest.java b/dsl/camel-jbang/camel-jbang-plugin-tui/src/test/java/org/apache/camel/dsl/jbang/core/commands/tui/ChaosControlTest.java index c58f9cf23b0a4..549ad0b6108f6 100644 --- a/dsl/camel-jbang/camel-jbang-plugin-tui/src/test/java/org/apache/camel/dsl/jbang/core/commands/tui/ChaosControlTest.java +++ b/dsl/camel-jbang/camel-jbang-plugin-tui/src/test/java/org/apache/camel/dsl/jbang/core/commands/tui/ChaosControlTest.java @@ -269,16 +269,16 @@ void saveTheRulesAsAScenarioOfTheProject(@TempDir Path dir) throws Exception { info.directory = dir.toString(); key('s'); assertThat(TuiTestHelper.renderToString(tab, 160, 40)).contains("Save the chaos rules of chaosdemo as a scenario") - .contains("chaos/chaosdemo.chaos"); + .contains("test/chaos/chaosdemo.chaos"); enter(); // a new file is written at once, and nothing goes to the integration - Path file = dir.resolve("chaos/chaosdemo.chaos"); + Path file = dir.resolve("test/chaos/chaosdemo.chaos"); assertThat(Files.readString(file)).contains("seed=42\nendpoint=http:stock* error status=503\n") - .contains("# camel cmd chaos-load chaos/chaosdemo.chaos, or camel run --chaos=chaos/chaosdemo.chaos"); + .contains("# camel cmd chaos-load test/chaos/chaosdemo.chaos, or camel run --chaos=test/chaos/chaosdemo.chaos"); assertThat(requests).isEmpty(); assertThat(notifications).containsExactly( - "Saved 1 chaos rule to chaos/chaosdemo.chaos (camel cmd chaos-load chaos/chaosdemo.chaos)"); + "Saved 1 chaos rule to test/chaos/chaosdemo.chaos (camel cmd chaos-load test/chaos/chaosdemo.chaos)"); // a file that is there is replaced only after the question key('s'); @@ -286,30 +286,30 @@ void saveTheRulesAsAScenarioOfTheProject(@TempDir Path dir) throws Exception { tab.handleKeyEvent(KeyEvent.ofKey(KeyCode.BACKSPACE, KeyModifiers.NONE)); } type("outage"); - Files.writeString(dir.resolve("chaos/outage.chaos"), "endpoint=mock:x drop\n"); + Files.writeString(dir.resolve("test/chaos/outage.chaos"), "endpoint=mock:x drop\n"); enter(); assertThat(tab.isConfirming()).isTrue(); assertThat(TuiTestHelper.renderToString(tab, 160, 40)) - .contains("chaos/outage.chaos is there already: replace it with the rules of chaosdemo?"); + .contains("test/chaos/outage.chaos is there already: replace it with the rules of chaosdemo?"); tab.handleKeyEvent(KeyEvent.ofKey(KeyCode.ESCAPE, KeyModifiers.NONE)); - assertThat(Files.readString(dir.resolve("chaos/outage.chaos"))).isEqualTo("endpoint=mock:x drop\n"); + assertThat(Files.readString(dir.resolve("test/chaos/outage.chaos"))).isEqualTo("endpoint=mock:x drop\n"); } @Test void aScenarioIsTheSeedAndTheRules() { - String text = ChaosScenarioFile.text(info, info.chaos, "chaos/x.chaos", LocalDateTime.of(2026, 11, 7, 22, 40)); + String text = ChaosScenarioFile.text(info, info.chaos, "test/chaos/x.chaos", LocalDateTime.of(2026, 11, 7, 22, 40)); assertThat(text).isEqualTo(""" # Chaos rules of chaosdemo, saved on 2026-11-07 22:40 - # camel cmd chaos-load chaos/x.chaos, or camel run --chaos=chaos/x.chaos + # camel cmd chaos-load test/chaos/x.chaos, or camel run --chaos=test/chaos/x.chaos # the times of from= and until= count from when the scenario is loaded seed=42 endpoint=http:stock* error status=503 """); - assertThat(ChaosScenarioFile.resolve(info, "chaos/x")).isNull(); + assertThat(ChaosScenarioFile.resolve(info, "test/chaos/x")).isNull(); info.directory = "/work/shop"; - assertThat(ChaosScenarioFile.resolve(info, "chaos/x")).isEqualTo(Path.of("/work/shop/chaos/x.chaos")); + assertThat(ChaosScenarioFile.resolve(info, "test/chaos/x")).isEqualTo(Path.of("/work/shop/test/chaos/x.chaos")); info.name = "my app"; - assertThat(ChaosScenarioFile.defaultPath(info)).isEqualTo("chaos/my-app.chaos"); + assertThat(ChaosScenarioFile.defaultPath(info)).isEqualTo("test/chaos/my-app.chaos"); } @Test diff --git a/dsl/camel-jbang/camel-jbang-run/src/main/java/org/apache/camel/dsl/jbang/run/RunFiles.java b/dsl/camel-jbang/camel-jbang-run/src/main/java/org/apache/camel/dsl/jbang/run/RunFiles.java index 5f7b89ce23465..86f4b3a30c576 100644 --- a/dsl/camel-jbang/camel-jbang-run/src/main/java/org/apache/camel/dsl/jbang/run/RunFiles.java +++ b/dsl/camel-jbang/camel-jbang-run/src/main/java/org/apache/camel/dsl/jbang/run/RunFiles.java @@ -48,11 +48,16 @@ public final class RunFiles { /** - * The extension of a chaos scenario (camel run --chaos=chaos/outage.chaos), which is not a file to run or to + * The extension of a chaos scenario (camel run --chaos=test/chaos/outage.chaos), which is not a file to run or to * export. */ public static final String CHAOS_SCENARIO = ".chaos"; + /** + * The folder of the chaos scenarios in the test folder of a project (test/chaos), which holds no routes. + */ + public static final String CHAOS_FOLDER = "chaos"; + private static final String[] ACCEPTED_XML_ROOT_ELEMENT_NAMES = new String[] { "route", "routes", "routeTemplate", "routeTemplates", @@ -274,8 +279,8 @@ public static boolean isCitrusTest(Path file) { /** * The Citrus tests of a folder that holds nothing else camel run would load, such as the test folder of a project. * Empty when the folder holds no Citrus test, or a route or another source, a Camel application.properties, or a - * subfolder (which can hold routes). Hidden files, data files and the other properties files, such as - * citrus-application.properties, do not count. + * subfolder (which can hold routes). Hidden files, data files, the other properties files, such as + * citrus-application.properties, and the chaos folder with the chaos scenarios (test/chaos) do not count. * * @param dir the folder to run (camel run test/, or --source-dir) */ @@ -293,6 +298,9 @@ public static List citrusTestsOnly(Path dir) { continue; } if (Files.isDirectory(entry)) { + if (CHAOS_FOLDER.equals(name)) { + continue; + } return List.of(); } if (isCitrusTest(entry)) { diff --git a/dsl/camel-jbang/camel-jbang-run/src/test/java/org/apache/camel/dsl/jbang/run/RunFilesTest.java b/dsl/camel-jbang/camel-jbang-run/src/test/java/org/apache/camel/dsl/jbang/run/RunFilesTest.java index 2a6e8bd92670b..df10c0390fba1 100644 --- a/dsl/camel-jbang/camel-jbang-run/src/test/java/org/apache/camel/dsl/jbang/run/RunFilesTest.java +++ b/dsl/camel-jbang/camel-jbang-run/src/test/java/org/apache/camel/dsl/jbang/run/RunFilesTest.java @@ -49,7 +49,7 @@ void aCitrusTestByItsName(String name) { void aChaosScenarioIsNotRunNorExported() { // camel run * and camel export: camel run --chaos=file and camel cmd chaos-load read it assertThat(RunFiles.skipFile("outage.chaos", List.of(), "")).isTrue(); - assertThat(RunFiles.skipFile("chaos/outage.chaos", List.of(), "")).isTrue(); + assertThat(RunFiles.skipFile("test/chaos/outage.chaos", List.of(), "")).isTrue(); assertThat(RunFiles.skipFile("orders.camel.yaml", List.of(), "")).isFalse(); } @@ -110,6 +110,10 @@ void aFolderOfOnlyCitrusTests() throws Exception { Files.writeString(test.resolve("sample-order.json"), "{\"orderId\": \"ORD-1\"}\n"); Files.writeString(test.resolve("compose.yaml"), "services:\n broker:\n image: apache/artemis\n"); Files.writeString(test.resolve(".gitignore"), "target\n"); + // and the chaos scenarios, with the messages a scenario sends + Path chaos = Files.createDirectories(test.resolve("chaos")); + Files.writeString(chaos.resolve("outage.chaos"), "seed=42\nendpoint=http:stock* error status=503\n"); + Files.writeString(Files.createDirectories(chaos.resolve("outage")).resolve("001.yaml"), "orderId: ORD-1\n"); assertThat(RunFiles.citrusTestsOnly(test)).containsExactly(orders, refunds); // a folder that holds what camel run loads: a route, the Camel configuration, or a subfolder