1 unstable release
Uses new Rust 2024
| 0.1.0 | May 7, 2025 |
|---|
#28 in #text-line
12KB
189 lines
Table of Contents ↗️
za
🛠️ Zero-to-All — scan your workspace and generate an opinionated CONTEXT.md so AI, code-reviewers and newcomers always have the full picture.
✨ 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.mdincludes a directory tree, collapsible code blocks and language highlighting. - CLI ergonomics – powered by
clap&indicatif; built-in--helpand fancy spinner animation. - Pluggable roadmap – stubs for
diffandstatssub-commands pave the way for incremental context and code analytics.
🛠️ Installation
Cargo
cargo install za # requires Rust ≥ 1.74
Pre-built binary
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
# 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):
# 📚 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>
Dependencies
~7–20MB
~218K SLoC