Skip to main content

The Autonomous System Integrator - AI-powered Docker orchestration

Project description

๐Ÿงต StackWeaver - Weave Production-Ready Docker Stacks with AI

Turn natural language into production-ready infrastructure.

"I need a CRM + Project Management + Chat" โ†’ stackweaver init โ†’ Working stack in 5 minutes โšก

CI Pipeline GitHub License Python codecov


๐ŸŽฏ What is StackWeaver?

StackWeaver is an AI-powered CLI that transforms natural language into production-ready Docker stacks:

  • ๐Ÿ” Search 50+ curated OSS tools via AI semantic search
  • โš™๏ธ Generate production-ready docker-compose.yml with 100% validation
  • ๐Ÿš€ Deploy locally with automatic Traefik reverse proxy (SSL + subdomains)
  • ๐Ÿ” Manage secrets, volumes, and dependency isolation automatically

Target User: Technical solopreneurs who know Docker basics but hate infrastructure configuration.


๐Ÿš€ Quick Start

Prerequisites

  • Python 3.11+ (Check: python --version)
  • Docker Desktop (Check: docker --version)
  • Git (Check: git --version)

Installation

Option 1: pip + venv (Recommended for Windows)

# Clone repository
git clone https://github.com/stackweaver-io/stackweaver.git
cd stackweaver

# Create virtual environment
python -m venv .venv

# Activate (Windows)
.\.venv\Scripts\Activate.ps1

# Activate (Linux/Mac)
source .venv/bin/activate

# Install
pip install -e .

# Verify installation
stackweaver --version

Option 2: Poetry

# Clone repository
git clone https://github.com/stackweaver-io/stackweaver.git
cd stackweaver

# Install dependencies
poetry install

# Verify installation
poetry run stackweaver --version

First Run

# Initialize configuration
stackweaver version

# This creates ~/.stackweaver/config.yaml
# Edit it to add your LLM API key (optional, not needed for Ollama)

# Ingest tool catalog
python -m stackweaver.search.ingest

# You're ready!
stackweaver init

๐Ÿ“– Usage

Search for Tools

stackweaver search "project management tool"
# Returns: Taiga, Kanboard, OpenProject

stackweaver search "I need a CRM"
# Returns: EspoCRM, SuiteCRM, Monica

Initialize and Deploy a Stack

# Initialize project
stackweaver init --query "CRM for small business"

# Review generated files
ls stack/
# docker-compose.yml, .env

# Deploy the stack
stackweaver deploy

# Access your services
open http://espocrm.localhost

Manage Deployments

stackweaver status      # Check running services
stackweaver logs        # View service logs
stackweaver rollback    # Stop and remove stack

๐Ÿ“š For detailed usage, see USER-GUIDE.md


๐Ÿ—๏ธ Architecture

Technology Stack

  • AI/ML: ChromaDB (vector search), LiteLLM (multi-LLM support)
  • CLI: Click, Rich (beautiful terminal UI)
  • Docker: Docker SDK, python-on-whales
  • Templates: Jinja2
  • Validation: Pydantic v2

Project Structure

stackweaver/
โ”œโ”€โ”€ cli/              # Command-line interface
โ”œโ”€โ”€ search/           # Semantic tool search
โ”‚   โ”œโ”€โ”€ schemas.py    # Pydantic models
โ”‚   โ”œโ”€โ”€ vector_store.py  # ChromaDB wrapper
โ”‚   โ”œโ”€โ”€ llm_ranker.py    # LLM re-ranking
โ”‚   โ”œโ”€โ”€ tool_search.py   # Search API
โ”‚   โ””โ”€โ”€ ingest.py     # Catalog ingestion
โ”œโ”€โ”€ generator/        # docker-compose generation (Epic 2)
โ”œโ”€โ”€ deployer/         # Docker deployment (Epic 3)
โ”œโ”€โ”€ knowledge_base/   # Tool catalog (55 tools)
โ””โ”€โ”€ utils/            # Config, helpers

tests/
โ”œโ”€โ”€ unit/             # Unit tests (108 tests)
โ””โ”€โ”€ integration/      # Integration tests

๐Ÿ—‚๏ธ Configuration

Edit ~/.stackweaver/config.yaml:

# LLM Provider (openai, anthropic, ollama)
llm_provider: openai
llm_model: gpt-4o
llm_api_key: sk-your-key-here  # Not needed for Ollama

# Docker Settings
docker_socket: unix:///var/run/docker.sock

# Deployment Settings
traefik_domain: localhost

# Search Settings
search_top_k: 3
use_llm_rerank: true

๐Ÿ“š For complete configuration reference, see CONFIGURATION.md


๐Ÿงช Development

Setup

# Install dev dependencies
pip install -e ".[dev]"

# Install pre-commit hooks
pre-commit install

# Run tests
pytest

# Run tests with coverage
pytest --cov=stackweaver --cov-report=html

# Lint and format
black .
ruff check .
mypy stackweaver

Running Tests

# All tests
pytest

# Unit tests only
pytest tests/unit/

