Skip to main content

momentum-cli

The Momentum customer CLI + SDK: authenticate and bulk-upload field data straight to your workspace's storage bucket, and report eval runs from your own compute into your workspace.

PyPI distribution: ydderd-momentum-cli · Homebrew formula: momentum-cli · command: momentum. (The clean momentum-cli PyPI name was taken, so the distribution carries the ydderd- prefix; the import package momentum_cli, the momentum command, and the brew name are unaffected.)

Why this is a separate package

The CLI talks to the Momentum API purely over HTTP, and to Momentum's S3 storage with short-lived credentials the API mints per upload. It shares no Python code with the backend, so it ships with a tiny dependency set — httpx + boto3 — instead of the full server stack (torch, opencv, fastapi, …). That keeps the install small and avoids shipping the backend's AGPL detector to customers.

Install

brew install momentum-research-labs/momentum/momentum-cli
# or:
pipx install ydderd-momentum-cli
momentum --help

Use it with a coding agent

The CLI ships an agent skill — a description of these commands written for Claude Code, Cursor or Codex. It lives inside the package, so it always matches the version you have installed:

momentum skill install     # writes .claude/skills/momentum/SKILL.md
momentum skill print       # or just read it

Re-run with --force after upgrading the CLI. --dir writes somewhere other than .claude/skills/momentum/.

Search episodes

momentum auth whoami
momentum episodes search "scoop from one container and pour into another" --limit 5

The CLI prints the Episodes UI ranking as JSON, including title matches, camera names, video similarity scores and index coverage. Coding agents can read the search workflow with momentum skill print. See the episode search architecture.

Usage

momentum auth login                       # opens a browser for workspace approval
momentum auth whoami                      # confirm tenant
momentum datasets list                    # list datasets (id, name, description)
momentum datasets rename <dataset_id> "New name"   # rename a dataset; the id stays the same
momentum upload ./your-data --type rollout  # bulk upload; processing starts when it completes
momentum metrics dataset <dataset_id>     # each measure's spread, and the Dataset's thresholds
momentum metrics operators <dataset_id>   # per-operator error rates and driving-style deviations
momentum analysis status <dataset_id>     # whether analysis is current: ready, stale, queued, running, failed
momentum analysis run <dataset_id>        # start the ordinary analysis run; a no-op while one is queued or running
momentum findings list <dataset_id>       # the Dataset's findings and whether each is resolved
momentum findings resolve <dataset_id> --key <key> --note "…"  # resolve one finding; reopen with `findings reopen`
momentum metrics episodes <dataset_id> --limit 200  # a page of Episodes with metric values; --cursor for the next
momentum metrics episodes <dataset_id> --operator <operator_id> --tag <tag> --title <text> --has-depth  # narrowed
momentum metrics episodes <dataset_id> --measure jerk_integral --min 1000 --max 20000  # inside a range; omit --min or --max to leave that side open
momentum pulse thresholds                 # each measure's threshold, its source, and where values sit
momentum pulse thresholds set jerk_integral 12000 --direction above  # one measure; the others stay
momentum pulse thresholds clear jerk_integral  # that measure back on the code default
momentum episodes get <episode_id> [<episode_id> ...] --media  # named Episodes: measures, stall, app link; --media adds signed video URLs
momentum benchmarks create --name "RoboArena-DROID" --spec pins.json  # mint a benchmark, print its id
momentum benchmarks list --latest         # benchmark versions (one per family) to pick a pin
momentum eval run --benchmark pebk-roboarena@3 --mode smoke  # queue the platform CPU smoke path
momentum policy create --name pi05-cloudchef-v2 --class pi0  # create a policy, print its id
momentum policy list                      # the workspace's policies (id, name)
momentum policy rename <policy_id> --name pi05-cloudchef-v3  # change a policy's name; the id stays
momentum architectures list               # what a training run starts from, with each one's settings
momentum recipes create --name "pumpkin lora" --architecture <architecture_id> --gpu-type H100 --gpu-count 1  # prints the recipe and its version_id
momentum recipes save <recipe_id> --name "pumpkin lora" --architecture <architecture_id> --gpu-type H100 --gpu-count 2 --hyperparameters settings.json  # the next version
momentum recipes list                     # the workspace's recipes, each as its newest version
momentum training-runs checks --dataset <dataset_id> --recipe-version <version_id>  # what a start would find
momentum training-runs start --dataset <dataset_id> --recipe-version <version_id> --name "pumpkin lora, lr 1e-4"  # start a training run
momentum eval submit --policy <policy_id> --benchmark pebk-roboarena@3  # open an eval run, print URL
momentum secrets set lab-bucket           # store a secret (value from stdin); prints its creds_ref
momentum secrets list                     # secret names + configured (never values)
momentum gpu credentials                  # Momentum team: an hour of AWS access for GPU queue work

