---
title: "CLI & Python SDK"
description: "Convert 3D models, text prompts, or images into SimReady assets from your terminal or your Python code with the rigyd package."
---

import { Steps, Tabs, TabItem, Aside, LinkCard } from '@astrojs/starlight/components';

`rigyd` is the official command-line tool and Python SDK for the Rigyd API. It wraps the same [conversion endpoints](/quickstart) documented here, so anything you can do over REST you can do from a terminal or a Python script. Zero dependencies — `pip install rigyd` and go.

```bash
pip install rigyd
```

<Aside type="note">
  The CLI and SDK call `https://api.rigyd.com` and spend your account's credits, exactly like a raw API call. Mint a key at **[app.rigyd.com](https://app.rigyd.com)** (Settings → API Keys).
</Aside>

## CLI

<Steps>

1. **Authenticate.** Stores your `rgyd_live_...` key at `~/.config/rigyd/config.json` (mode 600).

   ```bash
   rigyd login
   ```

   Key resolution order: `--api-key` flag → `RIGYD_API_KEY` env → config file.

2. **Convert something.**

   ```bash
   # Text → SimReady
   rigyd generate --text "wooden chair" --export isaac -o ./assets

   # Image(s) → SimReady (1 image, or all 4 views)
   rigyd generate --image front.png --image right.png --image back.png --image left.png

   # 3D file → SimReady, optionally retopologized
   rigyd convert chair.glb --tris 50000 --export all
   ```

3. **Inspect, re-download, simulate.**

   ```bash
   rigyd jobs list
   rigyd jobs get <job_id>
   rigyd download <job_id> --export mujoco   # re-download any job, 0 credits
   rigyd simulate <job_id> --scene drop      # physics demo video, 0 credits
   rigyd whoami                              # user + credit balance
   ```

</Steps>

- `--export` takes a format (`usd`, `mjcf`, `all`) or a simulator alias (`isaac` → USD, `mujoco` → MJCF). Default: `usd`.
- Progress goes to **stderr**, the result path to **stdout**, so it composes with other tools: `blender $(rigyd convert scan.obj --export usd)`. Add `--json` for a machine-readable manifest (handy for agents and CI).

| Input | Command | Cost |
|------|---------|------|
| Text prompt | `rigyd generate --text "..."` | 2 credits |
| 1 or 4 images | `rigyd generate --image ...` | 3 credits |
| 3D file (`.glb/.gltf/.fbx/.obj/.stl/.ply/.usd*`) | `rigyd convert FILE` | 1 credit |

See [Supported formats](/reference/supported-formats) for the full input list and [Pricing](/jobs/pricing) for credit costs.

## Python SDK

```python
import rigyd
rigyd.configure()                                  # key from login / RIGYD_API_KEY

job = rigyd.convert(prompt="a wooden dining chair")
job.wait(on_progress=lambda j: print(j.status, j.stage, j.progress))
usd_path = job.download(fmt="usd")                 # or "mjcf" / "all"
print(rigyd.account())                             # user + credit balance
```

`job.wait()` polls the same [job lifecycle](/reference/job-lifecycle) (`submitting → preprocessing → queued → running → completed | failed`) and raises on failure.

### MuJoCo extra

Install the optional dependency to load a result straight into MuJoCo:

```bash
pip install "rigyd[mujoco]"
```

```python
model = rigyd.load_model(prompt="a wooden chair")  # -> mujoco.MjModel, ready to mj_step
```

## Loading into a live simulator

- **NVIDIA Isaac Sim** — use the [Isaac Sim extension](/tools/isaac-sim) to generate and load assets onto the stage without leaving the app. The CLI produces the same USD files for offline or scripted pipelines.
- **MuJoCo** — `rigyd.load_model(...)` above, or `mujoco.MjModel.from_xml_path(<path from rigyd download --export mujoco>)`.

## Links

<LinkCard title="Source & full reference" description="github.com/ARTLabs-Engineering/rigyd-cli" href="https://github.com/ARTLabs-Engineering/rigyd-cli" />
<LinkCard title="Package on PyPI" description="pip install rigyd" href="https://pypi.org/project/rigyd/" />