Skip to main content

CLI for AI-assisted PDF form filling via Simplicity Form-Filler API

Project description

simplicity-cli

CLI for AI-assisted PDF form filling through the Simplicity Form-Filler API.

PyPI package name: ai-pdf-filler
Installed command: simplicity-cli

Install

pip install ai-pdf-filler

Or with uv:

uv tool install ai-pdf-filler

Authentication

Get API keys from simplicity.ai.

Recommended (secure): save once with hidden prompt:

simplicity-cli login

Non-interactive secure input (stdin):

printf '%s' "$SIMPLICITY_AI_API_KEY" | simplicity-cli login --api-key-stdin

Or set env var:

export SIMPLICITY_AI_API_KEY="your_api_key"

Legacy compatibility: global --api-key is still supported, but avoid it because command-line args may leak via shell history and process lists.

Auth precedence:

  1. --api-key
  2. SIMPLICITY_AI_API_KEY
  3. saved local key (from simplicity-cli login, --api-key-stdin, or --api-key)

Quick start

Get a one-page CLI guide:

simplicity-cli help

Create and autofill from a local form PDF using text context:

simplicity-cli new \
  --form-file ./form.pdf \
  --context "first_name: John; last_name: Smoke; dob: 1990-07-07"

Create and autofill using uploaded source documents:

simplicity-cli new \
  --form-file ./form.pdf \
  --source-file ./w2.pdf \
  --source-file ./drivers_license.pdf

Autofill an existing form:

simplicity-cli existing FORM_ID --context "first_name: John; last_name: Smoke; dob: 1990-07-07"

--context is the source data used to fill form fields. --instructions is optional guidance for how autofill should behave.

Check or wait on tasks:

simplicity-cli status TASK_ID
simplicity-cli wait TASK_ID

Command reference

For full syntax/examples at any time, run:

simplicity-cli help

new

Create a digital form from a PDF and run autofill.

Common usage:

simplicity-cli new --form-file ./form.pdf --context "first_name: John; last_name: Smoke; dob: 1990-07-07"
simplicity-cli new --form-file ./form.pdf --source-file ./w2.pdf --source-file ./id.pdf
simplicity-cli new --form-url https://example.com/form.pdf --source-url https://example.com/source.pdf

Validation rules:

  • Exactly one of --form-file or --form-url is required.
  • You must provide at least one source via --source-file/--source-url or --context/--context-file.
  • --context and --context-file are mutually exclusive.
  • --instructions and --instructions-file are mutually exclusive.
  • --output cannot be used with --no-download.

Useful flags:

  • --no-wait returns immediately with a task ID.
  • --no-download skips PDF download after completion.
  • --output PATH writes downloaded output to a specific path.
  • --poll-interval-seconds and --max-wait-seconds control polling behavior.

existing

Autofill an existing form ID.

Common usage:

simplicity-cli existing FORM_ID --context "first_name: John; last_name: Smoke; dob: 1990-07-07"
simplicity-cli existing FORM_ID --context-file ./context.txt --output ./filled.pdf
simplicity-cli existing FORM_ID --no-wait --no-download

Context and instructions semantics:

  • --context / --context-file provide the data to populate form fields.
  • --instructions / --instructions-file provide optional behavior guidance and do not replace form data.

Validation rules:

  • FORM_ID is required.
  • --context and --context-file are mutually exclusive.
  • --instructions and --instructions-file are mutually exclusive.
  • --output cannot be used with --no-download.

status

Get current task details.

simplicity-cli status TASK_ID

wait

Poll until completion, failure, or timeout.

simplicity-cli wait TASK_ID --poll-interval-seconds 2 --max-wait-seconds 1800

Legacy aliases

Backward-compatible nested commands are still accepted:

  • simplicity-cli fill new ...
  • simplicity-cli fill existing ...
  • simplicity-cli task status ...
  • simplicity-cli task wait ...

Output modes

Human-readable output is default. Use strict JSON for scripts:

simplicity-cli --json status TASK_ID

In --json mode, each command writes exactly one JSON object.

Exit codes

  • 0: success
  • 2: usage/validation/auth missing
  • 3: auth rejected (401/403)
  • 4: API/request error
  • 5: task failed
  • 6: wait timeout
  • 7: download error

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ai_pdf_filler-0.1.4.tar.gz (15.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ai_pdf_filler-0.1.4-py3-none-any.whl (15.9 kB view details)

Uploaded Python 3

File details

Details for the file ai_pdf_filler-0.1.4.tar.gz.

File metadata

  • Download URL: ai_pdf_filler-0.1.4.tar.gz
  • Upload date:
  • Size: 15.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.3

File hashes

Hashes for ai_pdf_filler-0.1.4.tar.gz
Algorithm Hash digest
SHA256 3141d11474d4ff6482f0b390ecefc5e9173df5527bd06cfee8ffbedbb900e557
MD5 0c0686b3e9fb401c567a0c65f482cecb
BLAKE2b-256 9959904aec5bc3724f9053c95f19c34a912aa7428650c07d9bb0395f2c93a634

See more details on using hashes here.

File details

Details for the file ai_pdf_filler-0.1.4-py3-none-any.whl.

File metadata

File hashes

Hashes for ai_pdf_filler-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 cedbd521dc7eda9796e1d452f765c8eb355b6ece5e76041370728411f8715c76
MD5 aec1d530c8f9a19d475875944a30ff01
BLAKE2b-256 da212ea3fdffae7e91fcc81c76d998eada6399a767ec72586ec37b17a7fe26c9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page