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.

doclayer auth

Authentication and API key management

doclayer auth login

Interactive login to your Doclayer account

doclayer auth logout

Log out and clear stored credentials

doclayer auth status

Check current authentication status

doclayer auth api-key list

List 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 list

List all available agent templates

doclayer agent list --category contracts

Filter agents by category

doclayer agent get contracts.nda-summary

Get details of a specific agent

doclayer agent describe <agent_id> --verbose

Detailed agent description

doclayer agent init

Interactive wizard to create a custom agent

doclayer agent validate ./manifest.yml

Validate an agent manifest file

doclayer agent test <agent_id> --document sample.pdf

Test an agent with a document

doclayer agent run <agent_id> --document doc.pdf --wait

Run an agent on a document

doclayer ingest

Document ingestion and batch processing

doclayer ingest file doc.pdf --project proj_123

Upload and process a single file

doclayer ingest file doc.pdf --project proj_123 --wait

Upload and wait for completion

doclayer ingest file doc.pdf --metadata '{"tag":"invoice"}'

Upload with metadata

doclayer ingest batch ./docs --project proj_123

Batch upload a directory

doclayer ingest batch ./docs --workers 4 --recursive

Parallel batch upload

doclayer ingest manifest batch.yaml --resume

Upload via manifest with resume support

doclayer status

Job monitoring and verification

doclayer status list --project proj_123

List ingestion jobs

doclayer status list --status processing --limit 20

Filter jobs by status

doclayer status inspect <job_id>

Get detailed job information

doclayer status inspect <job_id> --vectors

Include vector counts

doclayer status watch --project proj_123

Real-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 list

List all documents

doclayer document list --limit 10 --format json

List with custom format

doclayer document get <doc_id>

Get document details

doclayer document download <doc_id> --output result.json

Download extraction results

doclayer document chunks <doc_id> --limit 5

View document chunks

doclayer document extractions <doc_id>

View document extractions

doclayer document annotations <doc_id>

List document annotations

doclayer document cleanup <doc_id> --mode soft

Soft-delete a document

doclayer document cleanup <doc_id> --mode gdpr --force

GDPR compliant deletion

doclayer workflow

Temporal workflow management

doclayer workflow list

List all workflows

doclayer workflow list --status running

Filter by status

doclayer workflow status <job_id>

Check workflow status

doclayer workflow logs <job_id>

View workflow logs

doclayer workflow logs <job_id> --follow

Stream logs in real-time

doclayer workflow cancel <job_id>

Cancel a running workflow

doclayer workflow retry <job_id>

Retry a failed workflow

doclayer billing

Usage tracking and billing information

doclayer billing status

Current billing status

doclayer billing usage

Usage breakdown for current month

doclayer billing usage --month 2025-01

Usage for specific month

doclayer billing tier

Current tier and limits

doclayer billing breakdown

Detailed cost breakdown by model

doclayer billing estimate --agent finance.invoice --count 100

Estimate processing costs

doclayer billing alert create --threshold 4000

Create usage alert

doclayer model

LLM and embedding model configuration

doclayer model list

List available models

doclayer model list --provider mistral

Filter by provider

doclayer model config

View current model configuration

doclayer model set llm --provider gemini --model gemini-2.0-flash

Set LLM model

doclayer model set embedding --provider gemini --model text-embed-004

Set embedding model

doclayer model test --text "Hello world"

Test model configuration

doclayer config

CLI configuration management

doclayer config show

Show current configuration

doclayer config profile list

List all profiles

doclayer config profile create production

Create a new profile

doclayer config profile use production

Switch to a profile

doclayer config import-profiles --from-file profiles.yaml

Import profiles from file

doclayer config set default_project proj_123

Set default project

Global Options

These options are available for all commands:

OptionDescription
--config <path>Custom config file path (default: ~/.doclayer/config.json)
--profile, -p <name>Configuration profile to use
--verbose, -vEnable verbose output
--helpShow help for any command

Exit Codes

CodeDescription
0Success
1General error
2Authentication error
3Network error
4Validation error
5Resource not found