WildID › Command line
WildID on the command line
The engine behind the Lightroom plugin is also a command-line tool. It identifies single files or whole folders, prints the result as text or JSON, and can write keyword sidecars for RAW files. It is the way to use WildID on Linux, and it works on Windows and macOS too.
The two commands
wildid PATH [options] identify a file or a folder, subfolders included
wildid prefetch [options] download models and place lists; the only online command
From a source checkout, put uv run in front: uv run wildid PATH. The Linux setup shows the installation. With the Windows installer, the same tool is wildid.cmd in %LOCALAPPDATA%\Programs\WildID. After the macOS installation it is wildid in ~/Library/Application Support/WildID/bin, or plain wildid in a new Terminal window if you let the installer add it to your PATH.
Reading the output
wildid 0.3.1 | model=bioclip-2 device=cuda precision=tf32 | candidates=412 species (Brazil › Mato Grosso; Mammalia,Reptilia,Amphibia,Aves; fetched 2026-10-23)
note: scores are a softmax over the candidate set and are not comparable between runs with different candidates
DSC04512.ARW
1. Panthera onca Jaguar 0.962
2. Puma concolor Puma 0.021
3. Leopardus pardalis Ocelot 0.009
unconstrained top-1: Panthera onca (0.871)
The first line names the model, the device and the candidate list. On a Mac the device is mps, the graphics processor of Apple Silicon, and the precision is fp32. Each photo then gets a block with the best matches and their scores. With a place list, the last line shows the answer the model gives without the list, as a cross-check. Results go to standard output and progress messages to standard error, so the results can be redirected into a file.
Common options
| Option | What it does |
|---|---|
--crop | Finds the animal with MegaDetector and identifies the crop. Recommended. |
--crop-exact | With --crop: reduces the photo for the detector with a method that gives the same result on a Mac and a PC. Off by default. Why a Mac and a PC can differ |
--country, --region, --continent, --place-id | Limits the candidates to the species recorded in a place. Fetch the list first with wildid prefetch and the same option. |
--geo-auto | Picks the country for each photo from its GPS position. Prepare it with wildid prefetch --gps-from FOLDER. |
--model bioclip-2.5 | Uses the larger model, which does not know reptiles. |
--second-opinion | Adds SpeciesNet’s verdict on each photo. |
--k 5 | The number of candidates printed per photo. |
--format json --output run.json | Writes one JSON document with the candidates, the review flag and the suggested keywords for every photo. |
--write-xmp | Writes the keywords as XMP sidecars next to RAW files. See below. |
--offline | Forbids every network call and fails at once if something is missing. |
Keyword sidecars before you import
uv run wildid /media/card/DCIM --crop --country Kenya --write-xmp
This writes an .xmp file next to each RAW file, with the same keywords the Lightroom plugin would add. Lightroom Classic reads them when you import the photos. Use it on a memory card or a fresh folder, before the import.
- Sidecars are written for RAW files only. JPEG and DNG keep their metadata inside the file, and WildID never modifies photo files.
- An existing sidecar is left alone, because it may hold develop settings.
--xmp-mode mergeadds the keywords to it and changes nothing else. --dry-runreports what would be written.
For photos that are already in a Lightroom catalog, use the plugin. It writes through the catalog, which avoids conflicts between the catalog and files on the disk.
Before a trip
uv run wildid prefetch --model all --crop --second-opinion --country Kenya
uv run wildid --offline test.jpg --country Kenya
The first line downloads everything for the destination. The second proves that an identification runs without the network.
Exit codes
| Code | Meaning |
|---|---|
| 0 | Finished. Files that could not be read are listed on standard error. |
| 1 | A wrong option, or a place list that is missing. |
| 2 | The model could not be loaded, for example because it was never downloaded. |
| 3 | Not a single image could be read. |
The complete reference, with every option, is the README on GitHub.