Sign inSign up
rover-slim logo

bsankarganesh/rover-slim

By bsankarganesh

โ€ขUpdated 14 days ago

Autonomous container optimization, AST dependency segregation, and Green-on-Arrival engine.

Image
0

1.3K

bsankarganesh/rover-slim repository overview

โ ๐Ÿš€ Rover-Slim: Autonomous Container Optimization Engine & Desktop Extension

GitHub Marketplace M8ven Trust Docker Desktop Extension Rancher Desktop Extension Docker Hub CI Test Suite Coverage Extension Release Python Version License: MIT

Rover-Slim is an intelligent, source-first container optimization engine, official GitHub Marketplace Actionโ , and community Container Desktop Extension (compatible with Docker Desktop & Rancher Desktop) that analyzes application Abstract Syntax Trees (AST), automatically segregates development bloat from minimal production dependencies, synthesizes hardened multi-stage Dockerfiles, and guarantees zero runtime breakage via Green-on-Arrival (GoA) Sentinel health checks.


โ ๐Ÿ“ธ Container Desktop Extension Dashboard

Rover-Slim Dashboard


โ ๐ŸŽฏ Key Capabilities

  • ๐Ÿš€ Official GitHub Action: Published on GitHub Marketplaceโ  to automate container optimization and layer bloat governance directly in CI/CD with automated PR diff comments.
  • โ˜• Polyglot Enterprise Ecosystems: Auto-detects and optimizes Java (Spring Boot Layertools splitting, Maven/Gradle test exclusion), .NET Core (ASP.NET 8/9, MSBuild PackageReference pruning), Node.js (devDependencies stripping), and Python (AST-driven import mapping).
  • ๐Ÿ“ฆ Cloud-Native Asset Decoupling (rover-slim decouple): Synthesizes Kubernetes Init Container (emptyDir) manifests and ORAS scripts to hydrate static web templates, ML models, and heavy localization assets dynamically via OCI registries without baking bloat into application images.
  • ๐Ÿงฌ AST-Driven Dependency Segregation: Parses source syntax trees to detect genuine runtime dependencies, generating lean production images while quarantining test frameworks (spring-boot-starter-test, xunit, jest, pytest).
  • ๐Ÿ—๏ธ Deterministic Multi-Stage Synthesis: Synthesizes 2-stage and 3-stage minimal multi-arch Dockerfiles running under unprivileged non-root users (appuser, UID 10001).
  • ๐Ÿ›ก๏ธ Context Shielding (.dockerignore): Automatically detects and shields build contexts from heavy test caches, .git, node_modules, and local state.
  • โšก Green-on-Arrival (GoA) Sentinel: Boots ephemeral container sandboxes to verify startup integrity, validate active HTTP health probes (/health, /actuator/health, /healthz), and verify static asset graphs before final deployment.
  • ๐Ÿณ Container Desktop Extension Workbench (60 FPS): Interactive visual studio compatible with both Docker Desktop and Rancher Desktop featuring cooperative task chunking, live KPI gauges, 2-column dependency matrix, side-by-side Monaco diff inspector, 1-click Apply with safety checkpoint rollback, and export hub.
  • ๐Ÿค– Model Context Protocol (MCP) Server: Built-in stdio MCP server for agentic IDEs (Antigravity, Cursor, Claude Desktop), officially listed on M8ven MCP Registry & Trust Indexโ  as a Verified Publisher with full safety tool annotations.

โ ๐Ÿ“Š Performance Benchmarks (Real-World Service)

MetricFat / Baseline ContainerRover-Slim OptimizedTotal Savings / Delta
Uncompressed Image Size1,232.7 MB214.6 MB-1,018.1 MB (-82.6%)
Registry Transfer (Compressed)443.8 MB68.7 MB-375.1 MB (-84.5%)
Build Context Size10.2 MB2.4 MB-7.8 MB (-76.5%)
OCI Image Layers18 layers8 layers-10 layers
Installed Packages40 packages12 packages-28 packages
Runtime GoA SentinelUntested / Breakage Risk100% Verified GreenZero Breaking Changes

