> For the complete documentation index, see [llms.txt](https://doc.telosys.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.telosys.org/code-generation/genb-command.md).

# "genb" command

"**genb**" is a special command to generate code in "**batch mode**" (or "bulk mode") \
with **multiple models** and/or **multiple bundles**. \
This command has been added in Telosys version 4.1.0

Principle of using entities (.entity) and templates (.vm) for code generation:\
&#x20; \- All entities present in the selected model(s) are used.\
&#x20; \- All templates defined in the selected bundle(s) are used.

{% hint style="info" %}
You don't have to defined the **current model** and the **current bundle** \
before using the genb command (it can work with any models and any bundles)
{% endhint %}

## "genb" command syntax

```
> genb model(s) bundle(s) [-r] [-y]
```

* **`models`**:    **model name** or **part of name** or **"\*"** for all models
* **`bundles`**:  **bundle name**  or **part of name**  or **"\*"** for all bundles
* **`-r`**  (optional) to copy the **static resources** provided by the bundle (if any)
* **`-y`**  (optional) to force "**yes**" answer (to avoid confirmation)

## "genb" command examples

```
> genb * *
```

generates the code for **all the models** with **all the bundles of templates**&#x20;

```
> genb cars java 
```

generates the code for **all the models** having "***cars***" in their name \
with **all bundles** having "***java***" in their name


---

# 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://doc.telosys.org/code-generation/genb-command.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.
