── CLI REFERENCE ──
exo diff
Preview what would change if you ran exo gen again — without writing anything to disk.
## Synopsis
bash
exo diff [type]## Description
Compares what exo gen would produce from the current .exo.yaml against the files already on disk. Renders a unified diff (added lines in green, removed lines in red) so you can review changes before committing to them.
Useful before running exo gen --force to understand exactly what will be overwritten. No files are written — this is a pure dry-run comparison.
## Arguments
| Argument | Description |
|---|---|
[type] | Optional generator type (e.g. docker, k8s). Omit to diff all generated assets. |
## Example Output
bash
$ exo diff dockerDiffing Dockerfile...--- Dockerfile (current)+++ Dockerfile (generated)@@ -1,5 +1,6 @@-FROM golang:1.21 AS builder+FROM golang:1.22-alpine AS builder WORKDIR /app COPY go.mod go.sum ./ RUN go mod download+RUN apk add --no-cache git COPY . .## Examples
Diff all generated files
bash
exo diffDiff a specific generator
bash
exo diff dockerexo diff k8sexo diff ciTypical workflow
bash
# 1. Edit .exo.yaml (e.g. change language to java)# 2. Preview what would changeexo diff# 3. If happy, apply the changesexo gen --force## Related Commands
→
exo gen --dry-run — preview file list without rendering content→
exo gen --force — apply regeneration, overwriting existing files→
exo status — see which assets exist vs are missing