Command line¶
The middleware-forge command generates projects without the web UI or the API server. It uses the same planning and generation engine, but there is no approval step: the CLI treats its plan as confirmed and generates immediately.
Install it with uv sync (it is the project's console script), then run it with uv run middleware-forge …, or install the package with pip and run middleware-forge directly.
generate: fully specified¶
middleware-forge generate \
--document example/travel-services.json \
--source-type REST --target-type REST \
--project-name TravelPermission \
--namespace http://www.sample/TravelPermission \
--output ./output/cli
| Option | Required | Meaning |
|---|---|---|
--document |
yes | The interface document (OpenAPI, WSDL or WADL; referenced XSDs are found next to it) |
--source-type, --target-type |
yes | SOAP or REST (case-insensitive) |
--project-name |
yes | Project folder and file prefix: letters, digits, _, -, ., starting with a letter or _ |
--namespace |
yes | Target namespace of the generated WSDL/XSD |
--document-type |
no | wsdl, wadl, openapi, icd or db_mapping; detected when omitted |
--output |
no | Output folder; defaults to a per-run folder under the data root |
The structured command produces one proxy and one business service for all operations, and does not call the LLM for planning.
prompt: plan from a description¶
middleware-forge prompt \
--document example/travel-services.json \
--prompt "Create a REST-to-REST OSB project TravelPermission with namespace http://www.sample/TravelPermission" \
--output ./output/cli
The LLM proposes the project name, protocols and output type; facts read from the document (source protocol, SOAP version, namespace, operations) override it, and the optional --source-type, --target-type, --project-name, --namespace and --document-type override both. Ask for "an OpenAPI document" or "WSDL + XSD" in the prompt to generate those instead of an OSB project.
serve: start the API¶
This is how the container starts the backend. It always runs a single process, because runs, the event streams and the job queues share in-process state.
Interactive mode¶
Run middleware-forge without arguments for a guided session with the commands /generate, /prompt, /serve, /help and /quit. It asks for each value, shows the run checklist live, and if a referenced schema is missing it asks for the file and resumes the run.
Exit codes and output¶
| Exit code | Meaning |
|---|---|
0 |
The run completed (or paused waiting for a document; the message says how to resume) |
1 |
The run failed; the reason is printed |
2 |
Invalid options (the message lists the accepted values) |
While a run is active the terminal shows the run's checklist, its status and the current step. Settings such as the LLM endpoint and the data folder come from .env and the environment, exactly as for the API (see Configuration).