> ## Documentation Index
> Fetch the complete documentation index at: https://zeropath.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# ZeroPath CLI

> Command-line access to ZeroPath's AI-powered security scanning platform

## Overview

ZeroPath CLI provides command-line access to ZeroPath's AI-powered security scanning platform. Upload and scan your code directly from your terminal with support for multiple output formats and CI/CD integration.

<Card title="Get the CLI" icon="github" href="https://github.com/ZeroPathAI/zeropath-cli">
  Download the latest release from our GitHub repository
</Card>

## What ZeroPath CLI Detects

The CLI scans for a comprehensive range of security vulnerabilities:

* **Authentication and authorization vulnerabilities**
* **Application logic flaws**
* **Dependency issues**
* **Security misconfigurations**
* **Command injection vulnerabilities**
* **File inclusion and path traversal attacks**
* **Secrets and hardcoded credentials**

## Quick Start

```bash theme={null}
# Install CLI (see installation guide)
# Authenticate with your API credentials
zeropath auth <clientId> <clientSecret>

# Scan current directory
zeropath scan . output.sarif

# Scan by repository ID
zeropath scan --repository-id <repositoryId>

# Scan by repository URL
zeropath scan --repository-url https://github.com/owner/repo --vcs github
```

## Core Commands

### Authentication

```bash theme={null}
# Authenticate with API credentials
zeropath auth <clientId> <clientSecret>
```

### Local Directory Scanning

```bash theme={null}
# Basic scan
zeropath scan <directory> <outputFile.sarif>

# Example
zeropath scan ./my-project results.sarif
```

### Repository Scanning

```bash theme={null}
# Scan by repository ID
zeropath scan --repository-id <repositoryId>

# Scan by repository URL
zeropath scan --repository-url https://github.com/owner/repo --vcs github
```

## CI/CD Integration

The CLI is designed for seamless CI/CD integration — it exits with code 1 when security issues are found or when an error occurs during scanning:

```bash theme={null}
# Scan a repository (exits 1 if issues found)
zeropath scan --repository-id <repositoryId>

# Generate SARIF output (local scan only)
zeropath scan . results.sarif
```

### Scan Timeout

Local directory scans have a maximum polling timeout of approximately 50 minutes. If the scan does not complete within this window, the CLI exits with an error. This prevents CI/CD pipelines from hanging indefinitely on long-running scans.

## Output Formats

ZeroPath CLI supports multiple output formats for different use cases:

* **SARIF**: Standard format for static analysis results (local scans)
* **Console**: Human-readable formatted output for terminal viewing

## Getting API Credentials

To use the CLI, you'll need API credentials from your ZeroPath account:

1. Sign in to [ZeroPath Dashboard](https://zeropath.com/app)
2. Navigate to API Settings
3. Generate new API credentials (Client ID and Client Secret)
4. Use these credentials with `zeropath auth`

## Next Steps

* [Installation Guide](/cli/installation) - Set up the CLI on your system
* [GitHub Repository](https://github.com/ZeroPathAI/zeropath-cli) - Source code and releases
* [API Reference](/api-reference/introduction) - Build custom integrations
