> For the complete documentation index, see [llms.txt](https://docs.fractalworks.io/joule/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.fractalworks.io/joule/build-joule-projects/running-a-joule-from-the-cli.md).

# Running a Joule from the CLI

***

Joule ships with a Command Line Interface (CLI) for running your Joule project. To use the CLI your workflow generally looks like this:

1. Define your use case using the Joule DSL
2. Develop custom components within an IDE and test them locally, if required
3. Define the required data sources and sinks using Joule DSL
4. **Run** your use case from the command line

#### Example

```
java -cp "./lib/*" com.fractalworks.streams.joule.JouleCLI \
         -s eventSource.yaml \
         -e usecase.yaml \
         -p publishSinks.yaml
```

### Command line arguments

The CLI has a few command line arguments to run the Joule process.

*Required*

* `-s or --source` for data source file
* `-u or --usecase` for stream processing use case file
* `-p or --publish` for event sinks file

*Optional*

* `-c or --config` for custom Joule process configuration file
* `-r or --refdata` for reference data sources file

## Alternatively&#x20;

Use the provided scripts within the example projects copy them to your project environment. See use cases [running examples documentation](/joule/use-case-examples/running-examples.md).

### Start Joule

Start up the Joule process. Joule will use the `conf/app.env` configuration as its executing use case.

```bash
./bin/startJoule.sh
```

### Start Quote generator <a href="#start-quote-generator" id="start-quote-generator"></a>

By starting the quote simulator events will be published to Kafka ready for Joule to consume and process

```bash
./bin/startQuotePublisher.sh
```

### Shutting down processes

To stop the running processes just execute the below under the directory of which you started the processes

```bash
/bin/stopQuotePublisher.sh
/bin/stopJoule.sh
```

### Clean up environment

Once you have run the example and viewed the results you can cleanup the environment by running the below script.

```bash
./bin/cleanup.sh
```

### Prerequisites

* OpenJDK 19+ to run the platform
* To develop components read the [setting up environment](/joule/developer-guides/setting-up-developer-environment/environment-setup.md) document for detailed requirements.

Within the example repository, we have provided a bash script for additional functionality. Check the [README.MD](https://gitlab.com/joule-platform/fractalworks-joule-examples/-/blob/main/README.md) for further information


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.fractalworks.io/joule/build-joule-projects/running-a-joule-from-the-cli.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