momentum upload requires --type, which says who drove the episodes in the upload: teleop (a person, collecting data or taking over from the policy), rollout (the policy) or dagger (the policy, with a person taking over and handing back). When the upload completes it is processed with that type and its episodes land in no Dataset. The type cannot change once a run has succeeded, and a run fails if the normalizer reads a driver the type contradicts.

A workspace with a default Dataset Type and one Embodiment needs nothing more. Without a default, momentum upload prints the uploads process command to run, naming what is missing. A large upload is processed in parts on several workers; --wait prints how many parts have finished and exits non-zero unless the run succeeded. A run's status is pending, running, succeeded, failed or canceled, and the last three are final.

momentum embodiments list                 # id, name and latest revision of each Embodiment
momentum embodiments propose <session_id> --dataset-type lerobot_trajectory_v1  # metadata camera names and source dimensions
momentum embodiments create --spec rig.json  # JSON object, file path, or - for stdin; prints id and revision
momentum uploads process 616800d20685 --type teleop --dataset-type rh20t_cfg1_trajectory_v1 --embodiment 3f8c2a1e-5b7d-4c9e-a2f1-6d0b8e4c7a93 --revision 1 --wait
momentum uploads process 7a21c0d9e4b3 --dataset-type centh_video_v1 --wait  # a video type takes no Embodiment
momentum uploads status 616800d20685      # latest run, and each failed or canceled part with where it stopped

For video-backed LeRobot v2/v3, upload the dataset directory including meta/info.json, Parquet data and videos. Select lerobot_trajectory_v1 when processing a generic source. embodiments propose reads camera names, state width, action width and FPS from the upload. Choose each camera's mount explicitly (base, left_wrist or right_wrist); include each mount at most once. A source without physical joint declarations uses a camera-only spec:

{
  "name": "Lab rig",
  "joints": [],
  "cameras": [
    {"name": "front", "mount": "base"},
    {"name": "wrist", "mount": "right_wrist"}
  ]
}

Replace the camera names with those returned by the proposal, save as rig.json, and run momentum embodiments create --spec rig.json. Pass its id and revision to momentum uploads process. Raw state and action values keep their original order and units; leave joints empty unless you have physical joint declarations. The browser's Process flow collects the same camera assignments before Save and process.

--type is needed only when the upload has none yet. A robot trajectory Dataset Type needs --embodiment and --revision unless the workspace has a single Embodiment; a video Dataset Type refuses them. Running uploads process again after a failure retries only the failed parts; after a canceled run it starts a new run.

momentum eval run --mode smoke is the platform's deployed AWS CPU smoke path. It requires either an exact peb-… benchmark id or a pebk-…@positive-version pin, plus the workspace evaluation entitlement, then prints the execution receipt and URL. It does not load a policy or simulator, produce scores/OOD, rank policies, or change inference deployment. Use momentum eval submit for an external process that reports a real policy evaluation through the SDK.

