Metadata-Version: 2.4
Name: merchantops-cli
Version: 0.1.0
Summary: MerchantOps operator CLI — a thin Typer layer over the generated MerchantOps SDK.
License-Expression: Apache-2.0
Project-URL: Homepage, https://merchantops.ai
Project-URL: Documentation, https://docs.merchantops.ai/tools/cli
Project-URL: Source, https://github.com/merchantops/claude-plugin
Keywords: merchantops,cli,ecommerce,catalog,pricing,product-enrichment
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Topic :: Office/Business
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Operating System :: OS Independent
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: merchantops-sdk<0.2,>=0.1
Requires-Dist: typer>=0.20.0
Requires-Dist: click>=8.0
Requires-Dist: keyring>=24.0.0
Requires-Dist: httpx>=0.24.0
Dynamic: license-file

# MerchantOps CLI

`mo` is the command-line client for [MerchantOps](https://merchantops.ai) — product catalog,
pricing, and publishing. It's what the MerchantOps onboarding skills and slash commands run
under the hood in Claude and other agent platforms, and it's equally usable on its own from a
terminal by a human operator. Every request rides your own bearer token and is bounded by your
own role-based permissions on the MerchantOps API — the CLI holds no credentials of its own.

## Install

**Prerequisite: Python 3.11 or newer.**

- macOS: `brew install python@3.11`, or the installer from
  [python.org](https://www.python.org/downloads/)
- Linux (Debian/Ubuntu): `sudo apt install python3.11`
- Windows: the installer from [python.org](https://www.python.org/downloads/)

**Recommended:**

```bash
uv tool install merchantops-cli
```

This installs `mo` (and `mo-admin`, see below) into an isolated environment and puts both on
your `PATH` automatically. If you don't already have `uv`, see
[Installing uv](https://docs.astral.sh/uv/getting-started/installation/) — it has a one-line
installer for macOS, Linux and Windows.

**Alternative — `pipx`:**

```bash
pipx install merchantops-cli
```

If `pipx` warns that its bin directory isn't on your `PATH`, run `pipx ensurepath` once and
open a new shell.

**Alternative — a plain virtualenv:**

```bash
python3 -m venv ~/.venvs/mo
~/.venvs/mo/bin/pip install merchantops-cli
```

This does **not** put `mo` on your `PATH` by itself. Either run it by its full path
(`~/.venvs/mo/bin/mo`), or add the venv's `bin` directory to your `PATH` — for example, by
adding `export PATH="$HOME/.venvs/mo/bin:$PATH"` to your shell profile (`~/.zshrc`,
`~/.bashrc`, or your shell's equivalent) and opening a new shell.

Verify the install with:

```bash
mo --version
```

## First run

```bash
mo --env prod auth login
```

This opens a browser for a MerchantOps sign-in — you'll need an existing MerchantOps account
and organization; ask whoever administers your organization's MerchantOps account for access if
you don't have one. Use `--env qa` instead of `--env prod` if you're working against a test
organization.

Once logged in, confirm the CLI can reach the API as you:

```bash
mo auth whoami
```

For unattended or CI use, set the `MERCHANTOPS_TOKEN` environment variable to a bearer token
instead of logging in interactively.

Two of the onboarding skills — `merchantops-onboard-from-site` and
`merchantops-competitive-analysis` — additionally need Node.js, the `firecrawl-cli` package, and
your own Firecrawl API key, under your own key and budget. Installing `merchantops-cli` installs
none of those; they're needed only if you run those two skills.

## `mo-admin`

Alongside `mo`, this package also installs `mo-admin` — the same client with nothing withheld
from its command tree, for human operators at a terminal who need an operation `mo` doesn't
register. The difference between the two is which commands are registered, not what you're
allowed to do: every call from either script is still bounded by your own permissions on the
MerchantOps API, resolved server-side from your own credential. Commands in the destructive
families additionally require an explicit `--execute` flag plus a typed confirmation at your
terminal before anything is sent.

## Documentation and source

- Full command reference: [docs.merchantops.ai/tools/cli](https://docs.merchantops.ai/tools/cli)
- Plugin, skills, and source: [github.com/merchantops/claude-plugin](https://github.com/merchantops/claude-plugin)
- License: [Apache License 2.0](https://github.com/merchantops/claude-plugin/blob/main/LICENSE)