# Integration tests
pytest tests/integration/

# Specific module
pytest tests/unit/search/

# With coverage report
pytest --cov=stackweaver --cov-report=term-missing

๐Ÿ“ฆ Tool Catalog

StackWeaver includes 55 production-ready OSS tools across 15 categories:

Category Examples
Project Management Taiga, Kanboard, OpenProject, Wekan, Focalboard
CRM EspoCRM, SuiteCRM, Monica, Twenty
Chat Rocket.Chat, Mattermost, Zulip
Analytics Metabase, Superset, Redash, Plausible, Umami
Database PostgreSQL, MySQL, MongoDB, Redis, ClickHouse
Storage Nextcloud, Seafile, MinIO, Pydio
Automation n8n, Huginn, Automatisch
Monitoring Grafana, Prometheus, Uptime Kuma
Development Gitea, GitLab, Jenkins
Security Vaultwarden, Authentik, Keycloak
Infrastructure Traefik, Nginx, Caddy, Portainer
Email Mailcow, Mailu, Docker Mailserver
Wiki BookStack, Wiki.js, Outline
CMS WordPress, Ghost, Strapi, Directus
Marketing Listmonk, Mautic, Chatwoot

All tools are:

  • โœ… Actively maintained (last updated < 6 months)
  • โœ… Production-ready (quality score > 5/10)
  • โœ… Docker-ready (official images)
  • โœ… Well-documented

๐Ÿ›ฃ๏ธ Roadmap

Epic 1: Knowledge Base Foundation โœ… (COMPLETE)

  • Project structure & CLI scaffolding
  • Tool schema & catalog (55 tools)
  • ChromaDB vector store
  • Tool ingestion pipeline
  • LiteLLM multi-provider integration
  • Semantic search (vector + LLM hybrid)
  • Configuration management

Epic 2: Stack Generation โœ… (COMPLETE)

  • Jinja2 template engine
  • docker-compose.yml generation
  • 3-stage validation pipeline
  • Conflict resolution (Isolation strategy)
  • Secret generation

Epic 3: Deployer & CLI โœ… (COMPLETE)

  • Docker SDK integration
  • Traefik reverse proxy setup
  • CLI commands (init, deploy, status, rollback)
  • Health checks & monitoring

Epic 4: Core Engine & Testing โœ… (COMPLETE)

  • ResourceManager (Singleton DI)
  • StackWeaverCore (Central orchestration)
  • Config & State Management
  • Structured Logging
  • Agent Interfaces (Phase 2 prep)
  • CI/CD Pipeline
  • Comprehensive Documentation
  • 520+ Unit & Integration Tests
  • 88% Code Coverage

Phase 2: LangGraph Agents (2026)

  • Curator Agent (Intelligent tool search)
  • Architect Agent (Smart stack design)
  • Deployer Agent (Self-healing deployment)
  • Monitor Agent (Proactive monitoring)

๐Ÿค Contributing

Contributions are welcome! Please read CONTRIBUTING.md for guidelines.

Quick Contribution Guide

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Make your changes
  4. Run tests (pytest)
  5. Run linters (black . && ruff check . && mypy stackweaver)
  6. Commit (git commit -m 'Add amazing feature')
  7. Push (git push origin feature/amazing-feature)
  8. Open a Pull Request

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.


๐Ÿ“š Documentation

๐Ÿ”— Links


๐Ÿ™ Acknowledgments

Built with love by Ahmed and powered by:


Made with ๐Ÿงต by the StackWeaver team

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

stackweaver-0.1.0.tar.gz (78.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

stackweaver-0.1.0-py3-none-any.whl (97.2 kB view details)

Uploaded Python 3

File details

Details for the file stackweaver-0.1.0.tar.gz.

File metadata

  • Download URL: stackweaver-0.1.0.tar.gz
  • Upload date:
  • Size: 78.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for stackweaver-0.1.0.tar.gz
Algorithm Hash digest
SHA256 f92fb3675b4eea01d154dab5190331f3936f97e88c5d8478f4271f33fdc6b9f6
MD5 dc8822cae4367add856d0bfecfe0f3a9
BLAKE2b-256 9cd87844ffb8a1a428e09de65ae005e2f93768978ab5d74bb29793fdb2f9a5a6

See more details on using hashes here.

Provenance

The following attestation bundles were made for stackweaver-0.1.0.tar.gz:

Publisher: publish-pypi.yml on stackweaver-io/stackweaver

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file stackweaver-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: stackweaver-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 97.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for stackweaver-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 38de5ed35500b68c6ff98b46d3070a38d72f106ef5b557ebc2ad4c9b4b704fae
MD5 23a47923c0c0d4f5fbdae8aa44573c66
BLAKE2b-256 c57bcbfbbb450f41d320a25cd4992a5ed4baf9f5b7058d1a08221ded1f0da7d6

See more details on using hashes here.

Provenance

The following attestation bundles were made for stackweaver-0.1.0-py3-none-any.whl:

Publisher: publish-pypi.yml on stackweaver-io/stackweaver

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page