Knonik Export

Export is the reverse of ingest: it reads data already in Knonik format — packed KHLP shards or pre-pack episode directories (both auto-detected) — and writes it back out in a format other tools can read. Use it to hand a dataset to software that does not speak Knonik, or to round-trip between formats.

Export ships in the same wheel as ingest and the dataloader (see Ingest → Install), and it is gated by the same ingest entitlement — if you can ingest, you can export, with no separate login:

knonik login --product ingest

Supported Targets

Format--formatNotes
Zarrzarr
NumPynpy
HDF5hdf5
LeRobot v2 / v3lerobot_v2 / lerobot_v3
ROS bag / MCAProsbag / mcapROS1 .bag / ROS2 .mcap.
RLDS / TFRecordrlds / tfrecordNeeds TensorFlow installed.
D3ILd3il

From The Terminal

knonik export \
  --input  /home/me/data/out/knonik_thread_velcro \
  --output /home/me/data/exported/thread_velcro_hdf5 \
  --format hdf5
  • --input is a Knonik-format path: a packed KHLP file/dir (containing hlp_manifest.json) or an episode directory produced by ingest. The input type is auto-detected; force it with --source khlp or --source episode_dir.
  • --output is the destination directory.
  • --format is the target from the table above. It overrides format in a --config file, if you pass one.

From Python

Use the public wrapper knonik.export.run, the mirror of knonik.ingest.run. It returns the list of written output paths.

from knonik.export import run

paths = run(
    input="/home/me/data/out/knonik_thread_velcro",
    output="/home/me/data/exported/thread_velcro_hdf5",
    format="hdf5",
)
print(paths)

You can also drive it from a config dict, with any per-exporter settings under options:

from knonik.export import run

run(config={
    "format": "lerobot_v3",
    "input":  "/home/me/data/out/knonik_thread_velcro",
    "output": "/home/me/data/exported/thread_velcro_lerobot",
    "options": {},          # per-exporter settings, when a target supports them
})