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

# Quickstart

> Get started with KafkaCode in under 5 minutes

## Quick Installation

<CodeGroup>
  ```bash npm theme={null}
  npm install -g kafkacode
  ```

  ```bash npx (no install) theme={null}
  npx kafkacode scan ./src
  ```

  ```bash yarn theme={null}
  yarn global add kafkacode
  ```
</CodeGroup>

## Your First Scan

<Steps>
  <Step title="Navigate to your project">
    Open your terminal and navigate to your project directory:

    ```bash theme={null}
    cd /path/to/your/project
    ```
  </Step>

  <Step title="Run the scanner">
    Execute a basic scan on your source code:

    ```bash theme={null}
    kafkacode scan ./src
    ```

    Or scan the entire project directory:

    ```bash theme={null}
    kafkacode scan .
    ```
  </Step>

  <Step title="Review the results">
    KafkaCode will display a detailed report with:

    * Privacy grade (A+ to F)
    * Number of issues found
    * Severity breakdown
    * File locations and line numbers
    * Actionable recommendations
  </Step>
</Steps>

## Example Output

```bash theme={null}
🎯 PRIVACY SCAN REPORT
═══════════════════════════════════════════════════════════

📊 SCAN SUMMARY
📁 Directory: ./src
⏰ Timestamp: 2025-01-15 10:30:45
📄 Files Scanned: 25
🔍 Total Issues: 3
🏆 Privacy Grade: 🟡 B-

═══════════════════════════════════════════════════════════

🔴 CRITICAL (1)
────────────────────────────────────────────────────────────
  📄 src/config.js:12
     AWS Access Key detected
     aws_access_key_id = "AKIAIOSFODNN7EXAMPLE"

     💡 Recommendation: Move to environment variables

🟡 MEDIUM (2)
────────────────────────────────────────────────────────────
  📄 src/utils/validator.js:45
     Email address found in code
     const adminEmail = "admin@company.com"

     💡 Recommendation: Use configuration file

  📄 src/database/connection.js:8
     Potential database connection string
     const dbUrl = "mongodb://localhost:27017/mydb"

     💡 Recommendation: Use environment variables

═══════════════════════════════════════════════════════════
```

## Verbose Mode

For more detailed progress information during the scan:

```bash theme={null}
kafkacode scan ./src --verbose
```

This will show:

* File discovery progress
* Individual file analysis status
* Detailed error messages if any

## Exit Codes

KafkaCode uses exit codes to indicate scan results:

* **Exit code 0**: No issues found
* **Exit code 1**: Issues found or scan error

This makes it perfect for CI/CD integration:

```bash theme={null}
kafkacode scan ./src || echo "Privacy issues detected!"
```

## Understanding Severity Levels

<CardGroup cols={2}>
  <Card title="Critical" icon="triangle-exclamation" color="#dc2626">
    Immediate action required. Contains exposed secrets or credentials.
  </Card>

  <Card title="High" icon="exclamation" color="#ea580c">
    Should be addressed soon. Contains sensitive data that could lead to issues.
  </Card>

  <Card title="Medium" icon="info" color="#eab308">
    Review recommended. Contains potentially sensitive information.
  </Card>

  <Card title="Low" icon="circle-info" color="#3b82f6">
    Optional review. Minor privacy considerations.
  </Card>
</CardGroup>

## Next Steps

<CardGroup cols={2}>
  <Card title="CLI Options" icon="terminal" href="/usage/cli-options">
    Explore all available command-line options
  </Card>

  <Card title="Interpreting Results" icon="chart-line" href="/usage/interpreting-results">
    Learn how to understand and act on scan results
  </Card>

  <Card title="CI/CD Integration" icon="code-branch" href="/usage/ci-cd-integration">
    Integrate KafkaCode into your build pipeline
  </Card>

  <Card title="Examples" icon="book-open" href="/examples/basic-scan">
    See real-world usage examples
  </Card>
</CardGroup>

<Tip>
  **Pro Tip**: Run KafkaCode in verbose mode during your first scan to understand what it's checking:

  ```bash theme={null}
  kafkacode scan . --verbose
  ```
</Tip>

<Warning>
  KafkaCode respects your `.gitignore` file automatically. Files and directories listed in `.gitignore` will be skipped during scanning.
</Warning>
