Metadata-Version: 2.4
Name: iterfact
Version: 0.2.2
Summary: Python SDK and CLI for IterFact interactive documents.
Author: IterFact
Keywords: iterfact,mcp,interactive-documents,artifacts
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Operating System :: OS Independent
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: httpx>=0.28.0
Requires-Dist: PyYAML>=6.0.2
Requires-Dist: python-dotenv>=1.0.1
Requires-Dist: mcp[cli]>=1.11.0
Provides-Extra: dev
Requires-Dist: ruff>=0.11.8; extra == "dev"
Requires-Dist: radon>=6.0.1; extra == "dev"
Requires-Dist: coverage>=7.0; extra == "dev"

# iterfact

Installable CLI and MCP server for IterFact interactive documents.

## Install

```bash
pip install iterfact
```

## Connect your account

Account-bound package calls use an IterFact account token. The simplest setup path is:

```bash
iterfact configure
```

That command opens `iterfact.com/settings/tokens`, prompts for an `itf_...` token, and saves it to:

```text
~/.iterfact/config.json
```

You can also pass a token directly in Python:

```python
from iterfact import IterFactClient

client = IterFactClient(api_key="itf_...")
```

Read-only checks like `health()` and `analyze_upload_artifact_html(...)` can run without a token. Account-bound operations like uploads, generation, and page publishing use the credits and permissions of the connected IterFact account.

## Run

```bash
iterfact-mcp --host 0.0.0.0 --port 8000
```

Or:

```bash
iterfact mcp --host 0.0.0.0 --port 8000
```

## What it includes

- the IterFact MCP server
- the bundled IterFact template vault
- the CLI entrypoints needed to run IterFact locally
- the Python client for calling the live IterFact MCP and status endpoints

## Notes

- For local preview and screenshot features, install Chromium for Playwright:

```bash
python -m playwright install chromium
```

- Configure the required environment variables before running against your own services.

## Telemetry

The official CLI sends a small anonymous usage ping on:

- first successful local use
- then at most once per 24 hours per command

It includes package version, Python version, OS, entrypoint, and command name.
It does not send prompts, files, artifact contents, or account credentials.

Disable it with:

```bash
ITERFACT_NO_TELEMETRY=1
```

Package download analytics are measured separately through the public PyPI ecosystem:

- `pypistats.org`
- `pepy.tech`
- the official PyPI BigQuery dataset
