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

# Welcome to Basecut

> Production-like database snapshots in minutes — without production risk

Give every developer realistic data without risky exports or slow manual
workflows. Basecut extracts production-like subsets of your database,
following foreign key relationships to ensure referential integrity while
keeping PII safe. Run locally for quick starts, or deploy
agents inside your VPC for production workloads. If you are evaluating how
masking works, start with the [Anonymization](/configuration/anonymization)
guide.

## The Problem

Testing with toy data misses real-world bugs. Edge cases that happen in production—deeply nested relationships, specific data combinations, scale-dependent behavior—never surface in development.

Manually creating realistic test data is slow and breaks every time your schema evolves. Copying production data wholesale exposes PII, bloats local databases, and violates compliance requirements.

## The Solution

Basecut intelligently extracts complete, referentially-valid subsets of your database:

<CardGroup cols={2}>
  <Card title="Relationship-Aware Extraction" icon="diagram-project">
    Start from specific rows and automatically pull all related data through
    foreign keys. No broken references, no manual joins.
  </Card>

  <Card title="Built-in PII Protection" icon="user-shield">
    30+ anonymization strategies detect and transform sensitive data. Team and
    Enterprise plans can enforce org-wide snapshot rules for every snapshot.
  </Card>

  <Card title="Run Locally or In Your VPC" icon="cloud">
    Use the local CLI for quick starts or run agents inside your VPC. Process
    millions of rows without external access to your data.
  </Card>

  <Card title="Restore Anywhere" icon="bolt">
    Apply snapshots to local dev, staging, or CI environments. Identical data
    across your entire team.
  </Card>
</CardGroup>

## Quick Example

Extract a user's complete account history—orders, payments, support tickets—from a production database with 200 tables:

```yaml theme={null}
# basecut.yml
version: '1'
name: 'user-analysis'

from:
  - table: users
    where: 'email = :email'
    params:
      email: 'john@example.com'

traverse:
  parents: 5 # Follow parent relationships (account → org)
  children: 10 # Follow child relationships (user → orders → items)

anonymize:
  mode: auto
  rules:
    '*.credit_card': { strategy: fake_credit_card }
```

```bash theme={null}
basecut snapshot create --config basecut.yml --name "user-analysis" --source "$BASECUT_DATABASE_URL"
# ✓ Extracted 847 rows across 23 tables
# ✓ Anonymized 156 PII fields
# ✓ Snapshot stored: s3://snapshots/user-analysis

basecut snapshot restore user-analysis:latest --target "postgres://localhost/dev"
# ✓ Applied to local database in 2.3s
```

## Choose Your Path

<CardGroup cols={2}>
  <Card title="New to Basecut?" icon="rocket" href="/getting-started/quick-start">
    Get your first snapshot in under 5 minutes
  </Card>

  <Card title="Want to understand how it works?" icon="lightbulb" href="/core-concepts/how-it-works">
    Learn about relationship-following and FK traversal
  </Card>

  <Card title="Need to mask sensitive data?" icon="mask" href="/configuration/anonymization">
    Learn when to use auto, manual, or org-level anonymization rules
  </Card>

  <Card title="Looking for workflows?" icon="diagram-project" href="/workflows/common-workflows">
    Patterns for testing, debugging, and data sharing
  </Card>
</CardGroup>

## Use Cases

**Local Development**: Pull production patterns into your dev environment. Test with real data shapes, not `User 1`, `User 2`.

**Team Testing**: Share consistent, realistic datasets across developers. Everyone tests against the same complex scenarios.

**CI/CD Pipelines**: Seed test databases with production-like data. Catch integration bugs before deployment.

**Debugging Production Issues**: Extract the exact data state that triggered a bug. Reproduce locally without production access.

**Partner Data Sharing**: Provide realistic sample data to integration partners, with all PII safely anonymized.

## Get Started

<CardGroup cols={2}>
  <Card title="Quick Start" icon="rocket" href="/getting-started/quick-start">
    First snapshot in under 5 minutes
  </Card>

  <Card title="How It Works" icon="lightbulb" href="/core-concepts/how-it-works">
    Understand the relationship-following algorithm
  </Card>

  <Card title="Configuration" icon="sliders" href="/configuration/yaml-reference">
    Complete YAML reference with examples
  </Card>

  <Card title="Anonymization" icon="mask" href="/configuration/anonymization">
    Protect PII with 30+ strategies and extraction-time masking
  </Card>
</CardGroup>
