6 releases
Uses new Rust 2024
| 0.1.5 | Dec 9, 2025 |
|---|---|
| 0.1.4 | Dec 8, 2025 |
#870 in Network programming
130KB
3K
SLoC
Saffron π¦
Saffron is a fast, lightweight command-line HTTP client written in Rust. Test APIs, debug endpoints, and manage request collections β all from your terminal.
β¨ Features
- π Fast & Lightweight: Single binary, minimal dependencies, <5MB
- π¦ Collections: Organize requests into reusable collections
- π Import from External Tools: Import collections from Insomnia (Postman coming soon)
- π Environments: Manage variables across dev/staging/production
- π Request History: Automatic tracking with 100-entry rolling cache
- π§ Template Variables: Use
{{variables}}in URLs, headers, and body - π¨ Colored Output: Beautiful, readable terminal responses
- πΎ Persistent Storage: All data stored locally in
~/.saffron/ - π Privacy-First: No cloud sync, everything runs locally
- β‘ Zero Configuration: Works out of the box
π Quick Start
Installation
From source:
git clone https://github.com/yourusername/saffron.git
cd saffron
cargo build --release
The binary will be in target/release/saffron.exe.
From crates.io (coming soon):
cargo install saffron
Your First Request
# Simple GET request
saffron send https://api.github.com
# POST with JSON
saffron send https://api.example.com/users `
--method POST `
--header "Content-Type: application/json" `
--body '{"name": "Alice", "email": "alice@example.com"}'
# Using environment variables
saffron env set production api_url https://api.prod.com
saffron send {{api_url}}/users
π Documentation
- Getting Started - Installation, configuration, basic usage
- CLI Reference - Complete command reference
- Examples - Real-world usage patterns
- Architecture - Technical design and structure
- Contributing - How to contribute
- FAQ - Frequently asked questions
π‘ Core Concepts
Collections
Organize related requests:
# Create collection
saffron collection new github-api
# Add request
saffron collection add github-api get-user `
--method GET `
--url https://api.github.com/users/octocat
# Run request from collection
saffron send --from-collection "github-api/get-user"
# Import from Insomnia
saffron collection import insomnia-export.json
# List all collections
saffron collection list
Environments
Manage variables across environments:
# Set variables
saffron env set development base_url https://api.dev.com
saffron env set production base_url https://api.prod.com
# Switch environments
saffron env use production
# Use in requests
saffron send {{base_url}}/users
Request History
Automatic tracking of all requests:
# List history
saffron history list
# Show details
saffron history show abc123
# Rerun a request
saffron history rerun abc123
# Clear history
saffron history clear
π― Why Saffron?
| Feature | Saffron | curl | Postman |
|---|---|---|---|
| CLI-first | β | β | β |
| Collections | β | β | β |
| Environments | β | β | β |
| Request History | β | β | β |
| Template Variables | β | β | β |
| Lightweight | β | β | β |
| Scriptable | β | β | β οΈ |
| Privacy | β | β | β οΈ |
| Open Source | β | β | β |
ποΈ Architecture
Saffron is built as a modular Rust workspace:
saffron/
βββ saffron-core # Domain models (requests, responses, collections)
βββ saffron-http # HTTP client implementation (ureq-based)
βββ saffron-data # Custom JSON parser (no external deps)
βββ saffron-cli # Command-line interface (clap-based)
βββ saffron-ui # GUI (planned)
βββ saffron-utils # Shared utilities
See Architecture for details.
π§ͺ Testing
Saffron has comprehensive test coverage:
# Run all tests
cargo test
# Run specific crate tests
cargo test -p saffron-core
cargo test -p saffron-http
cargo test -p saffron-data
Current test counts:
saffron-core: 82 testssaffron-data: 33 testssaffron-http: 18 tests- Total: 133 tests
πΊοΈ Roadmap
β Completed (v0.1.0)
- Core HTTP client
- CLI interface
- Collections management
- Environment variables
- Request history
- Template variable resolution
- Colored terminal output
- Comprehensive documentation
π§ In Progress
- GUI implementation (saffron-ui)
- Import/export (Postman, Insomnia)
- SSL verification control
- Proxy support
π Planned
- GraphQL support
- WebSocket support
- Request chaining
- Response assertions
- Pre/post-request scripts
- Code generation (curl, Python, etc.)
- Team sync (Git-based)
π€ Contributing
Contributions are welcome! See CONTRIBUTING.md for guidelines.
Quick checklist:
- Fork the repository
- Create a feature branch
- Write tests
- Follow coding standards
- Submit a pull request
π License
Saffron is licensed under the MIT License.
π Acknowledgments
Built with these excellent Rust crates:
- ureq - HTTP client
- clap - CLI parsing
- serde - Serialization
- colored - Terminal colors
- thiserror - Error handling
π§ Contact
- Issues: GitHub Issues
- Discussions: GitHub Discussions
Made with β€οΈ and Rust
Dependencies
~5β18MB
~174K SLoC