CLI Internals¶
The eden command is an argparse tree declared in one table. eden/__main__.py holds COMMANDS, one Command
per subcommand, and imports each handler from its area module under eden/utils/cli/; eden.utils.cli.registry
holds the Command shape and the build and dispatch helpers, and knows nothing about which commands exist. To add a
subcommand, write its handler in the area module it belongs to and add a Command entry to COMMANDS; the module
docstrings of eden/__main__.py and eden/utils/cli/registry.py describe the contract. For what each command
does, see the CLI reference.
Command table¶
Eden command-line interface entry point.
Declares the COMMANDS table — one :class:Command per subcommand, wiring
each to a handler in the area modules under :mod:eden.utils.cli (grouped by
area: tasks, terms, examples, viewers, devices,
dataset, pose, retarget, teleop, maintenance) — then
builds the argparse tree and dispatches over it via the primitives in
:mod:eden.utils.cli.registry.
This is a curated in-tree table, not an :class:eden.utils.registry.Registry:
commands are instances, the set is closed, and there's no plugin discovery.
To add a subcommand: write the handler in its area module, then add one
:class:~eden.utils.cli.registry.Command entry to COMMANDS below — that
class documents the three shapes an entry can take.
Attributes¶
COMMANDS
module-attribute
¶
COMMANDS: tuple[Command, ...] = (Command('list', 'List all available tasks', handler=_run_list), Command('terms', "List every registered term and the parameters it accepts (e.g. 'eden terms --kind reward', 'eden terms --json')", handler=_run_terms, configure=_configure_terms), Command('examples', 'Browse the runnable examples catalog under examples/', subcommands=(Command('list', "List/filter example scripts by tier, capability, or hardware (e.g. 'eden examples list --tier recipe --capability sensor')", handler=_run_examples_list, configure=_configure_examples_list), Command('smoke', 'Smoke-run one example headless in a few steps (EDEN_SMOKE); refuses examples needing hardware/devices/missing deps', handler=_run_examples_smoke, configure=_configure_examples_smoke))), Command('train', "Train a registered task. Use 'eden train --task <name> --help' for task options.", handler=train_task, forwards_extra=True), Command('inference', "Run inference for a registered task with a trained checkpoint, or roll out a frozen extension policy in sim (--policy). Add --async for a deployment-style, wall-clock-paced rollout (a sim-side dry run of 'eden deploy').", handler=inference_task, forwards_extra=True), Command('export', "Export a trained checkpoint's policy as ONNX / TorchScript plus a policy_spec.json (observations, actions, control rate) for a runtime outside Eden.", handler=export_task, forwards_extra=True), Command('deploy', "Deploy a trained task policy on real hardware (robot picked from the task's scene), or against a MuJoCo model of that robot for sim-to-sim validation (--mujoco).", handler=deploy_task, forwards_extra=True), Command('preprocess', 'Build the v2 dataset cache for a registered task. Supports --num_batches/--batch_idx for multi-GPU sharding.', handler=preprocess_task, forwards_extra=True), Command('smoke', "Build a registered task and step it a few times with no action — a quick end-to-end sanity check. Use 'eden smoke --task <name> --help' for options.", handler=smoke_task, forwards_extra=True), Command('datagen', "Generate scripted, demo-like demonstrations of a task into an HDF5 dataset (OCBench-style demonstrators). Use 'eden datagen --task <name> --help' for options.", handler=_run_datagen, forwards_extra=True), Command('gello', 'Gello commands', subcommands=(Command('calibrate', "Calibrate the Gello leader arm (pass --help after 'calibrate' for options)", handler=_run_gello_calibrate, forwards_extra=True), Command('leader', "Read the Gello leader arm and send the joint states to a GelloZMQServer (pass --help after 'leader' for options)", handler=_run_gello_leader, forwards_extra=True))), Command('lerobot', 'LeRobot dataset commands', subcommands=(Command('convert', "Convert an Eden HDF5 recording into a LeRobot v3 dataset (pass --help after 'convert' for options)", handler=_run_lerobot_convert, forwards_extra=True),)), Command('metaquest', 'Meta Quest WebXR teleoperation commands', subcommands=(Command('bridge', "Run the televuer XR bridge (requires the 'metaquest' extra; pass --help after 'bridge' for options)", handler=_run_metaquest_bridge, forwards_extra=True),)), Command('pico', 'PICO (XRoboToolkit) teleoperation commands', subcommands=(Command('bridge', "Run the PICO XR bridge — publishes headset/controller tracking and streams the stereo view back to the headset (requires the 'pico' extra; pass --help after 'bridge' for options)", handler=_run_pico_bridge, forwards_extra=True),)), Command('teleop', 'Teleoperation pipelines (operator station + robot process)', subcommands=(Command('sonic', 'GEAR-SONIC whole-body teleoperation (PICO)', subcommands=(Command('robot', "Run the robot process: Genesis G1 body + SONIC policy + planner; listens for the operator's ZMQ commands (pass --help after 'robot' for options)", handler=_run_sonic_robot, forwards_extra=True), Command('operator', "Run the operator station: PICO body tracking, mode state machine, calibration, and streaming to the robot process (pass --help after 'operator' for options)", handler=_run_sonic_operator, forwards_extra=True))),)), Command('pose', 'Human pose / motion estimation (video → SMPL motion)', subcommands=(Command('gvhmr', "World-grounded SMPL-X motion from monocular video via GVHMR (pass --help after 'gvhmr' for options)", handler=_run_gvhmr, forwards_extra=True),)), Command('retarget', 'Motion retargeting (human → robot)', subcommands=(Command('omniretarget', "Robot-only OMOMO → G1 retargeting via OmniRetarget (pass --help after 'omniretarget' for options)", handler=_run_omniretarget, forwards_extra=True), Command('otretarget', "Joint robot + object retargeting from surface interactions via OTRetarget (OMOMO hands/body/object, BONES-SEED BVH; pass --help after 'otretarget' for options)", handler=_run_otretarget, forwards_extra=True), Command('soma', "Batch SMPL/SMPL-H/SMPL-X → robot retargeting via SomaRetargeter (pass --help after 'soma' for options)", handler=_run_soma, forwards_extra=True), Command('dex', "Offline MANO-keypoint → dexterous-hand position retargeting via DexRetargeter (pass --help after 'dex' for options)", handler=_run_dex, forwards_extra=True), Command('flashdex', 'FlashDexRetarget: human hand-object demos (TACO / OakInk2 / HOT3D / DexYCB) → bimanual robot-hand motion.pt', subcommands=(Command('import', "Import a released dataset into <dataset>/human_demo/ and objects/ (pass --help after 'import' for options)", handler=_run_flashdex_import, forwards_extra=True), Command('kinematic', "Support disks, convex parts, MuJoCo physics IK and motion.pt for one robot (pass --help after 'kinematic' for options)", handler=_run_flashdex_kinematic, forwards_extra=True))))), Command('wuji', 'Wuji Glove teleoperation commands', subcommands=(Command('scan', "List every Wuji Glove on the bus (requires the 'wuji' extra)", handler=_run_wuji_scan, forwards_extra=True), Command('monitor', "Watch a Wuji Glove's live hand pose and tactile sheet in the terminal — the first check after plugging one in (requires the 'wuji' extra; pass --help after 'monitor' for options)", handler=_run_wuji_monitor, forwards_extra=True))), Command('gif', 'Convert mp4 video to gif', handler=_run_gif, configure=_configure_gif), Command('view', 'View an entity by name, or a gaussian-splat .ply by path', handler=_run_view, configure=_configure_view), Command('arrange', 'Interactively arrange entities with ImGui sliders (base 6-DoF + joints) and export a SceneOptions snippet', handler=_run_arrange, configure=_configure_arrange), Command('snap', 'Take a snapshot of the scene/entity', handler=_run_snap, configure=_configure_snap), Command('clean', 'Clean up logs', handler=_run_clean))
Functions:¶
main
¶
Eden CLI entry point: build the parser from COMMANDS and dispatch.
Source code in eden/__main__.py
Command primitives¶
Command primitives for the eden CLI: the :class:Command shape and the
argparse build/dispatch helpers.
This module is pure mechanism — it knows nothing about which commands exist.
eden.__main__ declares the COMMANDS table (importing the handlers from
the area modules) and drives _add_command / _dispatch over it. Keeping
the table out of here means importing these primitives never pulls the command
bodies.
Classes¶
Command
dataclass
¶
Command(name: str, help: str, handler: Callable | None = None, configure: Callable[[ArgumentParser], None] | None = None, forwards_extra: bool = False, subcommands: tuple[Command, ...] = ())
One CLI subcommand (or subcommand group). Three mutually exclusive shapes:
- forwarding (
forwards_extra=True) — declares no flags; the rawextra_argsare handed tohandler(extra_args)for the command to parse itself (the task commands build their flags from the task's config schema).--helpis left to the handler, so argparse auto-help is off. - self-parsed (
configureset, or neither) — declares flags viaconfigure(parser)(omitted for no-arg commands likelist); the parsed namespace goes tohandler(args). - group (
subcommandsset) — a parent likegellothat dispatches to one of its children. Children may be any shape (_dispatchrecurses).
__post_init__ enforces the shape contract so a misconfigured entry fails
at import, not silently at dispatch.
Task commands¶
The handlers of eden train, eden inference, eden export, eden deploy, eden preprocess and eden smoke.
Task-execution commands: train, inference, export, deploy, preprocess, smoke.
Functions:¶
train_task
¶
eden train --task <name> [task-mod flags] — train a registered task.
Forwards extra_args (everything after train) to
:func:eden.tasks.parser.get_task_argparser. The argparser also uses
extra_args (not sys.argv) for its --task peek, so the same
arg slice drives both mod-flag registration and the final parse.
Dispatches into the right framework (rsl_rl by default, rl_games when
the task's runner_options is an RlGamesPpoRunnerOptions).
Source code in eden/utils/cli/tasks.py
322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 | |
inference_task
¶
eden inference --task <name> --checkpoint <path> [task-mod flags].
Loads a trained checkpoint and runs the eval loop for episode_length_s (or
--steps / --episodes), through rsl_rl or rl_games — whichever the task's
runner_options selects, after :func:_check_checkpoint_framework confirms the
checkpoint was saved by it.
Frozen extension policies (POLICY_REGISTRY) can be rolled out in sim
instead of a checkpoint via --policy NAME — the sim counterpart of
eden deploy --policy. With --task, the policy runs on the task's
env (the policy's command terms are merged in); without one, the env is
built from the policy's own spec methods on an empty scene with the
--robot robot.
With --async (a.k.a. --sim2sim) the rollout runs deployment-style
instead: policy inference moves to an async background thread and the sim
loop is paced to wall-clock env.dt, repeating the last action whenever
inference hasn't finished — a sim-side dry run of eden deploy. This
applies to both checkpoints and --policy extension policies. See
:func:_run_sim2sim_loop.
Source code in eden/utils/cli/tasks.py
435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 | |
export_task
¶
eden export --task <name> --checkpoint <path> [--format onnx,jit] [--out DIR].
Writes the checkpoint's policy as a graph a runtime outside Eden can load (ONNX, TorchScript) and a
policy_spec.json describing its observations, actions and control rate (:mod:eden.learning.export).
The env is built from the checkpoint's own config.json, as eden inference builds it, with one env in
eval mode and without the event terms that would randomize what the spec records as nominal: the spec is read
off it, and every graph is checked against the policy on its observations.
Source code in eden/utils/cli/tasks.py
597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 | |
deploy_task
¶
eden deploy --task <name> --checkpoint <path> [task-mod flags].
Run a trained policy on real hardware. The deployment backend is picked
automatically from the robot bound to the task's scene entity via
:func:eden.extensions.deployment.resolve_deployment_for — to support a
new robot, add a single bind_deployment(...) line in its deployment
module.
By default (G1 robots) the frozen Holosoma loco policy is preloaded as
slot 1 and is the policy active on boot: after INIT → START the robot
stands (or walks --base_command) under a known-good controller, and
the operator switches to the checkpoint slot(s) — and back — via the
remote Select button or keyboard n / 1-9. Pass
--base_policy none to restore checkpoint-as-slot-1.
Frozen extension policies (POLICY_REGISTRY) can be preloaded as
additional slots via --policy NAME. Either --task or --policy
must be given: with a task, extension policies ride along on the task's
env and --checkpoint becomes optional; without a task, the env is
built on an empty scene with the --robot robot from the spec of the
loaded policy that reads it, else of the first policy --policy named
(:func:_env_owning_slot) — checkpoints then require --task.
Each slot converts its own actions, through the policy's own controller
(:func:_slot_controllers) or, for the env-owning policy, through the env's
action manager, so a policy is not required to emit absolute targets.
The function disables training-only randomization (push, friction /
COM / encoder-bias randomization) and forces num_envs=1 so the
policy drives a single physical robot. The sim env is still built (with
the viewer optionally open) so it can mirror robot state for
visualization while the policy runs on hardware.
Source code in eden/utils/cli/tasks.py
698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 | |
preprocess_task
¶
eden preprocess --task <name> — build the task's dataset cache.
Walks the task's motion_options tree, instantiates every configured
DatasetBase once, and triggers the prepare() + save_cached()
chain. Use this to pre-warm the v2 mmap cache before launching training,
especially when the modifier stack includes expensive offline steps like
SmoothStartTransition (per-clip IK).
For libraries large enough that single-process IK preprocessing is too
slow, pass --num_batches N --batch_idx K and launch one process per
GPU (CUDA_VISIBLE_DEVICES=0 ... batch_idx=0 ... &); each process
handles a contiguous slice of the clip list. Caches land at
processed_data_path-keyed paths (one per batch when num_batches > 1).
Source code in eden/utils/cli/tasks.py
3571 3572 3573 3574 3575 3576 3577 3578 3579 3580 3581 3582 3583 3584 3585 3586 3587 3588 3589 3590 3591 3592 3593 3594 3595 3596 3597 3598 3599 3600 3601 3602 3603 3604 3605 3606 3607 3608 3609 3610 3611 3612 3613 3614 3615 3616 3617 3618 3619 3620 3621 3622 3623 3624 3625 3626 3627 3628 3629 3630 3631 3632 3633 3634 3635 3636 3637 3638 3639 3640 3641 3642 3643 3644 3645 3646 3647 3648 3649 3650 3651 3652 3653 3654 3655 3656 3657 3658 3659 3660 3661 3662 3663 3664 3665 3666 3667 3668 3669 3670 3671 3672 3673 3674 3675 3676 3677 3678 3679 3680 3681 3682 3683 | |
smoke_task
¶
Build a registered task and step it a few times with no action (end-to-end smoke check).