Skip to content

vidhra/saturn

Repository files navigation

Saturn

Your AI-powered control for cloud infrastructure.

Saturn is an open source cli interface that translates into infra operations. We help in making cloud infrastructure management accessible to everyone - from DevOps engineers to developers who want to focus on building, not configuring.

Saturn demo GIF"

Getting Started

  • Quick Start: Install Saturn and run your first cloud command in minutes with our installation guide
  • Documentation: Learn everything about Saturn's capabilities in our comprehensive docs
  • Run your first command: saturn run "Create a VPC in us-central1" - it's that simple
  • Explore examples: Check out our examples directory for real-world use cases
  • Need help? We're available on GitHub Issues - feel free to reach out and join our community!

⚑ Saturn in Action

Transform complex cloud operations into simple conversations:

# Instead of memorizing complex gcloud commands...
saturn run "Create a serverless VPC access connector named 'dev-connector' in us-central1 with IP range 10.9.0.0/28 in the default network."

# Or automating multi-step workflows...
saturn run "Set up a complete CI/CD pipeline with Cloud Build triggers for my GitHub repo"

# Even complex infrastructure provisioning...
saturn run "Deploy a load-balanced web application with auto-scaling enabled"

πŸš€ Key Features

πŸ€– Natural Language Processing: Speak to your cloud infrastructure ☁️ Multi-Cloud Ready: Currently supports Google Cloud Platform and AWS with azure support coming soon
🧠 RAG-Powered Intelligence: Leverages comprehensive cloud documentation for accurate command generation
πŸ“Š State Management: Complete audit trail and state tracking for all operations
πŸ”§ Extensible Architecture: Easy to add new cloud providers and services
⚑ Fast & Reliable: Built with Python and trying to optimize for production workloads

πŸ› οΈ Saturn Tools

Saturn provides a comprehensive toolkit for cloud operations:

  • saturn run: Execute natural language cloud commands with AI assistance
  • saturn ingest-docs: Build and maintain RAG knowledge bases from cloud documentation
  • Built-in State Tracking: Automatic logging and state management for all operations
  • Multi-Provider Support: Extensible architecture for different cloud providers
  • Rich CLI Interface: Beautiful terminal interface with help and options

Setup

Prerequisites

  • Python 3.10 or higher
  • Google Cloud SDK and AWS CLI
  • API keys for your preferred LLM provider (OpenAI, Google Gemini, Anthropic Claude, or Mistral)

Quick Installation

Option 1: Using UV (Recommended - Faster)

  1. Install UV (if not already installed):

    # On macOS and Linux
    curl -LsSf https://astral.sh/uv/install.sh | sh
    
    # On Windows
    powershell -c "irm https://astral.sh/uv/install.ps1 | iex"
    
    # Or via pip
    pip install uv
  2. Clone and install:

    git clone https://github.com/vidhra/saturn.git
    cd saturn
    uv sync
    saturn --help  # Verify installation
  3. For GPU support:

    uv sync --extra gpu-support

Option 2: Traditional pip Installation

  1. Clone and install:
    git clone https://github.com/vidhra/saturn.git
    cd saturn
    python -m venv venv
    source venv/bin/activate  # On Windows: .\venv\Scripts\activate
    pip install -e .
    pip install torch --index-url https://download.pytorch.org/whl/cu121 # for gpu support

Configuration

  1. Configure your environment:

    # Create your configuration
    cp config.yaml.example config.yaml
    
    # Set up your API keys (create .env file)
    echo "OPENAI_API_KEY=your-key-here" > .env
    echo "GCP_PROJECT_ID=your-project-id" >> .env
  2. Authenticate with Google Cloud:

    gcloud auth application-default login
  3. Ready to go!

    # With UV
    saturn run "List all my compute instances"
    
    # With pip (in activated venv)
    saturn run "List all my compute instances"

Configuration

Saturn uses a flexible configuration system with config.yaml and environment variables:

# config.yaml
llm_provider: openai  # 'gemini', 'claude', 'mistral'
gcp_project_id: your-gcp-project-id
kb_path: api_defs
max_retries: 3
# .env file (keep this secure!)
OPENAI_API_KEY=sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
GEMINI_API_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
GCP_PROJECT_ID=your-gcp-project-id

RAG Engine & Knowledge Base

Saturn includes a powerful RAG (Retrieval Augmented Generation) engine that ensures accurate cloud operations by leveraging comprehensive documentation:

