za-0.1.0 is not a library.
✨ 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):
_Generated at: 2025-05-07T14:47:50Z_
(27 ) Cargo.toml
(30 ) README.md
(237 ) src/main.rs
```rust
// src/main.rs
use anyhow::Result;
…