---
obj: application
repo: https://github.com/casey/intermodal
website: https://imdl.io
rev: 2025-01-28
---

# Intermodal
Intermodal is a user-friendly and featureful command-line [BitTorrent](../../internet/BitTorrent.md) metainfo utility. The binary is called `imdl` and runs on [Linux](../../linux/Linux.md), [Windows](../../windows/Windows.md), and [macOS](../../macos/macOS.md).

## Usage
### Create torrent file:
```shell
imdl torrent create [OPTIONS] <FILES>
```

| Option                           | Description                                                                                                 |
| -------------------------------- | ----------------------------------------------------------------------------------------------------------- |
| `-F, --follow-symlinks`          | Follow symlinks in torrent input (default: no)                                                              |
| `-f, --force`                    | Overwrite destination `.torrent` file if it exists                                                          |
| `--ignore`                       | Skip files listed in `.gitignore`, `.ignore`, `.git/info/exclude`, and `git config --get core.excludesFile` |
| `-h, --include-hidden`           | Include hidden files that would otherwise be skipped                                                        |
| `-j, --include-junk`             | Include junk files that would otherwise be skipped                                                          |
| `-M, --md5`                      | Include MD5 checksum of each file in the torrent ( warning: MD5 is broken)                                  |
| `--no-created-by`                | Do not populate `created by` key with imdl version information                                              |
| `--no-creation-date`             | Do not populate `creation date` key with current time                                                       |
| `-O, --open`                     | Open `.torrent` file after creation (uses platform-specific opener)                                         |
| `--link`                         | Print created torrent `magnet:` URL to standard output                                                      |
| `-P, --private`                  | Set private flag, restricting peer discovery                                                                |
| `-S, --show`                     | Display information about the created torrent file                                                          |
| `-V, --version`                  | Print version number                                                                                        |
| `-A, --allow <LINT>`             | Allow specific lint (e.g., `small-piece-length`, `private-trackerless`)                                     |
| `-a, --announce <URL>`           | Use primary tracker announce URL for the torrent                                                            |
| `-t, --announce-tier <URL-LIST>` | Add tiered tracker announce URLs to the torrent metadata, separate their announce URLs with commas.         |
| `-c, --comment <TEXT>`           | Set comment text in the generated `.torrent` file                                                           |
| `--node <NODE>`                  | Add DHT bootstrap node to the torrent for peer discovery                                                    |
| `-g, --glob <GLOB>`              | Include or exclude files matching specific glob patterns                                                    |
| `-i, --input <INPUT>`            | Read contents from input source (file, dir, or standard input)                                              |
| `-N, --name <TEXT>`              | Set name of the encoded magnet link to specific text                                                        |
| `-o, --output <TARGET>`          | Save `.torrent` file to specified target or print to output                                                 |
| `--peer <PEER>`                  | Add peer specification to the generated magnet link                                                         |
| `-p, --piece-length <BYTES>`     | Set piece length for encoding torrent metadata                                                              |
| `--sort-by <SPEC>`               | Determine order of files within the encoded torrent (path, size, or both)                                   |
| `-s, --source <TEXT>`            | Set source field in encoded torrent metadata to specific text                                               |
| `--update-url <URL>`             | Set URL where revised version of metainfo can be downloaded                                                 |

### Show torrent information
```shell
imdl torrent show <torrent>
```

You can output the information as JSON using `--json`.

### Verify torrent
```shell
imdl torrent verify <torrent>
imdl torrent verify --input torr.torrent --content file
```

### Magnet Links
```shell
# Get magnet link from torrent file
imdl torrent link [-s, --select-only <INDICES>...] <torrent>
# Select files to download. Values are indices into the `info.files` list, e.g. `--select-only 1,2,3`.

# Get torrent file from magnet link
imdl torrent from-link [-o, --output <OUT>] <INPUT>

# Announce a torrent
imdl torrent announce <INPUT>
```
