Metadata-Version: 2.4
Name: doclayer-cli
Version: 1.1.4
Summary: Doclayer Command-Line Interface - Document Intelligence Platform CLI
Author-email: Doclayer <support@doclayer.ai>
Maintainer-email: Doclayer <support@doclayer.ai>
License-Expression: LicenseRef-Proprietary
Project-URL: Homepage, https://doclayer.ai
Project-URL: Documentation, https://docs.doclayer.ai/cli
Project-URL: Repository, https://github.com/okc0mputex/Doclayer
Project-URL: Issues, https://github.com/okc0mputex/Doclayer/issues
Project-URL: Changelog, https://github.com/okc0mputex/Doclayer/blob/main/docs/cli/DOCLAYER_CLI_SDK_SPECIFICATION.md
Keywords: doclayer,cli,document,ai,llm,document-processing
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Text Processing :: Markup
Classifier: Topic :: Utilities
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: typer[all]>=0.12.3
Requires-Dist: httpx>=0.27.0
Requires-Dist: pydantic>=2.7.0
Requires-Dist: rich>=13.0.0
Requires-Dist: keyring>=25.0.0
Requires-Dist: pyyaml>=6.0.0
Provides-Extra: dev
Requires-Dist: pytest>=8.3.0; extra == "dev"
Requires-Dist: respx>=0.21.1; extra == "dev"
Requires-Dist: psycopg[binary]>=3.1.18; extra == "dev"
Dynamic: license-file

# Doclayer CLI

[![PyPI version](https://badge.fury.io/py/doclayer-cli.svg)](https://badge.fury.io/py/doclayer-cli)
[![Python 3.11+](https://img.shields.io/badge/python-3.11+-blue.svg)](https://www.python.org/downloads/)

The official Doclayer Command-Line Interface for interacting with the Doclayer document intelligence platform.

## Installation

### macOS

```bash
pip3 install --user doclayer-cli
```

> **Note:** If `doclayer` command is not found after install, add `~/Library/Python/3.11/bin` to your PATH.

### Linux / Windows

```bash
pip install doclayer-cli
```

## Quick Start

```bash
# Authenticate with your Doclayer account
doclayer auth login

# Process a document
doclayer ingest file invoice.pdf --project proj_123 --wait

# List available agents
doclayer agent list --category contracts

# Check billing usage
doclayer billing usage
```

## Features

- **Complete Command Set**: All Doclayer operations via CLI
- **Batch Ingestion**: Process multiple documents with resume capability
- **Rich Output**: Beautiful terminal formatting
- **Profile Management**: Multiple environment profiles support
- **Secure Authentication**: API key and OAuth support

## Commands

| Command | Description |
|---------|-------------|
| `auth` | Authentication (login, logout, API keys) |
| `agent` | Agent template management |
| `billing` | Usage tracking and billing |
| `model` | Model configuration |
| `project` | Project management |
| `document` | Document operations |
| `workflow` | Workflow management |
| `search` | Vector and graph search |
| `template` | Template gallery |
| `config` | Configuration management |
| `ingest` | Batch ingestion workflows |
| `status` | Job monitoring and verification |

## Configuration

The CLI stores configuration in `~/.doclayer/`:

```
~/.doclayer/
└── config.json      # Configuration and profile settings
```

Sensitive credentials (API keys, tokens) are stored in `~/.doclayer/config.json` on macOS, or in your system's keyring on Linux/Windows.

### Credential Storage

| Platform | Default Storage | Override |
|----------|-----------------|----------|
| macOS | Config file | `DOCLAYER_USE_KEYRING=1` to use Keychain |
| Linux | System keyring | `DOCLAYER_NO_KEYRING=1` to use config file |
| Windows | System keyring | `DOCLAYER_NO_KEYRING=1` to use config file |

> **Note:** On macOS, the system Keychain prompts for password on every CLI command, so we use file-based storage by default for better UX.

### Environment Variables

| Variable | Description |
|----------|-------------|
| `DOCLAYER_API_KEY` | API key for authentication |
| `DOCLAYER_BASE_URL` | Custom API endpoint (default: https://api.doclayer.ai) |
| `DOCLAYER_PROFILE` | Active profile name |
| `DOCLAYER_TOKEN` | Authentication token |
| `DOCLAYER_NO_KEYRING` | Set to `1` to disable system keyring (Linux/Windows) |
| `DOCLAYER_USE_KEYRING` | Set to `1` to enable system keyring (macOS) |
| `DOCLAYER_VERBOSE` | Enable verbose output |

## Requirements

- Python 3.11 or higher
- pip or pipx

## Documentation

- **Getting Started**: https://docs.doclayer.ai/cli/quickstart
- **Command Reference**: https://docs.doclayer.ai/cli/commands
- **API Documentation**: https://docs.doclayer.ai/api

## Support

- **Documentation**: https://docs.doclayer.ai
- **Email**: support@doclayer.ai
- **Website**: https://doclayer.ai

## License

Copyright © 2024-2025 Doclayer. All Rights Reserved.

This software is proprietary and confidential. Unauthorized copying, modification,
distribution, or use of this software, via any medium, is strictly prohibited.

See the [LICENSE](LICENSE) file for full terms.
