Skip to main content

AI-powered Docker assistant — detects your stack, generates Dockerfile & compose, debugs containers.

Project description

stackai-cli

AI-powered Docker assistant. No configuration needed.

stackai analyzes your project, generates an optimized Dockerfile and docker-compose, and debugs your containers using a local AI model — all in a single command.

PyPI version Python License: MIT

Installation

pip install stackai-cli

stackai debug requires Ollama running locally with ollama pull llama3.

Commands

stackai init — Generate Docker files from your project

cd my-project
stackai init
🔍 Analyzing project...
✅ Stack detected: python / fastapi + postgres + redis
⚙️  Generating Docker files...
  ✅ Dockerfile created
  ✅ .dockerignore created
  ✅ docker-compose.yaml created

🚀 Ready! Run: docker compose up -d

stackai scan — Inspect detected stack without generating files

stackai scan
📦 Stack detected:
  Language    : python
  Framework   : fastapi
  Port        : 8000
  Services    : postgres, redis
  Python ver. : 3.11

stackai debug — Analyze a failing container with AI

stackai debug my-container
📋 Latest logs:
  ─────────────────────────────────────────
  Error: could not connect to postgres...
  ─────────────────────────────────────────

🤖 Running AI analysis...

💡 Analysis:
1. PROBLEM : The app cannot connect to PostgreSQL
2. CAUSE   : The postgres container is not ready when the app starts
3. FIX     : Add `depends_on: [postgres]` in your docker-compose.yaml

Supported Stacks

Language Detected Frameworks
Python FastAPI, Flask, Django, generic
Node.js Express, Next.js, Nuxt.js, React
Java Spring Boot (Maven / Gradle)
Go generic

Auto-detected Services

postgres · redis · mongodb · mysql · elasticsearch

Requirements

  • Python 3.10+
  • Docker installed and running
  • Ollama + ollama pull llama3 (only for stackai debug)

Contributing

Pull requests are welcome. For major changes, please open an issue first.

License

MIT © El Mehdi Boutahar

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

stackai_cli-0.2.0.tar.gz (12.6 kB view details)

Uploaded Source

Built Distribution

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

stackai_cli-0.2.0-py3-none-any.whl (12.8 kB view details)

Uploaded Python 3

File details

Details for the file stackai_cli-0.2.0.tar.gz.

File metadata

  • Download URL: stackai_cli-0.2.0.tar.gz
  • Upload date:
  • Size: 12.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for stackai_cli-0.2.0.tar.gz
Algorithm Hash digest
SHA256 d886e62202a484fbd4d43c88fdaccd1d4ba7802630e70ae233df20b379a75dc5
MD5 c99b1720d0312ab338d6cb0d30f6fb0f
BLAKE2b-256 c6865301e5e2f0b0f43cbf8aa20a1d2d0ba2cfd97d6ebda8daf3198bf56f469a

See more details on using hashes here.

Provenance

The following attestation bundles were made for stackai_cli-0.2.0.tar.gz:

Publisher: publish.yml on MehdiB7/devai

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

File details

Details for the file stackai_cli-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: stackai_cli-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 12.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for stackai_cli-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 20b429a108928ca4c9c8883c1bba01268d552a99defde8a2295bcc55576b19ba
MD5 90fc5ea303ac80b405cf01cb9de7e8cc
BLAKE2b-256 dadb6706f2c7d428371fc00d8b1be6bcf71859079e56757bbb445ead010b7eac

See more details on using hashes here.

Provenance

The following attestation bundles were made for stackai_cli-0.2.0-py3-none-any.whl:

Publisher: publish.yml on MehdiB7/devai

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