โ ๐Ÿณ Container Desktop Extension (Docker Desktop & Rancher Desktop)

Rover-Slim provides an interactive visual GUI extension compatible with both Docker Desktop and Rancher Desktop.

Note

**Community Extension**: Rover-Slim is an independent, community-developed extension. It is **not** an official extension, and is not affiliated with, sponsored by, or endorsed by SUSE / Rancher Desktop or Docker, Inc., nor is it listed in the official Docker Desktop Extensions Marketplace or Rancher Desktop Extension Catalog. You can install and use it directly via the standard CLI commands below using the published OCI image on Docker Hub (`bsankarganesh/rover-slim-extension:latest`).
โ 1. Install in Docker Desktop

Install directly via the Docker CLI:

docker extension install bsankarganesh/rover-slim-extension:latest

To update or remove:

# Update to latest version
docker extension update bsankarganesh/rover-slim-extension:latest

# Uninstall extension
docker extension uninstall bsankarganesh/rover-slim-extension:latest
โ 2. Install in Rancher Desktop

Install directly via the Rancher Desktop CLI (rdctl):

rdctl extension install bsankarganesh/rover-slim-extension:latest

(Ensure Rancher Desktop is running with the dockerd (Moby) container runtime selected under Preferences > Container Engine).

To update or remove:

# Update to latest version
rdctl extension update bsankarganesh/rover-slim-extension:latest

# Uninstall extension
rdctl extension uninstall bsankarganesh/rover-slim-extension:latest
โ 3. Launch the Extension

Open Docker Desktop or Rancher Desktop and click Rover Slim in the left navigation sidebar!

โ 4. Extension Features
  • Library Discovery: Select local Docker images or project repositories.
  • Interactive Matrix: Review and customize package splits (Production vs. Development).
  • Diff Inspector: Inspect generated multi-stage Dockerfiles side-by-side.
  • GoA Sentinel: Run live HTTP health probes and ephemeral container sandboxes.
  • Export Hub: Generate GitHub PR descriptions, CI/CD YAML workflows, and SBOMs.

โ ๐Ÿš€ GitHub Action (Official Marketplace)

GitHub Marketplace

Rover-Slim is officially published on the GitHub Marketplaceโ . Integrate autonomous container optimization directly into your CI/CD pipeline to shrink containers, eliminate layer waste, and enforce container size governance on every Pull Request.

โ Example Workflow (.github/workflows/rover-slim.yml)
name: "Rover-Slim Optimization & Governance"
on:
  pull_request:
    branches: [ main ]
  push:
    branches: [ main ]

jobs:
  optimize:
    runs-on: ubuntu-latest
    permissions:
      contents: write
      pull-requests: write
    steps:
      - name: Checkout Code
        uses: actions/checkout@v4

      - name: Run Rover-Slim Container Optimization
        uses: SankarGaneshb/rover-slim@v1
        with:
          project_path: "."
          max_image_size_mb: "350"
          max_wasted_percent: "10"
          verify_goa: "true"
          auto_commit: "false"
โ Action Inputs & Outputs
InputDescriptionDefault
project_pathPath to project root.
max_image_size_mbMaximum allowable uncompressed image size in MB350
max_wasted_percentMaximum allowable layer waste percentage10
verify_goaRun Green-on-Arrival sentinel verification probestrue
auto_commitAutomatically commit and push segregated requirements and multi-stage Dockerfilefalse
github_tokenGitHub token for posting PR summary comments${{ github.token }}
OutputDescription
size_reduction_pctPercentage container size reduction achieved
optimized_size_mbFinal optimized image size in MB
report_jsonStructured JSON metrics summary

โ ๐Ÿ’ป CLI Usage & Quickstart

โ 1. Install Core CLI
pip install -e .
โ 2. Audit Container & Bloat
# Audit current directory or existing Docker image
rover-slim audit .
rover-slim audit . --image my-app:latest
โ 3. Run End-to-End Optimization
# Auto-detects runtime (Java/Spring Boot, .NET Core, Node.js, Python)
# Runs dependency segregation, multi-stage synthesis, and GoA verification
rover-slim optimize . --verify-goa