--mode world-model uses the same admission as the Eval Runs launch form. The exact benchmark pins the world model; --policy takes the id of a policy registered as runnable, not just one created by name. Verify first without allocating compute, then submit with an explicit retry identity:

momentum eval run --mode world-model --benchmark pebk-demo@1 --scenario scn-example \
  --policy <policy_id> --verify-only
momentum eval run --mode world-model --benchmark pebk-demo@1 --scenario scn-example \
  --policy <policy_id> --idempotency-key my-diagnostic-001

Reuse the same key after a lost response; a new key is a new launch intent. Submission repeats input verification and prints the execution record. This diagnostic runs two feedback windows; it does not train weights, score task success, or establish physical fidelity. An operator must configure the frozen runtime image, private seed delivery and shared compute pool.

Policies are identified by an id. momentum policy create --name makes one and prints it; that id is what eval submit --policy, eval run --policy and the SDK's policy_id take. --class is one of pi0, bc or vla. momentum policy rename changes only the name, so runs already recorded stay attached.

momentum training-runs start does what Start training on the New training run page does: it runs the checks, refuses the start when one fails (the message gives the summary of each failed check), and otherwise queues the run and the packaging of its Dataset. training-runs checks prints the same checks without starting anything. Without --name the run takes the recipe version's name; --recipe-version is the version_id that recipes create, recipes save and recipes list print. A recipe is an architecture, a GPU type and count, and the settings changed from the architecture's defaults, given to --hyperparameters as a JSON object (inline, a path, or - for stdin); momentum architectures list prints each setting's default and range. recipes save writes the next version from its flags alone, so a setting left out is at its default.

Processed LeRobot Datasets can use π0.5 (openpi), GR00T N1.7 3B (NVIDIA), or REKI 2B (Kyutai). Select the architecture id from momentum architectures list, create a recipe, and run momentum training-runs checks before starting it. The checks report each model's camera and vector requirements. After training succeeds, momentum policy pull <policy_id> downloads the run's checkpoint package.

momentum benchmarks create mints version 1 and prints its id — which is what eval submit --benchmark takes. Until it existed the only way to get that id was a browser form, so a headless run could not start from nothing. --spec carries the nested pins (target, metrics, evaluator_stack, run_config) as a JSON object: inline, a path, or - to read stdin. Pass --not-primary to mint a version without making it the family's primary.

upload always writes to your workspace's one raw prefix — there's no target to choose. What you uploaded is classified server-side once it lands, not by the client beforehand.

Bytes never pass through the API. Each upload session gets S3 credentials that are valid only for that session's prefix; the CLI PUTs files straight to the bucket with them, then confirms what landed. Credentials are issued a few hours at a time and the CLI renews them on its own, so one momentum upload can run for days — a multi-terabyte dataset needs one command, not a babysitter. Progress prints every few seconds (38.2/512.0 GB · 185 MB/s · 1,204/9,412 files).

A file that fails is retried (five attempts, backing off) and does not stop the run; the ones that still fail are listed at the end together with the command that finishes the job: momentum upload <dir> --type <type> --resume <session_id> sends only what is missing — a file already in place is checked and skipped, never sent again. Ctrl-C lets the files in flight finish, then prints the same resume command. A session stays open for 7 days after its last activity (a confirmed file or a credential renewal); after that, start a new upload.

For headless/CI use, skip the browser with a token minted by any provisioned workspace user: momentum auth login --token <fw_cli_…>.

If browser approval fails or times out, the CLI exits with a retry message instead of a traceback. Run momentum auth login again; if you switched workspaces in the browser, refresh the app and approve from the target workspace.

Config is stored at ~/.momentum/config.json (an existing ~/.flywheel/config.json is copied over once on first use). Auth precedence: MOMENTUM_CLI_TOKEN env > config file.

SDK

GPU jobs from a Metaflow flow (Momentum team)

