Metadata-Version: 2.4
Name: deckmaker
Version: 0.1.1
Summary: Typed command-line client for the PresentationsAI Deck API
Project-URL: Homepage, https://www.presentations.ai
Project-URL: Documentation, https://www.presentations.ai/solutions/api
Project-URL: Help, https://www.presentations.ai/presentations-faq
Project-URL: Support, https://www.presentations.ai/presentations-faq
Author-email: PresentationsAI <support@presentations.ai>
Maintainer-email: PresentationsAI <support@presentations.ai>
License-Expression: MIT
License-File: LICENSE
Keywords: api,cli,powerpoint,presentations,slides
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Typing :: Typed
Requires-Python: >=3.11
Requires-Dist: filelock<4,>=3.13
Requires-Dist: httpx<1,>=0.27
Requires-Dist: keyring<26,>=25.6
Requires-Dist: packaging<27,>=23.2
Requires-Dist: platformdirs<5,>=4.2
Requires-Dist: pydantic<3,>=2.7
Requires-Dist: typer<1,>=0.12
Description-Content-Type: text/markdown

# PresentationsAI CLI

Create, inspect, and download PresentationsAI decks from a terminal or Python. The package includes
a typed Python client for the external Deck API and a retry-safe CLI for production workflows.

## Install

Install the command in an isolated environment with
[uv](https://docs.astral.sh/uv/guides/tools/) (recommended) or pipx:

```sh
uv tool install deckmaker
# or: pipx install deckmaker

deckmaker --version
```

Upgrade later with `deckmaker update` or `uv tool upgrade deckmaker`.

## Authenticate

Create an API key in [workspace API-key settings](https://console.presentations.ai/api-keys), then
validate and save it in your operating system credential store:

```sh
deckmaker auth login
deckmaker auth status
```

The prompt hides the key. The profile file contains only the API URL and environment-variable
name; the key itself is stored by macOS Keychain, Windows Credential Locker, or the configured
Linux keyring. To use a non-production API environment:

```sh
deckmaker auth login development \
  --base-url https://your-api-origin.example/api/v1 \
  --api-key-env PRES_API_KEY
```

Credential precedence is `--api-key`, the profile's environment variable, then the OS credential
store. In CI, use a masked secret rather than an interactive login:

```sh
export PRESENTATIONSAI_API_KEY="..."
export PRESENTATIONSAI_BASE_URL="https://api.presentations.ai/api/v1"
deckmaker auth status
```

Remove the locally stored key with `deckmaker auth logout`. Add `--revoke` to permanently
revoke the key on the server before removing it. API keys can also be created and rotated from the
URL printed by `deckmaker auth keys`.

## Create and download a deck

Generate an outline, review its plain JSON, and create a deck from the approved structure:

```sh
deckmaker create outline \
  "Create a six-slide board update grounded in the source" \
  --file ./quarterly-review.pdf \
  --slides 6 \
  --output ./reviewed-outline.json

${EDITOR:-vi} ./reviewed-outline.json

deckmaker create deck \
  --deck-title "Quarterly customer review" \
  --outline ./reviewed-outline.json \
  --request-id quarterly-review-v1 \
  --format pptx \
  --output ./quarterly-review.pptx
```

Deck generation waits for completion by default. `--no-wait` returns after acceptance; resume with
`deckmaker get status REQUEST_ID`. Prompt and source workflows target 10 slides by default.
Use `--slides 6`, `--slides 8-12`, or `--slides auto` to change that. An authored `--outline`
retains its exact slide list and cannot be combined with `--slides`.

Inspect and manage existing decks:

```sh
deckmaker list decks
deckmaker get deck DECK_ID
deckmaker get deck DECK_ID status
deckmaker get deck DECK_ID outline
deckmaker get deck DECK_ID pptx --output ./deck.pptx
deckmaker delete deck DECK_ID --yes
```

The default `get deck` output is the viewer link. `pptx`, `pdf`, and `image` download the newest
existing artifact; reads never queue a new export.

## Typed Python client

The distribution includes a `py.typed` marker, so type checkers understand the public models:

```python
import os

from deckmaker.client import PresentationsAIClient
from deckmaker.models import CreateDeckRequest

with PresentationsAIClient(
    api_key=os.environ["PRESENTATIONSAI_API_KEY"],
    base_url="https://api.presentations.ai/api/v1",
) as client:
    identity = client.get_current_principal()
    created = client.create_deck(
        CreateDeckRequest(deck_title="Board update", prompt="Summarize the quarter"),
        request_id="board-update-2026-q3-v1",
    )
    finished = client.wait_for_request(created.request_id, timeout=600)
    print(identity.email, finished.deck_id)
```

## Safe retries and output

When `--request-id` is omitted, the CLI derives a stable ID from the logical request. Uploaded file
IDs are cached by content digest, so retrying does not silently change the server fingerprint. Pass
`--new` only when you intentionally want another deck from the same input.

Retry-state files contain identifiers and SHA-256 digests only, use owner-only permissions, and are
isolated by API environment and credential. API keys and source contents are never stored there.
Use `--json` for structured output, `--quiet` to suppress progress, and
`PRESENTATIONSAI_STATE_DIR` to relocate retry state in CI.

## Help and issue reports

Run `deckmaker report-issue` for the official support route and a safe diagnostic summary.
Send problems to [support@presentations.ai](mailto:support@presentations.ai). Include the CLI
version, Python version, command shape, error code, and trace ID when available. Never include API
keys or confidential source files.

API overview: [presentations.ai/solutions/api](https://www.presentations.ai/solutions/api)

## License

MIT
