# Befehlszeile und Automatisierung

VDM can be driven without its window in three ways:

- **Die Befehlszeile der App** verwendet dieselben Schalter wie IDM. Damit lässt sich ein Download von einem Skript, einer Batch-Datei oder einem anderen Programm an die laufende App übergeben.
- **`voltdownloadmanager-cli`** ist ein separates Befehlszeilenprogramm. Damit lassen sich Dateien, Videos und Torrents im Terminal mit Fortschrittsanzeige herunterladen, ohne die App zu verwenden.
- **The automation API**: other programs list the running app's downloads (as JSON) and pause, start, remove or delete them, over a local, token-protected channel. AI assistants use it through VDM's MCP server: see [AI assistants](https://vdm.mikaillab.com/de/help/ai-assistants.html).

To run the whole app without a window, on a home server or a NAS, see [Run VDM on a server](https://vdm.mikaillab.com/de/help/server.html) (`voltdownloadmanager --headless`); to control it from a phone, [Control VDM from your phone](https://vdm.mikaillab.com/de/help/remote-control.html).

Die Beispiele verwenden Windows-Pfade. Unter macOS und Linux haben die Programme dieselben Namen, nur ohne `.exe`.

## Die Befehlszeile der App

```
voltdownloadmanager.exe /d URL [/p folder] [/f name] [/a] [/n] [/s]
```

| Schalter | Beschreibung |
|---|---|
| `/d URL` | Die herunterzuladende Adresse. |
| `/p folder` | In diesem Ordner speichern (sonst im Ordner der Kategorie unter **Optionen → Speichern unter**). |
| `/f name` | Unter diesem Namen speichern. |
| `/a` | Zur Hauptwarteschlange hinzufügen, ohne den Download zu starten. |
| `/n` | Ohne Fenster **Dateiinformationen herunterladen** starten oder den Download sofort in die Warteschlange stellen (`/a`). |
| `/s` | Starten Sie die Haupt-Download-Warteschlange. |
| `/exit` | Laufende App speichern und schließen (wird vom Installationsprogramm vor einem Upgrade verwendet). |
| `/startup` | Start in the notification area, the window hidden: what **Launch Volt Download Manager on startup** starts VDM with when you sign in. Where no notification area shows VDM's icon (some Linux desktops), VDM starts minimized. A running VDM stays as it is. |
| *eine `.torrent`-Datei oder einen `magnet:`-Link* | Open it in **Add torrent** (what Windows passes when VDM opens torrents). |

Switches can start with `/` or `-`, in any case. If VDM is running, the command goes to it; if not, VDM starts and carries it out. For example:

```
voltdownloadmanager.exe /d https://example.com/files/report.pdf /p D:\Reports /n
voltdownloadmanager.exe /d https://example.com/big.iso /a
voltdownloadmanager.exe /s
```

## voltdownloadmanager-cli

It comes with every download of VDM, next to the app (the installer puts it in VDM's folder). It works on its own: the app needn't run, except for `status` and `api`.

Its downloads leave the way the app's do: through **Options → Proxy / Socks** (no proxy, **Use system settings** with its `HTTPS_PROXY` / `HTTP_PROXY` / `ALL_PROXY` variables and the system's automatic configuration script, an automatic configuration script, fetched before the command starts, or a manual proxy with its login) and its **Network adapter**, with the DNS of **Options → Connection**. That covers `get`, `resume`, the video, playlist and gallery commands (yt-dlp and gallery-dl too), the `install-*` commands, and torrents when Torrent settings' **Use the proxy** is on. For one run, `--proxy` takes the place of Options' proxy: `none` (direct, yt-dlp and gallery-dl too, whatever the system's proxy), `system`, or a proxy's address, `http://127.0.0.1:7890`, `https://…`, `socks5://…`, `socks5h://…` (the proxy looks the sites' names up), `socks4://…`, `socks4a://…`. A password is never taken on the command line, where other programs can read it: write the user name in the address (`socks5://ann@127.0.0.1:1080`) and put the password in the `VDM_PROXY_PASSWORD` environment variable. `get` and `resume` also have `--dns` and `--adapter`, and `video-get` and `gallery-get` `--adapter` (`any` for none), for the same.

| Befehl | Beschreibung |
|---|---|
| `get URL [-o folder\\|file] [-c connections] [-H "Header: value"]... [-r referer] [--user-agent agent] [--cookie cookie] [--checksum hash] [--dns choice] [--adapter name] [--proxy proxy]` | Download a file with up to 8 connections (`-c`, 1 to 128), showing progress. `Ctrl+C` pauses it; `resume` continues. `-r` sets the referring page address (Referer header), `--user-agent` sets the request's User-Agent (then the only one sent; without it, VDM speaks as your default browser, and, when a site's bot check refuses that and the way a browser connects too, once more under its own name), `--cookie` sets the Cookie header (a cookie on the command line ends up in the shell's history; `-` reads it from standard input instead). `--checksum` checks the finished file: hex MD5, SHA-1, SHA-256, SHA-512 or CRC32, optionally named (`sha256:…`); a file that doesn't match fails. Without it, a checksum the server sends is checked, and a file that doesn't match it is kept with a `warning:` line (see [Verify checksum](https://vdm.mikaillab.com/de/help/download-list.html#verify-checksum)). `--dns` picks the DNS instead of Options': `system`; a service and how to ask it, `cloudflare-https`, `quad9-tls`, `google-plain`, `adguard-https`, `nextdns-tls`; DNS servers' addresses, `9.9.9.9,149.112.112.112`; or a DNS-over-HTTPS address. It never falls back to the system's DNS. `--adapter` sends every connection through one network adapter instead of Options' (`any` for none), by its name (`Ethernet`, `wg0`) or one of its addresses; when it isn't connected, nothing is sent and the download fails. `--proxy` takes the place of Options' proxy for this run (see above). The app's [site rules](https://vdm.mikaillab.com/de/help/connections-and-speed.html#site-rules) for the address apply too (their headers, User-Agent, browser-like connection, number of connections and proxy), where the command line gives none of the same: `--proxy` goes before every rule's proxy. A link from a file host that one of your debrid accounts (**Options → Accounts**) supports goes through that account, as in the app, and `get` says `through Real-Debrid`; `--direct` downloads the address itself ([Debrid service accounts](https://vdm.mikaillab.com/de/help/debrid.html)). |
| `resume file.vdm.json [-c connections] [-H ...] [-r referer] [--user-agent agent] [--cookie cookie] [--checksum hash] [--dns choice] [--adapter name] [--proxy proxy] [--direct]` | Setzt einen pausierten oder unterbrochenen Download aus der danebenliegenden `.vdm.json`-Datei fort. `-r`, `--user-agent` und `--cookie` legen zusätzliche Header fest (`-` liest das Cookie von der Standardeingabe). `--checksum` überprüft die fertige Datei für diesen Durchlauf. `--dns`, `--adapter` und `--proxy` legen den DNS, den Netzwerkadapter und den Proxy der Verbindung fest, wie für `get`, und die Website-Regeln der App gelten wie für `get`. Über ein Debrid-Konto, wie `get`: Der Dienst gibt einen neuen Link, wenn der alte abgelaufen ist; `--direct` setzt den Download von der Adresse selbst fort. |
| `install-gallery-dl` | Installiert oder aktualisiert gallery-dl für Bildergalerien. Die Prüfsummenliste wird mit dem Signierschlüssel des Autors abgeglichen, das Programm mit dieser Liste (Windows und Linux x86-64; auf anderen Systemen selbst installieren). |
| `gallery-get URL [-o folder] [--limit N] [--adapter name]` | Download a gallery's pictures (a Wikimedia Commons category, a Flickr album, ...) into a folder named after it inside `-o`; `--limit` takes at most that many, the first the site lists. Started again, it fetches only the new ones. VDM's own downloader brings the pictures gallery-dl lists, 4 at a time. `--adapter` sends the connections, VDM's and gallery-dl's, through one network adapter, as for `get`. |
| `video-info URL` | Welche Videos eine Seite enthält (YouTube, Vimeo usw.) und welche Qualitätsstufen verfügbar sind. |
| `playlist-info URL [--from N] [--count N]` | Die Videos einer Wiedergabeliste oder eines Kanals, jeweils in einer Zeile in der aufgeführten Reihenfolge: Position, Länge, Titel und Adresse. |
| `playlist-get URL [-f selector] [-o folder] [-c pieces] [--split-chapters] [--from N] [--count N]` | Lädt die Videos einer Wiedergabeliste oder eines Kanals nacheinander in einen Ordner herunter, der nach der Liste benannt ist und sich in `-o` befindet. `-f` ist eine Qualität für alle, wie für `video-get` (standardmäßig die beste jedes Videos; `bv*[height<=720]+ba/b[height<=720]` = bis zu 720p; `bv[vcodec^=avc]+ba[acodec^=mp4a]/b[vcodec^=avc][acodec^=mp4a]` = die am kompatibelsten, H.264 mit AAC; `ba` = der Originalton; `mp3:320`, `opus:`, `flac:` wie für `video-get`). `-c` und `--split-chapters` wie für `video-get`. |
| `video-get URL [-f selector \\| -q height\\|compatible] [-o folder] [-c pieces] [--subs langs] [--auto-subs] [--embed-subs] [--split-chapters] [--adapter name]` | Download a video. Without `-f` or `-q`, the best quality, the one the Download video window starts on: with ffmpeg the best picture with the best sound joined to it (a site whose pictures and sounds come apart, such as Bilibili, needs ffmpeg for a video), else the best file with both. `-q 1080` (or `720p`) takes that height, or the nearest below it the page offers (else the nearest above), and says so. `-q compatible` takes the most compatible quality, as the window's **Most compatible (H.264 + AAC)**: the best H.264 picture with AAC sound, in an MP4 that plays in every editor, TV and phone; a page without one says so (nothing is converted). `-f` takes a quality's selector from `video-info` (`b` = the best single file; `ba` = the sound alone as the site has it, not converted; `mp3:320`, `mp3:256`, `mp3:192` or `mp3:128` = the sound as an MP3 at that bitrate, `mp3:0` at its best variable one; `opus:` = as Opus; `flac:` = as FLAC, lossless but no better than the site's sound; conversions need ffmpeg). `-c`: VDM's own downloader brings each stream yt-dlp finds over this many connections (8 by default, 1 to 128), a stream in pieces (HLS, DASH) this many pieces at once. `--subs` saves subtitles beside it: language codes from `video-info` (`en,fr`), or `all` for every one the uploader gave; `--auto-subs` takes the site's automatic captions instead; `--embed-subs` puts them into the video (needs ffmpeg, MP4 or MKV). With ffmpeg, the video's chapters go into the file too, as Download video's **Embed chapters** does. `--split-chapters` splits the video into numbered chapter files without re-encoding, beside the main video. `--adapter` sends the downloads' connections, and yt-dlp's (and ffmpeg's), through one network adapter, as for `get`; when it isn't connected, nothing starts. When no format of the page matches, the error lists the ones it offers, as `video-info` does. |
| `update-helpers` | Check VDM's own helpers (yt-dlp, ffmpeg, gallery-dl, Node.js) for newer versions now, install them (each checked as its first install was), and print their versions. A helper a download is using switches to its new version once that download ends. Programs you chose in Helpers, and your system's, are yours to update. |
| `install-ytdlp`, `install-ffmpeg`,`install-js-runtime` | Install or update the helpers videos need: yt-dlp (checked against its signing key), ffmpeg (x64 and ARM64 Windows, a build in VDM's signed list of checked builds; on macOS and Linux VDM uses the system's, and on 32-bit Windows one you choose in Helpers) and VDM's own JavaScript runtime, which yt-dlp needs for YouTube's qualities: Node.js's newest LTS build (its checksum list checked against Node.js's releasers' keys; Windows, Linux and macOS). A runtime already on your computer, or one chosen in Helpers, is still used first, and the command says so. `install-deno`, its earlier name, does the same. |
| `torrent-info SOURCE` | Name, Dateien (nummeriert) und Größe eines Torrents; `SOURCE` ist ein Magnet-Link oder eine `.torrent`-Datei. |
| `torrent-get SOURCE [-o folder] [--files 0,2] [--use-existing]` | Lädt einen Torrent oder nur einige seiner Dateien herunter. Wenn einige seiner Dateien bereits im Ordner vorhanden sind, stoppt es und benennt sie; `--use-existing` verwendet sie stattdessen (was übereinstimmt, wird behalten, der Rest heruntergeladen). Mit der Einstellung „**Die Tracker dieser öffentlichen Liste zu öffentlichen Torrents hinzufügen**“ in den Torrent-Einstellungen erhält ein öffentlicher Torrent auch die Tracker der Liste, wie in der App. |
| `torrent-create PATH -o file.torrent` | Erstellt eine `.torrent` einer Datei oder eines Ordners, die Dateien eines Ordners nach Namen aufgelistet (Peers finden sie über das DHT). |
| `status [--id N] [-s status] [--search text] [-c category] [-q queue] [-l limit]`(oder `list`) | Die Downloads der laufenden App als JSON, mit ihren IDs (die Automatisierungs-API muss aktiviert sein). Optionale Flags filtern nach ID, Status, Suchbegriff, Kategorie oder Warteschlange oder begrenzen die Anzahl. |
| `pause ID...`, `start ID...` | Laufende Downloads anhalten oder gestoppte, in der Warteschlange befindliche oder fehlgeschlagene Downloads in der laufenden App starten (fortsetzen). |
| `remove ID...`, `delete ID...` | Downloads aus der Liste der laufenden App entfernen: `remove` behält die Dateien, `delete` löscht sie ebenfalls. Ein laufender Download wird zuerst angehalten (`pause`). |
| `add URL [-o folder] [-f name] [-c category] [-q queue] [--checksum hash] [-r referer] [--user-agent agent] [--cookie cookie] [--private] [-l] [-s]` | Übergibt einen Download an die laufende App. `-o` legt den Ordner fest, `-f` den Dateinamen, `-c` die Kategorie, `-q` die Warteschlange, `--checksum` den erforderlichen Hash, `-r` die Referrer-Adresse der Seite (Referer-Header), `--user-agent` den User-Agent der Anfrage, `--cookie` den Cookie-Header (ein Cookie in der Befehlszeile landet im Verlauf der Shell; `-` liest es stattdessen aus der Standardeingabe), `--private` kennzeichnet ihn als Download aus einem privaten Fenster (getrennt von Downloads aus normalen Fenstern, nur in der Liste gespeichert, solange **Optionen → Allgemein → Downloads aus privaten Fenstern in der Liste behalten** aktiviert ist, was standardmäßig der Fall ist), `-l` reiht ihn ohne Start ein, und `-s` überspringt den Dialog Dateiinformationen herunterladen. Gibt `{"id": N}` bei Erfolg aus. |
| `start-queue [name] [-q name]`, `stop-queue [name] [-q name]` | Startet oder stoppt eine Download-Warteschlange in der laufenden App (Automatisierungs-API). Startet oder stoppt die Hauptwarteschlange, wenn weggelassen. |
| `pair` | Zeigt einen neuen Code an, um ein Telefon oder einen Remote-Browser mit der Fernsteuerung der laufenden App zu koppeln: deren Webadressen, Kopplungscode und einen QR-Code. |
| `api on`, `api off` | Die Automatisierungs-API der laufenden App ein- oder ausschalten. |

`voltdownloadmanager-cli help <command>`zeigt alle Optionen. Ein fehlgeschlagener Befehl (die App läuft nicht, sie antwortet mit einem Fehler oder ein Download bricht ab) wird mit dem Code 1 beendet. Zum Beispiel:

```
voltdownloadmanager-cli get https://example.com/big.iso -o D:\Downloads -c 16 --checksum sha256:9f86d0…
voltdownloadmanager-cli video-get "https://www.youtube.com/watch?v=aqz-KE-bpKQ" -q 720
voltdownloadmanager-cli torrent-get "magnet:?xt=urn:btih:…" --files 0
```

### JSON für Skripte und Programme

Mit `--json` (vor oder nach dem Befehl) gibt jeder Befehl JSON anstelle von Text aus, ein Objekt pro Zeile, damit Skripte und KI-Agenten es lesen können:

| Befehl | Gibt aus |
|---|---|
| `get`, `resume` | `{"event": "through", "service"}`zuerst, wenn der Download über ein Debrid-Konto läuft, dann eine `{"event": "progress", "downloaded", "size", "speed", "connections", "segments"}`-Zeile jede halbe Sekunde, dann `{"event": "done", "path", "size", "seconds"}` (mit `"warning"`, wenn die Datei nicht mit der vom Server gesendeten Prüfsumme übereinstimmte und behalten wurde), oder `{"event": "paused", "state"}` nach `Ctrl+C` (`state` ist die Datei, die `resume` verwendet). |
| `video-get` | Ohne `-f`, zuerst `{"event": "quality", "label", "format", "height", "asked", "nearest"}`: die gewählte Qualität, `asked` die Höhe von `-q` (`"compatible"` für `-q compatible`, sonst `null`) und `nearest`, ob diese Höhe nicht angeboten wurde. Dann `{"event": "progress", "downloaded", "size", "speed"}` Zeilen, `{"event": "note", "text"}` für das, was das Download-Protokoll sagt (eine Qualität, die die Server nicht liefern, genommen bei der nächstniedrigeren), dann `{"event": "done", "path", "subtitles", "subtitle_problems"}`: die daneben gespeicherten Untertiteldateien und die Sprachen, die die Website abgelehnt hat (`{"code", "name", "reason", "beside"}`; `beside`: sie kamen bei einem zweiten Versuch, neben dem Video statt darin). |
| `torrent-get` | `{"event": "progress", "phase", "downloaded", "size", "speed", "peers", "peers_seen"}`Zeilen, dann `{"event": "done", "path", "size"}`, oder `{"event": "stopped", "downloaded", "seconds"}` mit `--seconds`. |
| `video-info` | `{"title", "choices": [{"label", "format", "size", "approx", "height", "fps", "codec", "range"}], "subtitles": [{"code", "name", "automatic"}], "declared"}`; `declared` ist die Adresse des Videos, um das es laut Seite geht, wenn dieses anstelle des ersten Players in seinem HTML gesucht wurde (auf einer Website, für die yt-dlp keinen eigenen Reader hat), sonst `null`; die `format` einer Auswahl ist das, was `video-get -f` nimmt (genau die Formate, aus denen es dimensioniert wurde, wie `401+251`, dann das nächstgelegene desselben Codecs und derselben Höhe, sollten diese nicht mehr vorhanden sein, dann eines beliebigen Codecs), `approx` sagt, dass seine `size` eine Schätzung ist, `codec` ist `AV1`, `VP9`, `H.264`…, `range` ist `HDR` (oder `SDR` neben einer HDR-Auswahl); die `code` eines Untertitels ist das, was `--subs` nimmt. |
| `torrent-info` | `{"name", "info_hash", "size", "files": [{"index", "size", "path"}]}`. |
| `torrent-create` | `{"info_hash", "path"}`. |
| `install-ytdlp`, `install-ffmpeg`,`install-js-runtime` | `{"tool", "version", "path"}`; `install-js-runtime` fügt `used` hinzu, die Laufzeitumgebung, die yt-dlp verwendet (`{"runtime", "version", "path"}`). |
| `update-helpers` | Ein `{"tool", "status", "version"}` pro Helfer; `status` ist `up-to-date`, `updated`, `ready` (in Gebrauch, sobald seine Downloads beendet sind), `skipped` (Sie sind von der neuesten Version zurückgekehrt), `not-ours`, `busy` oder `failed` (mit `error`). |
| `status`, `pause`, `start`, `remove`, `delete`, `start-queue`, `stop-queue`, `add`, `pair`,`api` | Die Antwort der App, die bereits JSON ist (siehe unten). |

Größen sind in Bytes (`null`, wenn unbekannt), Geschwindigkeiten in Bytes pro Sekunde. Ein Fehler gibt `{"error": "…"}` aus und beendet sich mit Code 1; wenn `video-get` kein Format der Seite zum Herunterladen findet, kommt der Fehler mit `"choices"` (wie `video-info`) und `"formats"` (yt-dlps eigene: `{"id", "ext", "height", "video", "audio"}`). Zum Beispiel:

```
voltdownloadmanager-cli --json get https://example.com/big.iso -o D:\Downloads
{"event":"progress","downloaded":4194304,"size":1073741824,"speed":52428800,"connections":8,"segments":8}
…
{"event":"done","path":"D:\\Downloads\\big.iso","size":1073741824,"seconds":20.4}
```

## Die Automatisierungs-API

Andere Programme können die laufende App fragen, was sie herunterlädt, und Downloads anhalten, starten, entfernen oder löschen. Die API ist **standardmäßig ausgeschaltet**; schalten Sie sie mit `voltdownloadmanager-cli api on` ein (und mit `api off` aus).

### How a program talks to VDM

1. While it runs, VDM listens on a port of `127.0.0.1` (this computer only) and writes the port and a secret token to `ipc.json` in its data folder: - Windows: `%APPDATA%\voltdownloadmanager\ipc.json` - macOS: `~/Library/Application Support/voltdownloadmanager/ipc.json` - Linux: `~/.local/share/voltdownloadmanager/ipc.json` - A [portable copy](https://vdm.mikaillab.com/de/help/portable.html): `data\ipc.json` next to the program.

The token changes at every start; only programs that can read your data folder (yours) can use it. 2. Connect to that port and send one line of JSON: the token and the command's fields, e.g. `{"token": "<token>", "query": "list"}`. 3. VDM answers with one line: `ok` for a command, or a JSON object for a question.

### Was es versteht

| Felder (außer `token`) | Antwort |
|---|---|
| `{"query": "list"}` | Jeder Download und die Gesamtgeschwindigkeit: `{"downloads": [{"id", "file", "url", "path", "status", "size", "downloaded", "speed", "added", "category", "error"}], "speed": bytes per second, "queues": [{"name", "running", "ids"}], "categories": [{"key", "name"}], "free": bytes}`. `status` ist `Queued`, `Downloading`, `Stopped`, `Complete` oder `Error`; `size` ist `null`, wenn unbekannt; `error` (warum es fehlgeschlagen ist) ist nur für einen Download in `Error` vorhanden; `category` ist der `key` einer Kategorie; `free` ist der freie Speicherplatz, auf den Downloads gehen (`null`, wenn unbekannt). Nur wenn die API eingeschaltet ist. |
| `{"action": "pause", "ids": [3, 4]}` | Führt Aktionen für Downloads anhand ihrer ID aus: `"pause"`, `"start"`, `"remove"` (Datei behalten) oder `"delete"` (Datei ebenfalls löschen). Antwortet mit `{"done": [3], "skipped": [{"id": 4, "why": "not running"}]}`; ein laufender Download muss angehalten werden, bevor er entfernt oder gelöscht wird. Nur wenn die API eingeschaltet ist. |
| `{"action": "start_queue", "queue": "Main download queue"}` | Startet (oder mit `"stop_queue"`, stoppt) die Warteschlange dieses Namens (ein Name aus der Liste `queues`; Standard: die Haupt-Download-Warteschlange). Antwortet `{"done": [], "skipped": []}` oder `{"error": …, "code": "unknown-queue"}`. Nur wenn die API aktiviert ist. |
| `{"api": true}` / `{"api": false}` | Schaltet die API ein oder aus: `{"api": true}`. |
| `{"url": "https://…", "dir": "D:\\Files", "name": "a.zip", "silent": true}` | Fügt einen Download hinzu, wie es die `/d /p /f /n` der Befehlszeile tun (`"later": true` ist `/a`); `ok`. `"category"` (ein Schlüssel aus der `categories` der Liste) legt ihn in den Ordner dieser Kategorie anstelle des Ordners, den sein Typ auswählt; `"queue"` (der Name einer Warteschlange) ist die Warteschlange, in der er mit `"later"` wartet. Auch wenn die API ausgeschaltet ist, wie bei der Befehlszeile. |
| `{"start_queue": true}` | Startet die Haupt-Download-Warteschlange; `ok`. |

An unknown question or action is answered `{"error": "…"}`, as is a question while the API is off (then with `"code": "api-off"`, for programs to check: the error text may change). A wrong token is answered `denied`. When VDM is already handling as many requests as it takes at once, it answers `busy`: nothing was done, and the line can be sent again a moment later.

A command (answered `ok`) may carry an `"id"` of your own: letters, digits and `-`, at most 64, different for each command. If its answer doesn't come back (the line closed, or a wait ran out), send the same line again with the same `id`: VDM does it once, however many of those lines reach it, and answers `ok` to each. Without an `id`, each line is a new command. A second launch of the program (`voltdownloadmanager.exe /d …`, `/exit`) does this by itself.

Jede Anfrage und Antwort wird Feld für Feld in einem JSON-Schema beschrieben: [automation-api.schema.json](https://vdm.mikaillab.com/automation-api.schema.json) (auch unter `https://vdm.mikaillab.com/automation-api.schema.json`). Es wird aus dem Code erstellt, mit dem die App antwortet, sodass es genau bleibt; Programme können überprüfen, was sie senden und lesen, oder ihre Typen daraus generieren.

### Beispiele

PowerShell (Windows):

```
$ep = Get-Content "$env:APPDATA\voltdownloadmanager\ipc.json" | ConvertFrom-Json
$client = New-Object Net.Sockets.TcpClient("127.0.0.1", $ep.port)
$stream = $client.GetStream()
$writer = New-Object IO.StreamWriter($stream); $reader = New-Object IO.StreamReader($stream)
$writer.WriteLine((@{ token = $ep.token; query = "list" } | ConvertTo-Json -Compress))
$writer.Flush()
$reader.ReadLine() | ConvertFrom-Json | Select-Object -ExpandProperty downloads | Format-Table file, status, downloaded, size
$client.Close()
```

Python:

```
import json, os, socket

ipc = os.path.join(os.environ["APPDATA"], "voltdownloadmanager", "ipc.json")  # see above elsewhere
ep = json.load(open(ipc))
with socket.create_connection(("127.0.0.1", ep["port"])) as s:
    s.sendall((json.dumps({"token": ep["token"], "query": "list"}) + "\n").encode())
    answer = json.loads(s.makefile().readline())
for d in answer["downloads"]:
    print(d["file"], d["status"], d["downloaded"], d["size"])
```

Um stattdessen einen Download hinzuzufügen, senden Sie `{"token": "…", "url": "https://example.com/a.zip", "silent": true}`.

## Verwandt

- [Optionen](https://vdm.mikaillab.com/de/help/options.html)
- [Designs](https://vdm.mikaillab.com/de/help/themes.html)
- [Sprachen](https://vdm.mikaillab.com/de/help/languages.html)
- [Portabler Modus](https://vdm.mikaillab.com/de/help/portable.html)
- [Tastenkombinationen](https://vdm.mikaillab.com/de/help/keyboard-shortcuts.html)

[Diese Seite auf GitHub bearbeiten](https://github.com/mikailhossenimran/voltdownloadmanager/edit/main/docs/command-line.md) [Ein Problem mit dieser Seite melden](https://github.com/mikailhossenimran/voltdownloadmanager/issues/new?template=website.yml&title=Website%3A%20Command%20line%20and%20automation&page=https%3A//vdm.mikaillab.com/help/command-line.html) [Seitenverlauf](https://github.com/mikailhossenimran/voltdownloadmanager/commits/main/docs/command-line.md)

Kostenlos, Open Source, keine Werbung, keine Testversion.

[Download Volt Download Manager](https://vdm.mikaillab.com/de/download.html)
