---
title: "The pixgamma command (CLI)"
url: https://phatdev.net/en/docs/pixgamma/cli
lang: en
updated: 2026-10-22
alternate:
  vi: https://phatdev.net/docs/pixgamma/cli
markdown: https://phatdev.net/en/docs/pixgamma/cli.md
---

# The pixgamma command (CLI)

Part of the doc set: [PixGamma](https://phatdev.net/en/docs/pixgamma.md)

> Batch processing, every flag, JSON reports and other commands.

The `pixgamma` command shares the app's engine; it suits batch work and scripts. Install it with **Cài lệnh pixgamma (CLI).command** in the DMG.

<div style="margin:1.6em 0"><figure style="margin:0"><a href="https://phatdev.net/uploads/p/pixgamma/cli-dev-vi-light-3840.webp" target="_blank" rel="noopener" class="pd-th-light" style="display:block;border:0" aria-label="For developers: the pixgamma command for batches, JSON reports, local API (4K)"><img src="https://phatdev.net/uploads/p/pixgamma/cli-dev-vi-light-1920.webp" srcset="/uploads/p/pixgamma/cli-dev-vi-light-960.webp 960w, /uploads/p/pixgamma/cli-dev-vi-light-1920.webp 1920w, /uploads/p/pixgamma/cli-dev-vi-light-3840.webp 3840w" sizes="(max-width: 900px) 100vw, 760px" width="3840" height="2160" alt="For developers: the pixgamma command for batches, JSON reports, local API" loading="lazy" decoding="async" style="width:100%;height:auto;display:block;border:1px solid var(--line);border-radius:12px"></a><a href="https://phatdev.net/uploads/p/pixgamma/cli-dev-vi-dark-3840.webp" target="_blank" rel="noopener" class="pd-th-dark" style="display:block;border:0" aria-label="For developers: the pixgamma command for batches, JSON reports, local API (4K)"><img src="https://phatdev.net/uploads/p/pixgamma/cli-dev-vi-dark-1920.webp" srcset="/uploads/p/pixgamma/cli-dev-vi-dark-960.webp 960w, /uploads/p/pixgamma/cli-dev-vi-dark-1920.webp 1920w, /uploads/p/pixgamma/cli-dev-vi-dark-3840.webp 3840w" sizes="(max-width: 900px) 100vw, 760px" width="3840" height="2160" alt="For developers: the pixgamma command for batches, JSON reports, local API" loading="lazy" decoding="async" style="width:100%;height:auto;display:block;border:1px solid var(--line);border-radius:12px"></a><figcaption style="margin-top:8px;font-size:13px;line-height:1.5;color:var(--muted);text-align:center">For developers: the pixgamma command for batches, JSON reports, local API</figcaption></figure></div>

## Examples

```bash
pixgamma upscale photo.jpg --scale 4
```

```bash
pixgamma upscale ~/Photos/products -r -o ~/Photos/out -m std --scale 2 -f jpg --jq 92 --se
```

```bash
pixgamma upscale portrait.jpg -m rec --cr 75 --rs 40
```

```bash
pixgamma upscale image.png --width 3000 --json
```

## `pixgamma upscale` flags

| Flag | Meaning |
|---|---|
| `-m` | `auto` (default), `std`, `hf`, `art`, `low`, `rec` |
| `--scale`, `--width`, `--height` | Output size: factor 1–16 or pixels (aspect kept) |
| `--dn`, `--sh`, `--cm`, `--dh` | Denoise, sharpen, JPEG cleanup, dehalo (0–100) |
| `--dt`, `--tx`, `--lc` | Detail (High Fidelity), texture grain, local contrast (0–100) |
| `--fr`, `--frc`, `--frf` | Face restoration (0 = off), `realistic`/`creative`, identity strength |
| `--cr`, `--rs`, `--prompt` | Recover: Creativity, Resemblance, English prompt |
| `--no-text-protect`, `--no-color-fix` | Disable text protection, disable color preservation |
| `-f`, `--jq`, `--res` | Format `preserve`/`png`/`jpg`/`tiff`/`heic`, JPEG/HEIC quality, DPI |
| `-r`, `-o`, `--flatten` | Recurse into folders, output folder, do not keep subfolders |
| `--prefix`, `--suffix`, `--am`, `--se` | File name prefix, suffix, append model name, skip existing |
| `-d` | `gpu` (default), `all`, `ane`, `cpu` |
| `--json`, `-q` | Print a JSON report, run quietly |

By default output goes next to the source with a `-pixgamma` suffix; the original is never overwritten.

## JSON report

`--json` prints one entry per image: input and output size, models run (`passes`), time, text regions, text read, faces restored and Auto's analysis (noise, sharpness, compression, blocking, flat areas).

```json
{
  "inputSize": [480, 360], "outputSize": [1920, 1440],
  "mode": "standard", "passes": ["Photo"], "seconds": 12.6,
  "textRegions": 5, "text": ["MacBook Pro", "delete", "tab", "caps lock"]
}
```

## Other commands

| Command | Does |
|---|---|
| `pixgamma analyze photo.jpg` | Prints the settings Auto would use |
| `pixgamma models` | Lists models and file locations |
| `pixgamma serve` | Starts the local API, see [API](https://phatdev.net/en/docs/pixgamma/api) |
| `pixgamma update` | Checks for and installs a new version |
| `pixgamma --version` | Prints the version |
