# DAP (Data Analysis & Profiler)

DAP is a terminal-based interactive data exploration and profiling tool designed to preview and analyze CSV and Parquet files before loading them into data pipelines. It features both a CLI profiler and an interactive Terminal User Interface (TUI).

## Features
- **File Format Auto-detection**: Seamlessly reads CSV and Parquet formats.
- **Interactive TUI**: Navigate large datasets smoothly with customizable grid controls.
- **Asynchronous Profiling**: Streaming background profiling of statistics (types, nulls, unique count, value ranges).
- **Disk Caching**: Speeds up subsequent loads of previously profiled datasets.
- **Premium Themes**: Customize your experience with **Gruvbox** (default), **Rosé Pine Moon**, **Nord**, and **Dracula** themes.

## Getting Started

### Installation
Ensure you have Rust and Cargo installed, then run:
```bash
cargo install --path .
```

### Usage
```bash
# Open interactive viewer
dap open <path_to_file>

# Profile file and print summary
dap profile <path_to_file>

# Profile file and output JSON
dap profile <path_to_file> --json
```

## Keybindings in TUI
- `q` / `Ctrl-C`: Quit
- `arrows` / `hjkl`: Move cursor
- `H` / `L`: Page left/right columns
- `PgUp` / `PgDn`: Page up/down rows
- `enter`: Row detail overlay
- `c`: Column browser modal (with full streaming profiling stats)
- `/`: Search dataset
- `s`: Toggle search scope
- `t`: Cycle color theme
- `?`: Open help overlay
