> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stateset.com/llms.txt
> Use this file to discover all available pages before exploring further.

# iCommerce CLI Reference

> Three binaries — natural language, deterministic commands, and the autonomous engine — with the flags that matter.

# iCommerce CLI Reference

The CLI ships **three binaries** for three different jobs. Picking the right one matters more than
any individual flag.

| Binary                | Interface                        | Use when                                                 |
| --------------------- | -------------------------------- | -------------------------------------------------------- |
| `stateset`            | Natural language, AI-interpreted | Exploring, or letting an agent phrase the request        |
| `stateset-direct`     | Explicit commands, **no AI**     | Scripts and CI, where you need the same result every run |
| `stateset-autonomous` | Scheduled jobs and workflows     | Continuous background operation                          |

<Warning>
  Use `stateset-direct` in anything automated. The natural-language binary interprets your phrasing,
  which is convenient at a terminal and a liability in a cron job — the same sentence can resolve to
  a different action as the model changes.
</Warning>

## Natural language

```bash theme={null}
# Read-only by default
stateset "show me pending orders"
stateset "list open returns for last 7 days"
stateset "show inventory for sku WIDGET-001"

# Writes need --apply
stateset --apply "create a customer named Alice with email alice@example.com"
stateset --apply "ship order #12345 with tracking FEDEX123"
```

Sessions carry context, so you can refer back:

```bash theme={null}
stateset --apply "create an order for that customer with 2 widgets at $29.99"
stateset --apply --resume <session-id> "ship that order with tracking ABC123"
```

### Flags

| Flag             | Effect                                          |
| ---------------- | ----------------------------------------------- |
| `--apply`        | Enable write operations. Without it, reads only |
| `--db <path>`    | Database path (default `./store.db`)            |
| `--resume <id>`  | Resume a previous session                       |
| `--batch <file>` | Read requests from a file                       |
| `--json`         | JSON output — use this when parsing             |
| `--verbose`      | Show telemetry                                  |
| `--stats`        | Show execution stats                            |

## Direct commands

Same engine, no interpretation layer:

```bash theme={null}
stateset-direct customers list
stateset-direct customers get alice@example.com

stateset-direct orders list
stateset-direct --apply orders ship <order-id> TRACK123

stateset-direct inventory stock WIDGET-001
stateset-direct --apply inventory adjust WIDGET-001 -5 "Sold 5 units"

# hybrid semantic + BM25 search
stateset-direct vector search products "wireless earbuds" 5
```

`--apply` gates writes here too.

## Autonomous engine

```bash theme={null}
stateset-autonomous init  --db ./.stateset/commerce.db --store ./.stateset/autonomous
stateset-autonomous start --db ./.stateset/commerce.db --store ./.stateset/autonomous
```

`init` installs the default templates; `start` runs the runtime with its scheduled jobs,
workflows, policies, and approvals.

## Payments

```bash theme={null}
stateset pay --chains                    # supported chains
stateset pay --balance
stateset pay --apply --to <address> --amount 50 --chain solana
```

Multi-chain stablecoin payments across Solana, Base, Ethereum, SET Chain, Zcash, and Bitcoin.
`--apply` is required to move money.

## Sync

```bash theme={null}
stateset sync status
stateset sync pull
stateset sync push
stateset sync stream
```

Syncs the local engine against the [sequencer](/stateset-sequencer/stateset-sequencer).

## Related

* [CLI Safety Model](/stateset-icommerce/stateset-icommerce-cli-safety) — why read-only is the default
* [CLI Workflows](/stateset-icommerce/stateset-icommerce-cli-workflows)
* [x402 Payments](/stateset-icommerce/stateset-icommerce-x402-payments)
