Skip to content

NKDS CLI

Nanook edited this page Sep 24, 2026 · 2 revisions

Command reference for the nkds command-line application.

For core concepts and how the storage format works, see NKDS. For quick copy-paste examples, see the NKDS CLI Cheat Sheet.

Interactive Mode

Run nkds with no arguments (or drop a DataStore path onto the executable) to launch the interactive guided builder. Pick a command, answer the prompts, and it shows the full equivalent command before running it.

# Launch interactive builder
nkds

# Drop a DataStore path — interactive launches with it pre-seeded
nkds /data/nkit/wii.nkds

Commands

Command Alias Description
create — Create a new set
add — Import disc images (runs full NKit dedupe pipeline)
adddir — Store directory contents directly (bypasses NKit pipeline)
ogmr — Batch import with per-game routing via regex YAML
list ls List stored images
remove rm Soft-delete images (data preserved until compact)
restore — Restore previously soft-deleted images
compact cp Permanently delete removed image data and reclaim space
rollback — Revert a set to a previous image state
verify vfy Verify stored image integrity
export — Export images (expand or convert to any format)
sets — List all sets in a DataStore
stats — Storage statistics
mount — Mount as a virtual filesystem drive

Quick Start

1. Create a set

nkds create --datastore D:\NKitData wii

2. Add images

nkds add --datastore D:\NKitData\wii.nkds D:\WiiISOs --recursive

This runs the full NKit pipeline: detect system, normalise, deduplicate, verify, and store.

3. Check stats

nkds stats --datastore D:\NKitData\wii.nkds

4. Mount as a virtual drive

nkds mount --datastore D:\NKitData --mount N:\

nkds mount --datastore /data/nkit --mount /mnt/nkit

Your emulator sees regular ISOs. No extraction needed.


Common Options

Option Description
--datastore, -ds DataStore directory or explicit .nkds set path
--mask, -m Image name wildcard mask for filtering (verify, export)
--output, -out Output folder (export)
--format, -f Output format for export (e.g. rvz:zstd:19:128k:16) or list/stats format (text, json, yaml)
--config, -cfg Path to an NKit YAML config file
--recursive, -r Scan input folders recursively (add, ogmr)
--no-archives Skip scanning inside archives (add, ogmr)
--shard-size, -ss Max shard file size for new sets (default 50 GiB, 0 = embedded)
--block-size, -bs Deduplication block size for new sets (default 64 KiB)

DataStore path behaviour

  • --datastore D:\NKitData\wii.nkds — operations scoped to the wii set only
  • --datastore D:\NKitData — operations apply to all sets in the directory

Mount Options

Option Default Description
--mount, -m — Mount point (drive letter on Windows, directory on Linux)
-i — Show images as files
-fs — Show disc filesystem as folders
-s — Show system entries (headers, filesystem.yaml)
-u off Enable write operations (rename/delete from file explorer)
--uid — Owner UID for mounted files (Linux only)
--gid — Owner GID for mounted files (Linux only)
--allow-other off Allow other users to access the mount (Linux only)

When no view flags are specified, the default is image + filesystem views.

Unmount: Press Ctrl+C in the nkds mount console, or use your OS unmount command.


NKit Parameter Pass-Through

The add, ogmr, verify, and export commands pass unrecognised options directly to the NKit engine. Any valid NKit parameter can be appended — keys, dats, verification mode, etc.

nkds add --datastore D:\NKitData\wiiu.nkds D:\WiiU --recursive -keys WiiUKeys.zip

nkds verify --datastore D:\NKitData\wii.nkds --mask *.iso -dat wii.dat -v datLookup

nkds export --datastore D:\NKitData\wii.nkds --mask *.iso -out C:\Temp --format rvz:zstd:19:128k:16 -dat wii.dat -outAsDatMatch y

See NKDS CLI Cheat Sheet for comprehensive pass-through parameter documentation.


Size Syntax

Shard and block sizes accept these suffixes (case-insensitive):

Suffix Meaning
KiB, KB Kilobytes
MiB, MB Megabytes
GiB, GB Gigabytes
TiB, TB Terabytes

Examples: 50GiB, 10GB, 64KiB, 0 (embedded mode)

Clone this wiki locally