Metadata-Version: 2.4
Name: mru-cli
Version: 0.1.5
Summary: Deploy pinned robot checkpoints and track MRU physical runs
Project-URL: Repository, https://github.com/Druzrka/mru-cli
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: modal<2,>=1.0

# MRU CLI

The standalone command-line client for [Make Robots Useful](https://app.makerobotsuseful.com).
It talks to the MRU API using your account token. Installation and login do not
require a checkpoint, a robot connection, or a Modal account.

## Install and run

Install the command once with Python 3.10 or newer:

```bash
pip install mru-cli
mru login
mru run /path/to/my-robot-job
```

If your system Python is older or `pip` does not expose installed commands on
`PATH`, install it as an isolated user tool instead, then open a new terminal:

```bash
uv tool install --python 3.12 --force mru-cli
uv tool update-shell
```

Create an account token at [Connect](https://app.makerobotsuseful.com/#connect)
and enter it in the hidden `mru login` prompt. Login verifies your identity and
saves credentials with mode `0600` in `~/.config/mru/config.json`. Do not put
tokens in chat, Git, or command arguments.

```bash
mru --url https://app.makerobotsuseful.com robot claim
mru --url https://app.makerobotsuseful.com --json deployments
```

Login authenticates the account but does not reserve the shared robot. `mru
robot claim` grants a one-hour lease when the robot is free, or reports the
account's queue position. The lease cannot transfer while a physical job is
active or queued. Use `mru robot status` to inspect it and `mru robot release`
when finished. Claiming access never starts robot motion or creates a run.
Network restrictions in an agent's environment must permit the MRU API domain
even when package installation succeeds.

`mru run PATH` accepts a job folder or `mru.json`. It validates and uploads the
model, claims robot access, asks for a final physical-safety confirmation, runs
one sequence, waits, and prints the result. If the folder has no complete model,
the command offers the MRU-provided bottle demo. An agent may use `--demo` only
after the user chooses the demo, and `--yes` only after the user separately
confirms the robot is ready and supervised.

## Upload a trained checkpoint

ACT (`act`) and pi0.5 (`pi05`) are supported checkpoint formats, not models
included with an account. Use your own complete trained checkpoint, including
weights, config, preprocessor and postprocessor. Cloud publication also needs
the assigned Modal workspace/environment, an existing volume, and a validated
runtime image. The control rate must match training.

Use `mru init --help`, `mru check --help`, and `mru deploy --help` for lower-level
project and publication controls. `mru deploy ... --no-run` publishes and
validates without queuing a physical trial.

`mru target status` reads local-inference readiness through the public MRU API.
The workcell agent owns the private inference-PC connection and reports outward
to MRU. Customer computers never connect to a Devbox, private IP, Tailscale
network, or inference port. `--target local` selects where MRU executes
inference; it does not mean the user's laptop is the inference host. The CLI
itself does not contain robot operator services.

## Develop and test

```bash
.venv/bin/python -m pip install -e .
.venv/bin/python -m unittest discover -s tests -v
```

The client manifest contract in `mru_cli/manifest.py` implements
`mru.physical-deployment/v1`. Its server counterpart lives in
`mru-web/backend/deployment_manifest.py`. Contract changes require compatibility
tests on both sides; moving repositories does not change the wire protocol.

## Build and publish

Version 0.1.5 adds the guided `mru run PATH` flow and restores the API-managed
robot access and inference-target changes shipped in 0.1.4 to the source tree.

```bash
.venv/bin/python scripts/build_release.py
shasum -a 256 releases/mru_cli-0.1.5-py3-none-any.whl
```

Review and commit the wheel together with its source. The manual
`publish-cli.yml` workflow stages only the wheel matching the supplied SHA256.
It runs only from `main`; pushing code does not publish a package.

Before the first release from this repository, configure a PyPI trusted
publisher for project `mru-cli`, owner `Druzrka`, repository `mru-cli`, workflow
`publish-cli.yml`, environment `pypi`. Configure the GitHub `pypi` environment to
allow only `main`. The previous publisher for `mru-web` does not authorize this
repository. No PyPI release is performed as part of this extraction.

This repository was extracted from `Druzrka/mru-web` commit
`7bd1a908f8cb7ee993201462a452a7b4369c0897`. It contains only customer CLI code,
its prediction-only inference wrapper, tests, and release tooling.
