CLI Documentation
The Doclayer CLI provides a comprehensive command-line interface for developers to interact with the platform.
Doclayer CLI
Command-line interface for document intelligence
The Doclayer CLI provides a developer-first experience for document processing, agent management, and workflow orchestration. Built with Python and Typer, it offers beautiful terminal output and comprehensive batch workflows.
Quick Start
# Install via pip
pip install doclayer-cli
# Authenticate
doclayer auth login
# Process your first document
doclayer ingest file invoice.pdf --project proj_123 --wait
# List available agents
doclayer agent list --category contractsDocumentation
Command Groups
Key Features
Complete Command Set
All Doclayer operations via CLI: authentication, agent management, document processing, search, billing, and workflow orchestration.
Batch Ingestion
Process multiple documents with parallel workers, progress tracking, state files, and resume capability for interrupted uploads.
Rich Terminal Output
Beautiful formatting with Rich library: colored output, progress bars, tables, and spinners for better developer experience.
Profile Management
Multiple environment profiles for seamless switching between local, development, staging, and production environments.
Example Workflows
Process a Contract with NDA Analysis
# Process with specific agent
doclayer ingest file contract.pdf \
--project proj_legal \
--agent contracts.nda-summary \
--wait
# Download extraction results
doclayer document download doc_abc123 --output results.jsonBatch Process Invoice Directory
# Process all PDFs in directory with 4 workers
doclayer ingest batch ./invoices \
--project proj_finance \
--pattern "*.pdf" \
--workers 4 \
--state-file upload-state.json
# Resume if interrupted
doclayer ingest batch ./invoices \
--project proj_finance \
--state-file upload-state.json \
--resumeSearch Documents with Vector Similarity
# Semantic search
doclayer search vector "payment terms and conditions" --limit 10
# Hybrid search (vector + keyword)
doclayer search hybrid "termination clause" --project proj_legal
# Knowledge graph search
doclayer search graph --entity "Acme Corp" --relationship "contract_with"Requirements
- Python 3.11 or higher
- pip or pipx package manager
- macOS, Linux, or Windows (WSL recommended)