3 releases
new 0.1.2 | Mar 8, 2025 |
---|---|
0.1.1 | Mar 8, 2025 |
0.1.0 | Mar 8, 2025 |
#639 in Development tools
41KB
598 lines
🚀 Vertex AI Setup Tool
A powerful command-line tool for setting up and testing Google Cloud Vertex AI integration. This tool automates the process of enabling Vertex AI services, managing authentication, and testing API calls.
✨ Features
- 🔧 Automatic Service Enablement: Checks and enables Vertex AI service if needed
- 📋 Model Discovery: Lists available Vertex AI models in your project
- 🔑 Authentication Setup: Automatically configures Application Default Credentials (ADC)
- 🔍 Environment Management: Sets up and manages environment variables
- 🎨 Rich Terminal Interface: Beautiful ASCII art, animations, and color-coded information
- 🔬 API Testing: Built-in test functionality with Gemini Pro 2 model
- 📚 Comprehensive Documentation: Detailed instructions for future API usage
🛠️ Prerequisites
Before using this tool, ensure you have:
- Rust and Cargo installed
- Google Cloud SDK (gcloud CLI) installed and configured
- Active Google Cloud project with billing enabled
- Appropriate IAM permissions (e.g.,
roles/aiplatform.user
)
📦 Installation
Option 1: Install via crates.io (Recommended)
cargo install hvertex
Option 2: One-Step Setup from Source
# Clone the repository
git clone git@github.com:RustSandbox/Vertex-AI-Setup-Tool.git
cd Vertex-AI-Setup-Tool
# Build in release mode
cargo build --release
# Run the tool
cargo run --release
Option 3: Manual Installation
If you prefer to install manually:
# Build the release version
cargo build --release
# Copy to a directory in your PATH
mkdir -p ~/.local/bin
cp target/release/hvertex ~/.local/bin/
chmod +x ~/.local/bin/hvertex
# Add to PATH if needed
echo 'export PATH=$PATH:~/.local/bin' >> ~/.zshrc # or ~/.bashrc
source ~/.zshrc # or ~/.bashrc
🚀 Usage
Run the application:
hvertex
The application will guide you through:
- 🔍 Checking/enabling Vertex AI service
- 📊 Listing available models
- 🔑 Setting up authentication
- 🔍 Verifying environment variables
- 🔬 Testing the API with Gemini Pro 2
- 📚 Displaying usage instructions
🧩 How It Works
- The tool checks if Vertex AI service is enabled in your project
- Lists available Vertex AI models in your project
- Sets up authentication using Application Default Credentials (ADC)
- Configures environment variables for API access
- Tests the API using the Gemini Pro 2 model
- Provides comprehensive documentation for future use
🎨 Terminal Interface
The application includes:
- 📊 ASCII Art Banner: Beautiful welcome banner
- 🎬 Animations: Typing effects, spinners, and progress bars
- 🎨 Color-Coded Information: Different colors for different types of information
- 📦 Boxed Messages: Important information displayed in stylish boxes
⚙️ Customization
Modify the config.rs
file to customize:
- Animation Settings: Enable/disable animations and timing
- Color Schemes: Change the color theme
- Emojis: Customize emojis used for different messages
🔧 Troubleshooting
If you encounter issues:
- Ensure you're authenticated with gcloud:
gcloud auth login
- Verify your active project:
gcloud config get-value project
- Check Vertex AI permissions in Google Cloud Console
- Run with verbose output:
RUST_LOG=debug hvertex
👨💻 About the Author
I'm Hamze Ghalebi, CTO at Remolab, passionate about building tools that improve developer workflows. This Vertex AI Setup Tool is part of a collection of tools I originally built for my own use, and I've decided to open source it in case others find it helpful.
Many of the tools I create solve specific pain points in my daily workflow with cloud infrastructure and development environments. If you have any feedback or suggestions for improvements, please feel free to contribute!
Connect with me:
- GitHub: hghalebi
- Twitter/X: @hamzeml
- LinkedIn: Hamze Ghalebi
Support this project:
If you find this tool useful, please consider sponsoring me on GitHub to support continued development and maintenance.
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
📝 Release Notes
v0.1.1 (2024-03-21)
- 🎨 Enhanced terminal interface with improved ASCII art and animations
- 🔧 Added support for Gemini Pro 2 model testing
- 📚 Improved documentation and usage instructions
- 🐛 Fixed environment variable handling
- 🔑 Streamlined authentication setup process
v0.1.0 (2024-03-20)
- 🚀 Initial release
- ✨ Basic Vertex AI service setup and configuration
- 🔍 Model discovery functionality
- 🔑 Authentication management
- 📊 Environment variable configuration
Dependencies
~6–18MB
~254K SLoC