A Metaflow step can run its GPU work on Momentum's GPU queue. run_gpu_job submits the job, waits for it (including for an admin to approve a paid plane), and returns where the outputs landed:

from metaflow import FlowSpec, current, step
from momentum_cli.gpu import run_gpu_job

class TrainFlow(FlowSpec):
    @step
    def train(self):
        self.gpu = run_gpu_job(job_spec, current=current, params={"lr": self.lr})
        self.next(self.end)

eval "$(momentum gpu credentials)" loads an hour of AWS access for pushing the job's image and reading its outputs. Only a key for the Momentum workspace can do either. A worked flow is in examples/gpu_training_flow.py.

Eval runs (policy context — the CI-integration path)

An eval process (a lab rig, Modal, the robot) creates one Episode for each execution, then attaches the evaluation result to that Episode. Results never raise into the eval process, send a heartbeat, and can reattach to a run; they buffer and flush in idempotent batches:

import momentum_cli as momentum

policy_id = "<policy_id>"                      # from `momentum policy create` or `policy list`
ev = momentum.eval_run(benchmark="pebk-roboarena@3", policy_id=policy_id, seeds=3)
episode = momentum.episodes.create(video={"camera": "rollout-0.mp4"}, control_source="policy",
                                   policy_id=policy_id)
ev.log_result(episode_id=episode.id, scenario="scn_pick", seed=0, status="success",
              scorer={"success": True, "task_progress": 1.0}, latency_p50=61.0)
episode = momentum.episodes.create(video={"camera": "rollout-1.mp4"}, control_source="policy",
                                   policy_id=policy_id)
ev.log_result(episode_id=episode.id, scenario="scn_pick", seed=1, status="fail",
              scorer={"success": False})
ev.finish()                                   # flushes any buffered results first
ev.annotate(results={"headline": {"value": 0.5, "ci": [0.31, 0.69]}})   # post-hoc scoring

eval_run() prints the run URL on create; eval_run(run_id=…) (or MOMENTUM_EVAL_RUN_ID) reattaches after a preemption. Runs land in the UI under Eval runs. An unknown policy_id is refused, and eval_run() returns a disabled handle. episodes.create(policy_id=…) records which policy drove the Episode; leave it out when that is unknown. episodes.create(task=…) takes a task id from momentum tasks list.

Episode ingestion and secrets

Episode creation uses the same upload-session workflow as every other ingest path. Upload the source dataset unchanged with its type; processing creates database-owned Episode identities and the application-readable artifacts, in no Dataset:

momentum upload ./session_042 --type teleop
momentum datasets create "Training demonstrations" --episode <episode_id>  # when you need a Dataset

Read one cursor page of the Dataset's normalized Episodes to verify an ingest or discover IDs for curation:

page = momentum.episodes.list(dataset_id="<dataset_id>", limit=100)
while page:
    for episode in page["items"]:
        print(episode["id"], episode["task_label"], episode["outcome"])
    cursor = page["page_info"]["end_cursor"]
    if cursor is None:
        break
    page = momentum.episodes.list(
        dataset_id="<dataset_id>", limit=100, cursor=cursor
    )

limit defaults to 50 and is capped at 200. The call returns one page with items, page_info, and total_count; it never loads the tenant's complete Episode corpus implicitly. Named secrets remain available for supported external-service configuration; values are encrypted at rest and never returned by a read.

Auth: MOMENTUM_API_KEY env (a fw_cli_… token — inject it as a secret in your training environment), falling back to the token saved by momentum auth login. MOMENTUM_API_URL overrides the API endpoint. with momentum.eval_run(...) as ev: marks the run failed (with the exception) if the block raises. Runs land in the workspace UI under Eval runs.

Release/consumption mechanics (PyPI, git-ref installs, versioning): see PUBLISHING.md.

Developer notes