# Interactive wizard mode (customize package classifications)
rover-slim optimize . --interactive

# Multi-Architecture build output (amd64 + arm64)
rover-slim optimize . --multi-arch
โ 4. Cloud-Native Asset Decoupling (rover-slim decouple)
# Decouple heavy static UI bundles, templates, or ML models from the container
# Generates Kubernetes emptyDir Init Container patches and ORAS OCI artifact scripts
rover-slim decouple ./assets/templates \
  --mount /app/static \
  --ref registry.enterprise.local/assets/auth:v1 \
  --output ./k8s
โ 5. View Side-by-Side Structural Diff
rover-slim diff .
โ 6. Generate Software Bill of Materials (SBOM)
# Generates SPDX 2.3 and CycloneDX 1.5 SBOMs with polyglot purls (Maven, NuGet, npm, PyPI)
rover-slim sbom . --output .rover-slim
โ 7. Continuous File Watcher Mode
# Automatically synchronizes dependency boundaries upon source code edits
rover-slim watch .
โ 8. Safety Rollback Checkpoints
# Restores files from previous snapshot backup
rover-slim rollback .

โ ๐Ÿค– Model Context Protocol (MCP) Server

M8ven Trust Index M8ven Verified Publisher

Rover-Slim is an officially listed and verified server on the M8ven MCP Registry & Trust Indexโ  under Verified Publisher status (@SankarGaneshb), continuously monitored for security, stability, and MCP schema compliance.

It includes a native Model Context Protocol (MCP) server for seamless integration with agentic coding environments (Antigravity, Cursor, Claude Desktop, Windsurf):

{
  "mcpServers": {
    "rover-slim": {
      "command": "rover-slim",
      "args": ["mcp"]
    }
  }
}
โ ๐Ÿ›ก๏ธ Exposed Tools & Safety Annotations

Rover-Slim adheres to the official MCP specification risk vocabulary and OpenAI MCP directory standards. Every exposed tool declares explicit boolean hints (readOnlyHint, destructiveHint, idempotentHint, and openWorldHint):

ToolDescriptionreadOnlyHintdestructiveHintidempotentHintopenWorldHint
audit_containerAudits directory or image for bloat, wasted layers, context leaks, and CVEstruefalsetruefalse
get_markdown_reportGenerates GitHub PR markdown diff summary reporttruefalsetruefalse
verify_goaRuns Green-on-Arrival Sentinel runtime boot integrity & health probestruefalsetruefalse
optimize_projectRuns end-to-end container optimization & writes multi-stage Dockerfilefalsetruetruefalse

๐Ÿ›ก๏ธ Autonomous Safety: Read-only inspection tools execute frictionlessly in agentic IDEs without confirmation prompts, while optimize_project signals destructiveHint: true so hosts warn users before modifying files.


โ โš™๏ธ Configuration (.rover-slim.yaml)

version: "1.0"
project_name: "my-service"

thresholds:
  max_image_size_mb: 350.0
  max_wasted_percent: 10.0
  max_cold_start_seconds: 2.5
  fail_on_cve_severity: ["CRITICAL"]

build:
  target_base_image: "python:3.13-slim"
  enable_multistage: true
  strip_node_runtime: true
  frontend_dist_path: "static/"

verification:
  auto_discover: true
  startup_command: "python -c 'import server; print(\"[OK] Startup Integrity verified\")'"
  probes:
    - name: "HTTP Root Health"
      type: "http"
      path: "/health"
      port: 8080
      expected_status: 200
      timeout_seconds: 10

โ ๐Ÿงช Testing & Verification

# Run full polyglot test suite (181 passed across Python, Java, .NET, decoupling, and API suites)
pytest -v

# Run Extension React UI component test suite (6 suites, 100% green)
cd extension/ui && npm test

โ ๐Ÿ“„ License

This project is licensed under the MIT Licenseโ .

Tag summary

Content type

Image

Digest

sha256:f0dfa34d9โ€ฆ

Size

68.4 MB

Last updated

14 days ago

docker pull bsankarganesh/rover-slim