> ## Documentation Index
> Fetch the complete documentation index at: https://e-gurl.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Auto-Update

> Self-update DNS-MNS to the latest version

# Auto-Update

DNS-MNS v3.0.0 includes a built-in self-update mechanism that checks for new releases on GitLab and downloads the correct binary for your platform.

## Usage

```bash theme={null}
dns-mns update
```

This will:

1. Check the GitLab releases API for newer versions
2. Compare with your current version
3. Download the correct binary for your OS and architecture
4. Replace the running executable
5. Report success

## How It Works

* Queries `https://gitlab.com/api/v4/projects/E-Gurl%2Fdns-mns/releases`
* Uses semantic versioning (semver) to compare versions
* Downloads the matching binary: `dns-mns-{os}-{arch}` (e.g., `dns-mns-linux-amd64`)
* Performs atomic replacement: backup old binary, install new one, clean up

## Startup Check

When running in interactive mode, DNS-MNS performs a non-blocking background version check on startup. If a newer version is available, you'll see a notification:

```
  Update available: v5.0.1 (current: 5.0.0)
  Run 'dns-mns update' to upgrade.
```

This check has a 3-second timeout so it never delays startup.

## JSON Output

For scripting, you can check for updates with JSON output:

```bash theme={null}
dns-mns update --json
```

```json theme={null}
{
  "update_available": true,
  "current_version": "5.0.0",
  "latest_version": "5.0.1",
  "download_url": "https://gitlab.com/...",
  "asset_name": "dns-mns-linux-amd64"
}
```

## Supported Platforms

Auto-update downloads the correct binary for your platform:

| Platform            | Binary Name                 |
| ------------------- | --------------------------- |
| Linux x86\_64       | `dns-mns-linux-amd64`       |
| Linux ARM64         | `dns-mns-linux-arm64`       |
| macOS Intel         | `dns-mns-darwin-amd64`      |
| macOS Apple Silicon | `dns-mns-darwin-arm64`      |
| Windows x86\_64     | `dns-mns-windows-amd64.exe` |