These knobs exist for Momentum developers and are intentionally hidden from customer-facing help and docs:

  • --api-url <url> on momentum auth login — persist a non-production API base URL to the config (e.g. a local API). Hidden via argparse.SUPPRESS.
  • MOMENTUM_API_URL env — override the API base per-invocation. Takes precedence over the config file.

Precedence for the API base URL: MOMENTUM_API_URL env > api_url in config > default (https://api-aws.momentumbots.io/api, the hosted production API on AWS).

Point the CLI at a local backend during development:

MOMENTUM_API_URL=http://localhost:8000 momentum auth whoami
# or persist it:
momentum auth login --token <fw_cli_…> --api-url http://localhost:8000

Local development

cd cli
uv sync
uv run momentum --help
uv run pytest

Releasing (PyPI + Homebrew)

PyPI is the source of truth; the Homebrew formula wraps the published PyPI sdist.

1. Publish to PyPI — via GitHub Actions (Trusted Publishing, no token)

The .github/workflows/publish-cli.yml workflow builds and publishes over OIDC. Cut a release by pushing a namespaced tag from the monorepo default branch:

git tag cli-v0.1.0 && git push origin cli-v0.1.0

The PyPI project is ydderd-momentum-cli, published from momentum-research-labs/momentum via the pypi environment. (First publish activates the "pending" Trusted Publisher and creates the project.)

2. Update the Homebrew tap formula

After the PyPI release exists, point release.sh at your tap checkout — with SKIP_PUBLISH=1 it skips the upload, fetches the published sdist's url/sha256, writes an explicit formula version, refuses placeholder formula values, and regenerates Python resource blocks:

SKIP_PUBLISH=1 \
FORMULA_PATH=/path/to/homebrew-momentum/Formula/momentum-cli.rb \
  cli/scripts/release.sh

Then commit + push the tap. Customers install with:

brew install momentum-research-labs/momentum/momentum-cli

release.sh can also publish to PyPI itself (UV_PUBLISH_TOKEN=pypi-… cli/scripts/release.sh) if you prefer a token-based local release over the GitHub Action.

Bumping a release: change version in pyproject.toml and src/momentum_cli/__init__.py, push a new cli-v* tag, then re-run step 2. release.sh refuses to continue if those versions drift.

Metadata

Release files for ydderd-momentum-cli 0.19.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ydderd-momentum-cli 0.19.0
File Size Uploaded Provenance Actions
ydderd_momentum_cli-0.19.0.tar.gz 116.8 kB With provenance Details for ydderd_momentum_cli-0.19.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ydderd-momentum-cli 0.19.0
File Interpreter ABI Platform Actions
ydderd_momentum_cli-0.19.0-py3-none-any.whl Python 3 none any Details for ydderd_momentum_cli-0.19.0-py3-none-any.whl

Total release size: 189.9 kB

Release files / ydderd_momentum_cli-0.19.0.tar.gz

Download URL ydderd_momentum_cli-0.19.0.tar.gz
Size 116.8 kB
Tags Source
SHA-256 checksum
How to use checksums
9c216a6c4906552cf02b9e4abf7982ad7d0cf2483d11e3b15058496a42f9c5b2
BLAKE2b-256 checksum
How to use checksums
7a8cc315e92bf0631d0a2f41d6c3850227da6211d6a7fee927348bbf42c09549
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 20, 2026.

Transparency log

Release files / ydderd_momentum_cli-0.19.0-py3-none-any.whl

Download URL ydderd_momentum_cli-0.19.0-py3-none-any.whl
Size 73.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9fe4519f0d2bb1d704dd1d438b099e1d41c229e99455faef99ebc0d1a8afdcc4
BLAKE2b-256 checksum
How to use checksums
cb16009ffaba2950fcd15863a9fe4feda2fed97955711a792b4bfda7b1054f35
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 20, 2026.

Transparency log

Security for ydderd-momentum-cli 0.19.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for ydderd_momentum_cli-0.19.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 20, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page