A Rust-based CLI tool demonstrating the use of Rig with Zapper's GraphQL API and OpenAI to create an interactive portfolio analysis agent.
- Integration of Rig with Zapper's GraphQL API
- Interactive CLI interface using Rig's agent and tool system
- Multi-network portfolio analysis
- Support for both EVM and Solana addresses
- Pretty-printed table output
- Rust and Cargo installed
- OpenAI API key
- Zapper API key
- Clone the repository
- Create a
.env
file with your API keys:OPENAI_API_KEY=your_openai_key ZAPPER_API_KEY=your_zapper_key
- Build and run:
cargo build cargo run
After starting the program:
> analyze <wallet-address>
Example:
> analyze 0x123... # for Ethereum addresses
> analyze your.solana.address # for Solana addresses
src/zapper/
- Zapper API client and typessrc/tools/
- Rig tool implementationssrc/types.rs
- Shared type definitionssrc/main.rs
- CLI interface and agent setup