# Generate AI checklists from PDFs: web app and CLI

## What it does
Creates a structured checklist based on the content of an uploaded PDF. The AI reads the whole document, interprets a user‑provided goal, and returns a numbered list of items with optional priorities, categories, and source references.

## Inputs and limits
* **Input file** – a single PDF (other formats are accepted on the web page but the CLI only works with PDFs).  
* **Goal** – text description of the desired checklist purpose (`--topic`).  
* **Checklist type** – `tasks`, `requirements`, `review`, or `compliance` (`--checklist-type`).  
* **Detail level** – `low`, `moderate`, or `high` (`--detail-level`).  
* **Maximum items** – optional integer (`--max-items`).  
* The CLI reads the PDF from an input folder defined by `PLUGIN_INPUT_DIR` and writes the result to `PLUGIN_OUTPUT_DIR`.  
* Requires a Documentize license file (`documentize.lic`) next to the plugin DLL; without it the plugin runs in evaluation mode.

## Web app
The page `/ai-prod/check-list` asks you to upload a PDF, enter a goal, select a checklist type (Tasks, Learning, Preparation, Analysis), choose a detail level, and optionally set a maximum number of items. After processing it returns two PDFs: an annotated copy of the original document and a clean standalone checklist.

## Command line (CLI)
The Documentize.CheckList CLI plugin generates a checklist from a PDF placed in a task‑specific input folder. Provide the goal and optional parameters as flags; the runner creates a task ID folder automatically if you do not set `--task-id`.

Options (exact names from the README):

| Flag | Type | Default | Description |
|---|---|---|---|
| `--topic` | string | `""` | Checklist topic (goal). |
| `--checklist-type` | string | `"tasks"` | Type of checklist: `tasks`, `requirements`, `review`, `compliance`. |
| `--detail-level` | string | `"moderate"` | Level of detail: `low`, `moderate`, `high`. |
| `--max-items` | int | `20` | Maximum number of checklist items. |
| `--task-id` (or `--id`) | string | generated GUID | Identifier for the input/output folders. |

Typical usage steps (described in text, not as a code block):

1. Set `PLUGIN_INPUT_DIR` and `PLUGIN_OUTPUT_DIR` environment variables to directories you control.  
2. Create a subfolder in the input directory for your task, e.g., `job1`.  
3. Copy the PDF you want to process into that subfolder.  
4. Run the plugin with `dotnet Documentize.CheckList.dll --topic "Your goal" --checklist-type tasks`.  
5. The plugin writes the checklist (as markdown) and a JSON handoff file to the corresponding output subfolder.

```bash
# Linux / macOS (needs the .NET 10 runtime and documentize.lic next to the DLL)
export PLUGIN_INPUT_DIR=./work/input
export PLUGIN_OUTPUT_DIR=./work/output
mkdir -p "$PLUGIN_INPUT_DIR/job1"
cp sample.pdf "$PLUGIN_INPUT_DIR/job1/"
dotnet Documentize.CheckList.dll --task-id job1 --topic Test --checklist-type tasks
ls "$PLUGIN_OUTPUT_DIR/job1"
```

```powershell
# Windows PowerShell
$env:PLUGIN_INPUT_DIR  = "$PWD\work\input"
$env:PLUGIN_OUTPUT_DIR = "$PWD\work\output"
New-Item -ItemType Directory -Force "$env:PLUGIN_INPUT_DIR\job1" | Out-Null
Copy-Item sample.pdf "$env:PLUGIN_INPUT_DIR\job1\"
dotnet Documentize.CheckList.dll --task-id job1 --topic Test --checklist-type tasks
Get-ChildItem "$env:PLUGIN_OUTPUT_DIR\job1"
```

## Verified

Every code sample on this page was run on 2026-11-03 and its result was checked:

- Generate checklist via CLI (CLI plugin): passed in 26 s
