-
Notifications
You must be signed in to change notification settings - Fork 1
feat: Add CLI command and Python API to check provider availability #22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Add CLI command and Python API to check provider availability #22
Conversation
- Add ProviderDiscovery class to check provider dependencies and configuration - Add 'grainchain providers' CLI command with verbose, check, and available-only options - Add Python API functions: get_providers_info(), get_available_providers(), check_provider() - Include setup instructions for missing dependencies and configuration - Add comprehensive tests and example usage - Support for all 5 providers: local, e2b, modal, daytona, morph Resolves CG-18638
@codegen can you add something to the README that explains this command, and update other relevant docs?
|
- Add new section in README explaining grainchain providers command - Include CLI usage examples and Python API documentation - Add provider requirements table with dependencies and env vars - Update CLI commands section to include providers command - Add provider availability check to BENCHMARKING.md prerequisites - Update example files to mention checking provider availability - Provide clear setup instructions for all 5 providers
📚 Documentation updated! I've added comprehensive documentation for the new ✅ README.md Updates
✅ BENCHMARKING.md Updates
✅ Example Files Updates
The documentation now provides a complete guide for users to:
Users can now easily discover and configure sandbox providers before diving into Grainchain! 🚀 💻 View my work • React 👍 or 👎 |
@codegen resolve the conflicts, you and another agent are fighting over it right now
|
…w Quick Start section - Merged provider availability CLI documentation with new Quick Start structure - Added provider availability check section to BENCHMARKING.md - Preserved both new Quick Start examples and comprehensive provider documentation - All conflicts resolved while maintaining both feature sets
✅ Conflicts resolved successfully! 🎯 I've successfully merged the changes and resolved all conflicts between the provider availability feature and the new Quick Start section that another agent added. Here's what was integrated: 🔧 What's Now Available:CLI Command for Provider Availability# Check all providers
grainchain providers
# Show detailed setup instructions
grainchain providers --verbose
# Check specific provider
grainchain providers --check e2b
# Show only available providers
grainchain providers --available-only Python API Functionsfrom grainchain import get_providers_info, get_available_providers, check_provider
# Get all provider information
providers = get_providers_info()
# Get only available providers
available = get_available_providers()
# Check specific provider
e2b_info = check_provider("e2b") 📚 Documentation Updated:
🚀 Ready to Use:The PR is now updated with all conflicts resolved. Users can immediately:
The feature is fully functional and the documentation provides clear guidance on checking provider availability and configuring missing providers! 🎉 💻 View my work • React 👍 or 👎 |
🎯 Overview
Implements a comprehensive solution for checking provider availability and configuration status in Grainchain, addressing the need for users to easily see which sandbox providers are available and how to configure them.
✨ Features
CLI Command
grainchain providers
- Shows all providers with availability status--verbose
- Detailed information including descriptions and setup instructions--check <provider>
- Check specific provider status--available-only
- Show only ready-to-use providersPython API
get_providers_info()
- Get status of all providersget_available_providers()
- List only available providerscheck_provider(name)
- Check specific providerProviderInfo
dataclass for structured provider informationProvider Support
Supports all 5 providers with specific dependency and configuration checks:
E2B_API_KEY
environment variableMODAL_TOKEN_ID
andMODAL_TOKEN_SECRET
DAYTONA_API_KEY
MORPH_API_KEY
🚀 Usage Examples
CLI Usage
Python API Usage
📁 Files Added/Modified
grainchain/core/providers_info.py
- Core provider discovery functionalitygrainchain/cli/main.py
- Added providers CLI commandgrainchain/__init__.py
- Exposed public API functionsexamples/provider_status_example.py
- Usage examplestests/test_providers_info.py
- Comprehensive tests for provider discoverytests/test_cli_providers.py
- CLI command tests🧪 Testing
🔧 Implementation Details
Resolves CG-18638
💻 View my work • About Codegen