Setup RAG Knowledge Base

# Install RAG dependencies
pip install llama-index>=0.10.0 llama-index-embeddings-huggingface>=0.1.0

# Ingest cloud documentation
saturn ingest-docs --vector-store chroma --docs-path ./internal/tools/gcloud_online_docs_markdown

# Run with RAG enhancement
saturn run "Create a secure GKE cluster with private nodes" --vector-store chroma

Supported Vector Stores

  • ChromaDB: Persistent, production-ready vector database
  • DuckDB: Lightweight, embedded vector storage
  • In-Memory: Fast, session-based storage for development

Usage Examples

Basic Operations

# Infrastructure provisioning
saturn run "Create a new VPC named 'production-vpc' in us-west1"

# Service management  
saturn run "Deploy a Cloud Function that responds to Pub/Sub messages"

# Security configuration
saturn run "Set up IAM roles for a new development team"

Advanced Workflows

# Multi-step operations
saturn run "Set up a complete web application stack with load balancer, auto-scaling, and Cloud SQL database"

# Specify custom options
saturn run "Create a GKE cluster" --project-id my-project --provider gemini --max-retries 5

State Tracking & Logging

Saturn automatically tracks all operations with detailed logging:

{
  "run_info": {
    "query": "Create a VPC connector",
    "status": "COMPLETED",
    "start_time": "2024-01-15T10:30:00Z",
    "end_time": "2024-01-15T10:31:23Z"
  },
  "nodes": [
    {
      "tool": "gcp_executor",
      "status": "COMPLETED",
      "command": "gcloud compute networks vpc-access connectors create...",
      "output": "Created connector [dev-connector]"
    }
  ]
}

Logs are automatically saved to logs/saturn_run_<query>_<timestamp>_<uuid>.json.

Community

Join our growing community of cloud engineers, DevOps professionals, and developers who are revolutionizing how we interact with cloud infrastructure. Share knowledge, contribute to the project, and help us make cloud operations more accessible to everyone.

Contributing

We welcome contributions of all kinds:

  • πŸ› Bug Reports: Create an issue for any bugs you encounter
  • πŸ’‘ Feature Requests: Share your ideas for new capabilities and integrations
  • πŸ“ Documentation: Help improve our docs and examples
  • πŸ”§ Code Contributions: Submit pull requests for bug fixes and new features
  • ☁️ Cloud Provider Support: Help us add support for additional cloud platforms

Development Setup

With UV (Recommended for Development)

# Clone and set up development environment
git clone https://github.com/vidhra/saturn.git
cd saturn
uv sync --dev  # Install with development dependencies

# Run tests
pytest

# Run linting
black saturn/
flake8 saturn/

# Run the application
saturn run "Your query here"

Traditional Development Setup

# Clone and set up development environment
git clone https://github.com/vidhra/saturn.git
cd saturn
python -m venv venv
source venv/bin/activate
pip install -e ".[dev]"

# Run tests
python -m pytest

# Run linting
black saturn/
flake8 saturn/

Roadmap

πŸš€ Coming Soon:

  • AWS Support: Complete Amazon Web Services integration
  • Azure Integration: Microsoft Azure API support
  • Terraform Generation: Convert natural language to Infrastructure as Code
  • Kubernetes Operators: Native Kubernetes resource management
  • Web Interface: Browser-based GUI for Saturn operations
  • Team Collaboration: Multi-user environments with role-based access

Architecture

Saturn is built with a modular, extensible architecture:

β”œβ”€β”€ saturn/           # Core Saturn package
β”‚   β”œβ”€β”€ cli.py       # Command-line interface
β”‚   β”œβ”€β”€ orchestrator.py # AI orchestration engine
β”‚   β”œβ”€β”€ rag_engine.py   # RAG knowledge system
β”‚   β”œβ”€β”€ gcp_executor.py # Google Cloud operations
β”‚   β”œβ”€β”€ aws_executor.py # AWS operations (coming soon)
β”‚   └── ...
β”œβ”€β”€ model/           # Data models and schemas
β”œβ”€β”€ internal/        # Internal tools and utilities
β”œβ”€β”€ examples/        # Usage examples and tutorials
└── docs/           # Documentation

License

Saturn is released under the MIT License. See LICENSE for details.

Support & Contact


⭐ Star us on GitHub if Saturn helps streamline your cloud operations!

Making infrastructure as easy as having a conversation.

Packages

No packages published

Contributors 2

  •  
  •