Metadata-Version: 2.5
Name: parcellab-cli
Version: 0.1.17
Summary: Command line interface for the parcelLab Product API
Project-URL: Homepage, https://parcellab.com
Project-URL: Documentation, https://docs.parcellab.com/docs
Project-URL: How parcelLab works, https://docs.parcellab.com/docs/how-parcellab-works
Author-email: parcelLab <support@parcellab.com>
License: Proprietary
Keywords: cli,parcellab,productapi
Classifier: Environment :: Console
Classifier: License :: Other/Proprietary License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Requires-Python: >=3.12
Requires-Dist: email-validator<3,>=2.1.0.post1
Requires-Dist: httpx2<3,>=2.5.0
Requires-Dist: httpx<1,>=0.27.0
Requires-Dist: jmespath<2,>=1.0.1
Requires-Dist: jsonschema<5,>=4.26.0
Requires-Dist: mcp<3,>=2.2.0
Requires-Dist: pydantic<3,>=2.7.0
Requires-Dist: pyyaml<7,>=6.0.1
Requires-Dist: rich<16,>=13.7.0
Requires-Dist: tomli-w<2,>=1.0.0
Requires-Dist: typer<0.28,>=0.27.0
Description-Content-Type: text/markdown

# parcelLab Product API CLI

`parcellab` is a command line interface for the parcelLab Product API. It turns the
API's resources into commands, renders results as a table, JSON, YAML or NDJSON, and
ships agent skills you can install into Claude Code and Codex.

New to parcelLab? Start with [how parcelLab works](https://docs.parcellab.com/docs/how-parcellab-works),
then the [full documentation](https://docs.parcellab.com/docs).

> This CLI is experimental and is not an officially supported product.

## Install

```bash
pip install parcellab-cli
```

or with [uv](https://docs.astral.sh/uv/):

```bash
uv tool install parcellab-cli
```

## Sign in

```bash
parcellab auth login     # pick the account in the browser, or pass its id (1 = global)
parcellab whoami
```

Login opens the Product API in your browser, where you confirm CLI access to that
account and its sub-accounts. The session lasts four hours; run login again when it lapses.

Credentials are stored per environment in `~/.productapi`. `parcellab auth show`
prints the current profile without revealing the token.

## Find your way around

Commands follow the API's own shape, `domain resource action`. Ask the CLI what
exists rather than memorising it:

```bash
parcellab --help
parcellab returns --help
parcellab returns portal --help
```

## Everyday use

```bash
parcellab returns portal list --account <ACCOUNT_ID>
parcellab returns portal show <PORTAL_ID>
parcellab track tracking list --account <ACCOUNT_ID> --limit 20
parcellab search "<TERM>"
```

Every command takes `-o table|json|yaml|ndjson`, `--jmes` for a JMESPath filter and
`--columns` to choose table columns:

```bash
parcellab returns portal list --account <ACCOUNT_ID> -o json --jmes "results[].{id:id,code:code}"
```

## Analytics data

```bash
parcellab data explore-tables
parcellab data list-data <TABLE> --account <ACCOUNT_ID>
parcellab data query <TABLE> --account <ACCOUNT_ID> --sql @query.sql
```

## Schemas

```bash
parcellab types list
parcellab types show <RESOURCE>
```

## Agent skills

```bash
parcellab skills install
```

This registers the parcelLab skills plugin with each supported agent CLI found on
your `PATH`. Start a new agent session afterwards so the skills load.

## Safety settings

Writes are gated by an edit mode, which defaults to read-only:

```bash
parcellab settings edit-mode show
parcellab settings edit-mode set account-restricted --account <ACCOUNT_ID>
```

`parcellab settings show-pii` controls whether personal data is rendered or
pseudonymised in output.

## Links

- [How parcelLab works](https://docs.parcellab.com/docs/how-parcellab-works)
- [Documentation](https://docs.parcellab.com/docs)
- [parcellab.com](https://parcellab.com)
- Support: support@parcellab.com
