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.1.3.tar.gz (8.8 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.1.3-py3-none-any.whl (9.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: stackai_cli-0.1.3.tar.gz
  • Upload date:
  • Size: 8.8 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.1.3.tar.gz
Algorithm Hash digest
SHA256 030135daeb5abc01e987b810bd31620f438fefab2475e63ec28bc4262bb1339a
MD5 230369321222e282dccb1fda5cbbd2b4
BLAKE2b-256 bc8a75a3f1b7d702662b05aed1a05fd59fa701fef2209508f727a8a91ccfd403

See more details on using hashes here.

Provenance

The following attestation bundles were made for stackai_cli-0.1.3.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.1.3-py3-none-any.whl.

File metadata

  • Download URL: stackai_cli-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 9.1 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.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 563208a941a19e90eaef4654abdd801f6259d55cb48fd5fbb45050c19e8ddd16
MD5 2b364a6905a742ae0dd87648997711ab
BLAKE2b-256 3231f8dc54b70799ccfd872be38d966bf9a07eff188ebf53385da20998105a16

See more details on using hashes here.

Provenance

The following attestation bundles were made for stackai_cli-0.1.3-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