Tools

Camel CLI

qianmoQqianmoQ· 更新于 2026-09-22· 阅读 17 分钟· 0 次阅读

登录后可跨设备保存划线和私人笔记登录

Camel CLI

The Camel CLI is the command-line interface for Apache Camel. It gives you a complete, terminal-native development environment for building integrations — from a first prototype to a production-ready project — without requiring an IDE, a Maven project, or boilerplate code.

Write a route in YAML, Java, or XML. Run it. Debug it. Trace messages flowing through it. Spin up the infrastructure it needs. Export it to Spring Boot or Quarkus when you are ready. All from the terminal.

Why Camel CLI

Zero-to-running in seconds. Create and run an integration in three commands — no project skeleton, no POM file, no IDE. The CLI auto-detects the Camel components your route needs and downloads them on the fly.

Full development lifecycle. The CLI is not just a runner. It includes a built-in route debugger, a message tracer, health checks, metrics, a data-transformation prototyper, and an export command that produces a production-ready Spring Boot or Quarkus project from your prototype files.

Terminal-native and AI-ready. Every capability is a structured CLI command — designed for both human operators and AI coding assistants that work through terminal prompts. The Camel MCP Server exposes the full Camel catalog to AI tools (Claude Code, GitHub Copilot, JetBrains AI, and others), and the Camel TUI provides a visual dashboard in the terminal — useful over SSH, in containers, in CI, or in any environment where a browser is not available.

300+ connectors, one CLI. The entire Apache Camel ecosystem — Kafka, AWS, databases, REST, messaging, files, and hundreds more — is available through a single camel run command. No dependency management required.

Graduated path to production. Start with flat files for fast prototyping. When the integration is ready, use camel export to generate a full Maven project targeting Spring Boot, Quarkus, or standalone Camel Main. Your prototype code becomes your production code.

Quick Start

Install the CLI (requires JBang):

jbang app install camel@apache/camel

Create a route and run it:

camel init hello.yaml
camel run hello.yaml

Run in dev mode with live reload:

camel run hello.yaml --dev
You can also install without JBang using the Camel CLI Launcher.

What Can You Do

AreaWhat it covers
Getting StartedInstallation, shell completion, creating and running your first route.
Installation OptionsVersion-pinned installs, offline-safe setups, container images, installing without JBang.
Running CamelDev mode with hot reload, profiles, properties, dependency management, Kamelets, platform-http, Spring Boot and Quarkus runtimes.
Dev ServicesStart and manage local infrastructure services (databases, message brokers, etc.) for development and testing, powered by Camel test-infra and containers.
Data TransformationTransforming messages with live reload, using expression languages, components, data formats, and converting between route DSL formats.
Development ToolsSending and receiving messages, JDBC configuration, terminal scripting, IDE editing, validate plugin.
AI ToolsAsk questions about running integrations, explain routes, and get security hardening suggestions — powered by local or cloud LLMs.
DebuggingCamel route debugging from the CLI, IDE integration (VSCode, IDEA), Java-level debugging.
Managing IntegrationsListing and stopping processes, route and group control, developer console, message history, log tailing, message tracing, health checks, metrics, circuit breaker status, Jolokia and Hawtio.
Export to MavenExporting to Spring Boot / Quarkus / Camel Main, SBOM generation, plugin management, version management, automated upgrades.
Tips and RecipesRun from GitHub or clipboard, stub components, inline code, interactive prompts, upload via HTTP, Maven configuration.
Java BeansWriting and wiring Java beans into routes using Camel, Spring Boot, or Quarkus annotations.
ConfigurationCLI configuration options, config commands, configuration precedence, troubleshooting.
Command ReferenceComplete reference for all CLI commands and their options.

Plugins and Extensions

ExtensionDescription
Camel CLI LauncherSelf-contained executable JAR — run the CLI without JBang.
Kubernetes PluginBuild and deploy Camel integrations to Kubernetes.
Testing PluginAutomated testing with the Citrus test framework.
Camel TUITerminal dashboard for developing, monitoring, and debugging Camel integrations with a source editor, route topology, message tracing, and AI integration.
Camel MCP ServerExpose the Camel catalog and tools to AI coding assistants via the Model Context Protocol.

How It Works

Camel CLI is powered by JBang under the hood. When you run camel run, JBang resolves and caches the required Camel JARs, then launches a JVM with your route. The CLI communicates with running integrations through a local connector, enabling management commands (camel ps, camel get, camel log, camel trace) to inspect and control them from a separate terminal.

For Spring Boot and Quarkus applications, adding the camel-cli-connector dependency lets the CLI manage those applications the same way.

评论

登录后参与评论

正在加载评论…