# Trusted Signatures CLI Examples

This directory contains practical examples of using the Trusted Signatures CLI in real-world scenarios.

## Files

- **basic_signing.sh** - Simple PDF signing example
- **batch_processing.sh** - Process multiple PDFs in a directory
- **invoice_workflow.sh** - Invoice generation and signing workflow
- **ci_cd_pipeline.sh** - CI/CD integration for automated report signing
- **form_processing.sh** - Sign PDFs that allow form filling afterward
- **docker_integration.sh** - Docker container integration example
- **cloud_connector_azure.sh** - Azure Function deployment and seal-pdf invocation
- **cloud_connector_aws.sh** - AWS Lambda and S3 sealing workflow
- **cloud_connector_gcp.sh** - Google Cloud Function deployment and invocation
- **cloud_connector_k8s.sh** - Container gateway startup and /seal API call

## Prerequisites

1. Download the CLI from https://trusted-signatures.com/downloads/
2. Get API credentials from https://secure.trusted-signatures.com
3. Set environment variables:
   ```bash
   export TS_API_KEY_ID="your_api_key_id"
   export TS_API_KEY="your_api_key"
   ```

## Common Use Cases

- **Invoices**: Use `--limit-changes no-changes` for tamper-proof invoices
- **Forms**: Use `--limit-changes allow-forms` for fillable documents
- **Reports**: Use `--ltv` for long-term verification in compliance scenarios
- **Batch Processing**: Loop through directories for bulk signing
- **Cloud Connectors**: Run sealing orchestration inside Azure, AWS, GCP, or Kubernetes

## Security Notes

- API keys should be stored securely (environment variables, secrets management)
- Documents never leave your environment - only SHA-256 hashes are sent
- Signed PDFs are verifiable in Adobe Acrobat/Reader without plugins
