# Use MiniCut in China mainland

Install MiniCut with the China mainland region, download tools from mirrors, set a proxy, and switch MiniCut to Chinese.

MiniCut has one setting for the region, `region` in `settings.json`, and it is `global` or `cn`. The region decides which download sites the install, `minicut update` and `minicut setup` use. A proxy and the language are two more settings you can change on your own.

## Install with the cn region

1. Run the install line with `--region cn`. On Windows, use `-Region cn`. The lines are on [Install in a terminal](/docs/cli/install-in-a-terminal).
2. If you give no region, the install times both download sites for up to 5 seconds each and uses the faster one.

The install saves the region. `minicut update` and `minicut setup` read it from `settings.json`, so you do not repeat it.

## Download tools from mirrors

With the cn region saved, `minicut setup` prints `region: cn (settings.json), so every host uses its mirror, as with --china` and uses a mirror for every download. On another region, add `--china` to get the same.

```bash Terminal
minicut setup --china
```

Without the flag or the cn region, setup times each download site first. It uses the mirror for any site that does not answer within 4 seconds.

To see every download, its source and its size first, add `--dry-run`. It downloads nothing and writes nothing.

```bash Terminal
minicut setup --china --dry-run
```

Setup does not bring Python 3.12 or ffmpeg. When one is missing, setup prints a line starting `MISSING:` with the download site for your region, then exits with code 4. Install it and run `minicut setup` again.

With `--china`, files from GitHub come through a third-party proxy, and MiniCut checks each file's SHA256 before it uses it.

## Set a proxy

1. Save the proxy. Every `minicut` command and the MiniCut app then use it.

```bash Terminal
minicut network --proxy http://192.0.2.10:7890
```

```text Output
Proxy saved: http://192.0.2.10:7890
```

2. Check what is saved.

```bash Terminal
minicut network
```

```text Output
Proxy: http://192.0.2.10:7890
```

3. To stop using it, remove it.

```bash Terminal
minicut network --direct
```

```text Output
No proxy: every command connects directly.
```

If your proxy needs a login, put it in the address: `http://USER:PASSWORD@HOST:PORT`. MiniCut saves the address and the user name in `settings.json`. It saves the password in the key store, never in a file.

If `HTTPS_PROXY` is set when you install MiniCut, the install saves that proxy for you. A proxy you set in `HTTPS_PROXY`, `HTTP_PROXY` or `NO_PROXY` in your shell is used as it is. The saved proxy is used only when `HTTPS_PROXY` is not set. Calls to the MiniCut app on your own computer (`127.0.0.1` and `localhost`) skip the proxy.

If the saved proxy refuses the connection, the command connects directly once and prints this line on stderr. Run the command it names to stop using the proxy.

```text Message
代理 HOST 连不上，已直接连接；运行 minicut network --direct 可以不再用它
```

An address that is not `http://HOST:PORT` prints `Invalid URL` or `a proxy is http://host:port, got` with what you typed, and exits with code 5.

## Switch the language

The MiniCut app opens in Chinese until you choose a language. `minicut lang` shows the language and `minicut lang en` switches it. The open app picks the change up within a few seconds.

```bash Terminal
minicut lang en
```

```text Output
English (ui_language en)
```

```bash Terminal
minicut lang zh
```

```text Output
中文 (ui_language zh)
```

Any other value prints `Usage: minicut lang [zh|en] [--json]` and exits with code 2.

`minicut login --lang zh` saves the same setting and opens the sign-in page in Chinese. Without `--lang` and with no saved language, the sign-in page opens in English.

## Reach minicut.ai

Sign-in, your account and every command that makes a picture, a voice or a video go through minicut.ai. If a command cannot reach it, it exits with code 7. A computer that signed in keeps working offline for 7 days, and each command prints one `Offline:` line on stderr. See [Account](/docs/cli/account).

## Next

[Install in a terminal](/docs/cli/install-in-a-terminal) [Setup](/docs/cli/setup) [Troubleshooting](/docs/cli/troubleshooting)
