CLI Commands Reference
Complete reference for all Doclayer CLI commands and their options.
Commands Reference
Complete reference for all Doclayer CLI commands, organized by category.
Quick Navigation
doclayer auth
Authentication and API key management (recommended: use dashboard.doclayer.ai)
export DOCLAYER_API_KEY=dly_...Set your API key from the dashboard (recommended)
doclayer auth statusCheck current authentication status
doclayer auth loginInteractive login (alternative to API key)
doclayer auth registerCreate a new account (alternative to dashboard signup)
doclayer auth logoutLog out and clear stored credentials
doclayer auth api-key listList all your API keys
doclayer auth api-key create --name "CI/CD"Create a new API key
doclayer auth api-key revoke <key_id>Revoke an existing API key
doclayer agent
Agent template management and execution
doclayer agent listList all available agent templates
doclayer agent list --category contractsFilter agents by category
doclayer agent get contracts.nda-summaryGet details of a specific agent
doclayer agent describe <agent_id> --verboseDetailed agent description
doclayer agent initInteractive wizard to create a custom agent
doclayer agent validate ./manifest.ymlValidate an agent manifest file
doclayer agent test <agent_id> --document sample.pdfTest an agent with a document
doclayer agent test <agent_id> --document sample.pdf -o results.xlsxTest and export results to Excel
doclayer agent run <agent_id> --document doc.pdf --waitRun an agent on a document
doclayer ingest
Document ingestion and batch processing
doclayer ingest file doc.pdf --project proj_123Upload and process a single file
doclayer ingest file doc.pdf --project proj_123 --waitUpload and wait for completion
doclayer ingest file doc.pdf --metadata '{"tag":"invoice"}'Upload with metadata
doclayer ingest batch ./docs --project proj_123Batch upload a directory
doclayer ingest batch ./docs --workers 4 --recursiveParallel batch upload
doclayer ingest manifest batch.yaml --resumeUpload via manifest with resume support
doclayer status
Job monitoring and verification
doclayer status list --project proj_123List ingestion jobs
doclayer status list --status processing --limit 20Filter jobs by status
doclayer status inspect <job_id>Get detailed job information
doclayer status inspect <job_id> --vectorsInclude vector counts
doclayer status watch --project proj_123Real-time job monitoring
doclayer status grounding --tenant <tenant_id>Check LangExtract grounding coverage
doclayer status verify-pgvector <doc_id> <doc_id2>Verify pgvector entries
doclayer document
Document operations and retrieval
doclayer document listList all documents
doclayer document list --limit 10 --output jsonList with custom format
doclayer document get <doc_id>Get document details
doclayer document download <doc_id> -o results.jsonDownload results as JSON
doclayer document download <doc_id> -o results.csvDownload results as CSV
doclayer document download <doc_id> -o results.xlsxDownload results as Excel
doclayer document download <doc_id> -o output.txt --format csvExplicit format override
doclayer document chunks <doc_id> --limit 5View document chunks
doclayer document extractions <doc_id>View document extractions
doclayer document annotations <doc_id>List document annotations
doclayer document cleanup <doc_id> --mode softSoft-delete a document
doclayer document cleanup <doc_id> --mode gdpr --forceGDPR compliant deletion
doclayer workflow
Temporal workflow management
doclayer workflow listList all workflows
doclayer workflow list --status runningFilter by status
doclayer workflow status <job_id>Check workflow status
doclayer workflow logs <job_id>View workflow logs
doclayer workflow logs <job_id> --followStream logs in real-time
doclayer workflow cancel <job_id>Cancel a running workflow
doclayer workflow retry <job_id>Retry a failed workflow
doclayer search
Vector, graph, and hybrid search
doclayer search vector "payment terms"Semantic vector search
doclayer search vector "contract" --limit 10Search with result limit
doclayer search vector "NDA" --threshold 0.8Search with threshold
doclayer search hybrid "invoice due date"Combined vector + keyword search
doclayer search graph --entity "Acme Corp"Knowledge graph entity search
doclayer search graph --query "MATCH (n) RETURN n"Raw Cypher query
doclayer billing
Usage tracking (payments and subscriptions are managed via dashboard.doclayer.ai)
doclayer billing statusCurrent billing status
doclayer billing usageUsage breakdown for current month
doclayer billing usage --period 2025-01Usage for specific month
doclayer billing tierCurrent tier and limits
doclayer billing breakdownDetailed cost breakdown by model
doclayer billing estimate --agent finance.invoice --count 100Estimate processing costs
doclayer model
LLM and embedding model configuration
doclayer model listList available models
doclayer model list --provider mistralFilter by provider
doclayer model configView current model configuration
doclayer model set-llm --provider gemini --model gemini-2.0-flashSet LLM model
doclayer model set-embedding --provider gemini --model text-embed-004Set embedding model
doclayer model test --text "Hello world"Test model configuration
doclayer config
CLI configuration management
doclayer config showShow current configuration
doclayer config profile listList all profiles
doclayer config profile create productionCreate a new profile
doclayer config profile use productionSwitch to a profile
doclayer config import-profiles --from-file profiles.yamlImport profiles from file
doclayer config set default_project proj_123Set default project
doclayer project
Project and organization management
doclayer project listList all projects
doclayer project create "My Project" --description "Description"Create a new project
doclayer project info <project_id>Show detailed project information
doclayer project use <project_id>Switch to a project (set as default)
doclayer project set-default <project_id>Set a project as default
doclayer template
Browse and use agent templates from the gallery
doclayer template listList available templates from gallery
doclayer template list --category contractsFilter templates by category
doclayer template info <template_id>Show detailed template information
doclayer template info <template_id> --manifestShow template manifest
doclayer template use <template_id> --dir ./my-agentCreate agent from template
doclayer template pull <template_id>Download template manifest to local directory
doclayer template pull <template_id> --format jsonPull template as JSON
doclayer template push ./manifest.yamlUpload custom template to your account
doclayer template push ./manifest.yaml --publicPublish template to gallery
doclayer local
Local development environment management
doclayer local statusShow docker-compose service status
doclayer local startStart local development services
doclayer local stopStop local development services
doclayer local logs [service]Show logs from local services
doclayer local logs [service] --followFollow log output
doclayer local reset --forceReset local environment (remove containers/volumes)
doclayer files
Local file integration with auto-classification (NEW)
doclayer files analyze doc.pdf --project proj_123Analyze a single document (creates sidecar file)
doclayer files analyze doc.pdf --format xlsxOutput analysis as Excel spreadsheet
doclayer files analyze doc.pdf --format jsonOutput analysis as JSON (default)
doclayer files ingest ./folder --project proj_123Batch ingest all documents in a folder
doclayer files ingest ./folder --auto-classifyAuto-classify documents by type (enabled by default)
doclayer files ingest ./folder --no-auto-classifyDisable auto-classification
doclayer files ingest ./folder --recursiveInclude subdirectories
doclayer files search ./folder "payment terms"Semantic search across local documents
doclayer files search ./folder "contract" --limit 10Search with result limit
doclayer files report ./folder --format xlsxGenerate batch report as Excel
doclayer files report ./folder --format jsonGenerate batch report as JSON
doclayer corpus
Cross-document corpus queries with AI aggregations (NEW)
doclayer corpus query "payment terms" --project proj_123Query across all project documents
doclayer corpus query "termination clause" --type listList matching chunks with citations
doclayer corpus query "GDPR compliance" --type countCount matching documents
doclayer corpus query "What are the risks?" --type summaryAI-synthesized summary with citations
doclayer corpus query "Extract vendors and amounts" --type tableStructured table extraction
doclayer corpus query "contracts" --type table -o vendors.xlsxExport table results to Excel
doclayer corpus query "NDAs" --limit 20 --filter '{"document_type":"contract.nda"}'Query with filters
doclayer export
Project-level data exports in multiple formats (NEW)
doclayer export insights proj_123 -o insights.xlsxExport all insights to Excel
doclayer export insights proj_123 -o insights.csvExport insights as CSV
doclayer export insights proj_123 -o insights.jsonExport insights as JSON
doclayer export documents proj_123 -o docs.xlsxExport document metadata
doclayer export flags proj_123 -o flags.xlsxExport flagged items and alerts
doclayer export checklist proj_123 -o checklist.xlsxExport checklist results
doclayer export insights proj_123 -o filtered.xlsx --filter '{"document_type":"contract.msa"}'Export with filters
doclayer checklist
Checklist management for structured document review (NEW)
doclayer checklist create --project proj_123 --name "Due Diligence"Create a new checklist
doclayer checklist create --name "M&A Review" --items '[{"question":"Contract value?"}]'Create checklist with items
doclayer checklist list --project proj_123List checklists in a project
doclayer checklist get chk_123Get checklist details with items
doclayer checklist run chk_123Run auto-answer workflow (queries corpus)
doclayer checklist update-item chk_123 item_456 --answer "USD 500,000"Update item answer manually
doclayer checklist update-item chk_123 item_456 --status reviewedMark item as reviewed
doclayer checklist export chk_123 -o checklist.xlsxExport checklist to Excel
doclayer checklist export chk_123 -o checklist.jsonExport checklist as JSON
doclayer rule
Flagging rules for automated compliance checks (NEW)
doclayer rule create --name "High Value" --severity criticalCreate a flagging rule
doclayer rule create --conditions '{"field":"contract_value","operator":"gt","value":100000}'Create rule with DSL conditions
doclayer rule listList all flagging rules
doclayer rule list --is-activeList only active rules
doclayer rule get rule_123Get rule details
doclayer rule enable rule_123Enable a rule
doclayer rule disable rule_123Disable a rule
doclayer rule test rule_123 --document doc_456Test rule against a document
doclayer rule delete rule_123Delete a flagging rule
doclayer flag
View and manage compliance flags (NEW)
doclayer flag list --project proj_123List flags in a project
doclayer flag list --severity criticalFilter by severity
doclayer flag list --status openFilter by status (open, acknowledged, resolved, dismissed)
doclayer flag get flg_123Get flag details
doclayer flag acknowledge flg_123Acknowledge a flag (mark as seen)
doclayer flag resolve flg_123 --notes "Approved by legal"Resolve flag with notes
doclayer flag dismiss flg_123 --reason "False positive"Dismiss flag as not applicable
doclayer family
Document families and version grouping (NEW)
doclayer family list --project proj_123List document families in a project
doclayer family detect --project proj_123Run version detection across project
doclayer family get fam_123Get family details with all members
doclayer version
Document version detection and comparison (NEW)
doclayer version fingerprint doc_123Compute MinHash fingerprint for document
doclayer version history doc_123Get version history for a document
doclayer version diff doc_123 doc_456Clause-level diff between two documents
doclayer ma
M&A due diligence analysis (NEW)
doclayer ma analyze doc_123 --project proj_123Run M&A analysis on a document
doclayer ma get doc_123Get M&A analysis results
doclayer ma summary --project proj_123Get project-wide M&A summary
doclayer entities
Cross-document entity resolution (Phase 4)
doclayer entities resolve --project proj_123Trigger entity resolution for project
doclayer entities resolve --project proj_123 --mode lshResolution with LSH blocking (best accuracy)
doclayer entities resolve --project proj_123 --mode databaseResolution via database trigrams (zero CPU)
doclayer entities list --project proj_123List canonical entities in project
doclayer entities list --project proj_123 --type organizationFilter by entity type
doclayer entities list --project proj_123 --min-documents 5Filter by minimum document count
doclayer entities search "Acme" --project proj_123Search entities by name (fuzzy)
doclayer entities get entity_123 --show-documentsGet entity details with document list
doclayer entities merge entity_123 entity_456 --keep entity_123Merge two entities manually
doclayer entities export --project proj_123 -o entities.jsonExport entity graph as JSON
doclayer entities export --project proj_123 -o entities.xlsxExport entities to Excel
Global Options
These options are available for all commands:
| Option | Description |
|---|---|
| --config <path> | Custom config file path (default: ~/.doclayer/config.json) |
| --profile, -p <name> | Configuration profile to use |
| --verbose, -v | Enable verbose output |
| --help | Show help for any command |
Exit Codes
| Code | Description |
|---|---|
| 0 | Success |
| 1 | General error |
| 2 | Authentication error |
| 3 | Network error |
| 4 | Validation error |
| 5 | Resource not found |