Metadata-Version: 2.4
Name: gnaww-cli
Version: 0.2.0
Summary: Official command line interface for the Gnaww print intelligence API.
Author: Jawwws Ltd
License: MIT License
        
        Copyright (c) 2026 Jawwws Ltd
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://gnaww.io
Keywords: gnaww,print,cli,api
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: httpx<1.0.0,>=0.28.0
Dynamic: license-file

# Gnaww CLI

Official command line interface for the Gnaww print intelligence API.

Gnaww accepts incomplete, inconsistent or system-originated print intent, turns it into controlled print requirements and can use SpecMatch™ to compare those requirements with compatible production capability.

Capability fit is not a live price, confirmed availability, producer acceptance or an order.

## Requirements

- Python 3.11 or newer
- a Gnaww developer API credential

## Install

The recommended isolated installation is:

```bash
pipx install gnaww-cli
```

A normal Python installation is also supported:

```bash
python -m pip install gnaww-cli
```

## Configuration

Set the scoped Gnaww API credential in your environment:

```bash
export GNAWW_API_KEY="<developer-api-key>"
```

The CLI uses `https://api.gnaww.io` by default. Optional configuration is available through:

```bash
export GNAWW_API_BASE_URL="https://api.gnaww.io"
export GNAWW_WORKSPACE_ID="<workspace-id>"
```

Keep API credentials private. Do not commit them to source control or paste them into tickets, chat or documents.

## Canonical commands

The primary developer commands use the same vocabulary as the Gnaww API and developer documentation:

```text
gnaww interpret
gnaww recipe get
gnaww recipe export
gnaww match
gnaww eat
gnaww devour
gnaww completion
```

### interpret

Interpret messy print intent through the public `POST /v1/interpret` operation. The returned `gnaww.interpretation_result` v0.2 can contain one or many independently producible Jobs:

```bash
gnaww interpret "500 A5 flyers and 50 embroidered navy T-shirts"
```

Human-readable output shows the returned intent kind, Job count, per-Job readiness and shared or Job-scoped clarification. Use `--json` when the exact public result envelope is required by another system.

Incomplete requirements remain unresolved and may return clarification information. The CLI does not invent missing identity-defining physical attributes, split Jobs itself or choose between multiple returned Jobs.

### recipe get

Retrieve and inspect one retained Recipe:

```bash
gnaww recipe get GNR-01ARZ3NDEKTSV4RRFFQ69G5FAV
```

### recipe export

Retrieve or export one Recipe or a local result:

```bash
gnaww recipe export GNR-01ARZ3NDEKTSV4RRFFQ69G5FAV --format json
gnaww recipe export result.json --format yaml
```

Local JSON and YAML export preserve the public document supplied to the CLI. Export rendering is not a second Gnaww schema or interpretation layer.

### match

Run SpecMatch™ for one resolved Recipe against an explicit capability target:

```bash
gnaww match GNR-01ARZ3NDEKTSV4RRFFQ69G5FAV \
  --quantity 500 \
  --source demo_fixture \
  --producer-profile-id arabica-line-printworks
```

The example producer is fictional and fixture-backed. Capability remains labelled as fixture-backed and does not represent live availability or producer acceptance.

### eat

A higher-level convenience flow that interprets the supplied intent, resolves a Recipe only when exactly one returned Job is eligible and continues into SpecMatch only when the required capability target is supplied:

```bash
gnaww eat "500 A5 flyers on 170gsm silk"
```

If clarification is required or the interpretation contains multiple Jobs, the command stops safely rather than guessing or selecting a Job.

### devour

Process a bounded batch from text, CSV or JSON:

```bash
gnaww devour requirements.csv
```

Each item is interpreted independently. Automatic Recipe resolution is limited to an item with exactly one eligible returned Job. Multi-Job items remain explicit for the caller to handle.

### completion

Print dependency-light shell completion:

```bash
gnaww completion bash
gnaww completion zsh
gnaww completion fish
```

## Compatibility aliases

The first preview release used Gnaww's eating-language verbs as primary command names. Those names remain available for compatibility while the canonical developer vocabulary moves into place:

```text
consume       -> interpret
digest        -> recipe get / local result inspection
crunch        -> match
regurgitate   -> recipe export / local result export
```

`consume` and `interpret` delegate to the same public `/v1/interpret` operation. The aliases do not implement a second interpretation, Job-decomposition or matching model.

## Output and safety

The CLI supports human-readable and JSON output, stable process exit codes and request/correlation identifiers returned by the Gnaww API.

Recipe ID identifies a canonical physical manufacturing definition. It is not an order number, customer identifier, producer selection, price or availability state.

Gnaww and SpecMatch™ intelligence remain server-side. This package is an API client, local input/output adapter and presentation surface only.

## Licence

MIT. See `LICENSE`.
