zfish-0.1.0 has been yanked.
๐ zfish โ Ultra-Light CLI Framework for Rust
โจ Features
- ๐ Zero Dependencies โ No third-party crates, only
std - ๐จ Rich Styling โ 16 ANSI colors + 256-color palette
- โก Blazing Fast โ Cold start <5ms, parse 1M flags in ~200ms
- ๐ Memory Safe โ
#![forbid(unsafe_code)]in public API - ๐ Cross-Platform โ Linux, macOS, Windows (tier-1 support)
- ๐ฆ Lightweight โ Minimal binary size, fast compile times
- ๐ฏ Intuitive API โ Ergonomic design, great docs
๐ Quick Start
Add zfish to your Cargo.toml:
[]
= "0.1"
Hello, Colorful World!
use Color;
Argument Parsing
use Args;
Progress Bar
use ProgressBar;
use thread;
use Duration;
Interactive Prompts
use Prompt;
256-Color Palette
use Color;
๐ Documentation
- API Docs: docs.rs/zfish
- Roadmap: ROADMAP.md
- Examples: examples/ (coming soon)
๐ฏ Design Philosophy
Why zfish?
Most CLI frameworks pull in dozens of dependencies, increasing:
- Compile times (minutes instead of seconds)
- Binary size (MBs instead of KBs)
- Supply chain risk (trust dozens of crates)
- Maintenance burden (breaking changes cascade)
zfish takes a different approach:
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Other CLI Frameworks โ zfish โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ 50+ dependencies โ 0 dependencies โ
โ ~10 second compile โ ~1 second compile โ
โ ~2 MB binary โ ~200 KB binary โ
โ Complex API โ Intuitive API โ
โ ANSI escape codes manual โ Auto color detection โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Core Principles
- Zero Dependencies โ Only Rust std library
- Safety First โ No unsafe code in public API
- Performance โ Optimized for speed and size
- Simplicity โ Easy to learn, hard to misuse
- Cross-Platform โ Works everywhere Rust works
๐๏ธ Project Status
Current Version: 0.1.0 (Foundation Release)
See ROADMAP.md for detailed version plans.
Completed Features (v0.1.0)
- โ 16 standard ANSI colors
- โ 256-color palette
- โ Text styling (bold, italic, underline, etc.)
- โ Basic argument parser
- โ Progress bars
- โ Interactive prompts
- โ Terminal control utilities
- โ Leveled logging
Coming Next (v0.2.0)
- ๐จ Subcommand support
- ๐จ Auto-generated
--help - ๐จ Argument validation
- ๐จ Fuzzing tests
๐ง Feature Flags
zfish uses Cargo feature flags for optional functionality:
[]
= "0.1"
= false # Disable all defaults
= ["colour"] # Enable only what you need
| Flag | Default | Description |
|---|---|---|
colour |
โ | ANSI color support |
raw |
โ | Raw terminal mode (coming in 0.3.0) |
progress |
โ | Progress bars (coming in 0.4.0) |
interactive |
โ | Interactive prompts (coming in 0.3.0) |
๐ค Contributing
Contributions are welcome! Here's how you can help:
- Report Bugs โ Open an issue with details
- Request Features โ Discuss in GitHub Discussions
- Submit PRs โ Check open issues labeled "good first issue"
- Improve Docs โ Fix typos, add examples
Development Setup
# Clone the repository
# Run tests
# Run tests (single-threaded to avoid env var conflicts)
# Build documentation
# Run examples (coming soon)
๐ Performance
zfish is designed for speed:
| Operation | Time (Ryzen 3600) |
|---|---|
| Cold start | ~3ms |
| Parse 1M flags | ~180ms |
| Render progress bar | 60 FPS |
| Color detection | <1ยตs (cached) |
Benchmarks run on:
- CPU: AMD Ryzen 5 3600
- RAM: 16GB DDR4-3200
- OS: Windows 11 / Ubuntu 22.04
๐ Platform Support
| Platform | Status | Notes |
|---|---|---|
| Linux | โ Tier 1 | Tested on Ubuntu 20.04+ |
| macOS | โ Tier 1 | Tested on macOS 12+ |
| Windows | โ Tier 1 | Tested on Windows 10/11 |
| BSD | ๐ก Should work | Not officially tested |
| WASM | โ Not supported | Terminal I/O not available |
๐ License
Dual-licensed under your choice of:
- MIT License (LICENSE-MIT or http://opensource.org/licenses/MIT)
- Apache License 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in zfish shall be dual-licensed as above, without any additional terms or conditions.
๐ Acknowledgments
Inspired by:
- clap โ Excellent API design patterns
- colored โ Color API inspiration
- indicatif โ Progress bar concepts
- dialoguer โ Interactive prompt ideas
Built with zero dependencies as a proof-of-concept that powerful CLIs don't need to pull in half of crates.io.
๐ฌ Community
- GitHub Discussions โ Ask questions, share ideas
- Issues โ Report bugs, request features
- Twitter โ Follow @jeetkarena for updates
๐ Stargazers over time
Created with โค๏ธ by Jeet Karena
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ zfish v0.1.0 โ
โ Copyright ยฉ 2025 Jeet Karena โ
โ Licensed under MIT OR Apache-2.0 โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