za 0.1.0

🛠️ Zero-to-All — scan your workspace and generate an opinionated CONTEXT.md so AI, code-reviewers and newcomers always have the full picture.
<div align="right">Table of Contents ↗️</div>

<h1 align="center"><code>za</code></h1>

<p align="center">
  🛠️ <strong>Zero-to-All</strong> — scan your workspace and generate an opinionated <code>CONTEXT.md</code> so AI, code-reviewers and newcomers always have the full picture.
</p>

<div align="center">

[![Crates.io](https://img.shields.io/crates/v/za.svg)](https://crates.io/crates/za)
[![Repo Size](https://img.shields.io/github/repo-size/lvillis/za?color=328657)](https://github.com/lvillis/za)
[![CI](https://github.com/lvillis/za/actions/workflows/ci.yaml/badge.svg)](https://github.com/lvillis/za/actions)
[![Docker Pulls](https://img.shields.io/docker/pulls/lvillis/za)](https://hub.docker.com/r/lvillis/za)
[![Image Size](https://img.shields.io/docker/image-size/lvillis/za/latest?style=flat-square)](https://hub.docker.com/r/lvillis/za)
[![MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)

</div>

---

## ✨ Features

* **Zero-config scan** – walks the project tree and respects `.gitignore`, global ignores and custom `.aiignore`.
* **Smart snippets** – keeps the first/last *N* lines of each text file; optional hex preview for binary/invalid-UTF-8 files.
* **Beautiful output** – generated `CONTEXT.md` includes a directory tree, collapsible code blocks and language highlighting.
* **CLI ergonomics** – powered by `clap` & `indicatif`; built-in `--help` and fancy spinner animation.
* **Pluggable roadmap** – stubs for `diff` and `stats` sub-commands pave the way for incremental context and code analytics.

## 🛠️ Installation


### Cargo

```console
cargo install za              # requires Rust ≥ 1.74
```

### Pre-built binary


```shell
curl -Ls https://github.com/lvillis/za/releases/latest/download/za-x86_64-unknown-linux-musl \
  -o /usr/local/bin/za && chmod +x /usr/local/bin/za
```

## ⚡ Quick Start


```shell
# generate CONTEXT.md in project root (keeps 200 lines per file)

za gen

# advanced: keep 800 lines, include binary preview, write to docs/CONTEXT.md

za gen --max-lines 800 --include-binary --output docs/CONTEXT.md
```

Example output (excerpt):

```markdown
# 📚 Project Context — generated by za

_Generated at: 2025-05-07T14:47:50Z_

## 1. Directory Overview


(27  ) Cargo.toml
(30  ) README.md
(237 ) src/main.rs

## 2. File Snippets

<details><summary>src/main.rs</summary>

```rust
// src/main.rs
use anyhow::Result;
…
</details>
```