π cchain
Automate like the future depends on it.
Replace brittle shell scripts with AI-powered, retry-aware workflows. Built in Rust for speed and reliability.
β‘ Quick Example
Automate Git commits with AI-generated messages (no more "fix typo" commits!):
JSON Workflow (cchain_git_commit.json):
π Why Developers Love cchain
| Problem | cchain Solution |
|---|---|
| "Bash scripts break at 3 AM" | β Declarative JSON workflows with built-in retries |
| "Commit messages take forever" | β AI-generated inputs via LLMs |
| "Why does CI/CD fail locally?!" | β Identical behavior across local/CI environments |
| "Makefiles are so 1980" | β Simple syntax with concurrency (beta) |
| "Dependency hell" | β Single binaryβzero runtime dependencies |
π οΈ Features
π Chain Commands Like a Pro
- Retry failed steps (up to
Ntimes, or use-1to retry indefinitely until succeeded) - Pass outputs between commands via environment variables
- Fix failures automatically: Roll back with
remedy_command_line
π€ AI-Powered Automation
"arguments":
- Integrate LLMs (OpenAI, local models via Ollama, etc.)
- Generate commit messages, error summaries, test data on the fly
π Cross-Platform Consistency
- Works on Linux/macOS/Windows out of the box
- No more
if [[ "$OSTYPE" == "linux-gnu"* ]]; then...
β‘ Performance Youβll Notice
- Built in Rustβstarts faster than your shellβs
&&chain - Uses 10x less memory than Python/Ruby scripts
π¦ Installation
One-line install (requires Rust):
Pre-built binaries (coming soon!)
Subscribe for updates
π Getting Started
1. Create Your First Workflow
AI generates a starter cchain_deploy.json!
2. Run It!
3. Save for Later
π§© Advanced Usage
Dynamic Environment Variables
Concurrent Tasks (Beta)
You may find examples in the ./examples directory of this repo. Also, you may use the following command to generate a template chain file:
π Comparison
cchain |
Bash | Just | Python | |
|---|---|---|---|---|
| Retry Logic | β Built-in | β Manual | β Manual | β Manual |
| AI Integration | β Native | β None | β None | β Add-ons |
| Cross-Platform | β Single Bin | β (Fragile) | β | β (If setup) |
| Learning Curve | Low (JSON) | High | Medium | High |
π οΈ Use Cases
CI/CD Made Simple
Developer Onboarding
AI-Augmented Debugging
π Documentation
Guides
π€ Contributing
We welcome PRs!
π License
MIT Β© 2024 Xinyu Bao "Do whatever you wantβjust donβt make CI pipelines cry."