dockerbrain 1.0__tar.gz → 1.0.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {dockerbrain-1.0 → dockerbrain-1.0.2}/LICENSE +0 -0
- dockerbrain-1.0.2/PKG-INFO +63 -0
- dockerbrain-1.0.2/PYPI_README.md +27 -0
- {dockerbrain-1.0 → dockerbrain-1.0.2}/README.md +24 -15
- dockerbrain-1.0.2/core/__init__.py +1 -0
- {dockerbrain-1.0 → dockerbrain-1.0.2}/core/__main__.py +0 -0
- {dockerbrain-1.0 → dockerbrain-1.0.2}/core/ai_advisor.py +0 -0
- {dockerbrain-1.0 → dockerbrain-1.0.2}/core/cli.py +34 -6
- {dockerbrain-1.0 → dockerbrain-1.0.2}/core/dockerizer.py +0 -0
- {dockerbrain-1.0 → dockerbrain-1.0.2}/core/fixer/__init__.py +0 -0
- {dockerbrain-1.0 → dockerbrain-1.0.2}/core/fixer/container.py +0 -0
- {dockerbrain-1.0 → dockerbrain-1.0.2}/core/fixer/dockerfile.py +0 -0
- {dockerbrain-1.0 → dockerbrain-1.0.2}/core/llm.py +3 -3
- {dockerbrain-1.0 → dockerbrain-1.0.2}/core/monitor/__init__.py +0 -0
- {dockerbrain-1.0 → dockerbrain-1.0.2}/core/monitor/collector.py +0 -0
- {dockerbrain-1.0 → dockerbrain-1.0.2}/core/monitor/display.py +0 -0
- {dockerbrain-1.0 → dockerbrain-1.0.2}/core/monitor/snapshot.py +0 -0
- {dockerbrain-1.0 → dockerbrain-1.0.2}/core/optimizer/__init__.py +0 -0
- {dockerbrain-1.0 → dockerbrain-1.0.2}/core/optimizer/engine.py +0 -0
- {dockerbrain-1.0 → dockerbrain-1.0.2}/core/optimizer/rules.py +0 -0
- {dockerbrain-1.0 → dockerbrain-1.0.2}/core/storage.py +0 -0
- {dockerbrain-1.0 → dockerbrain-1.0.2}/core/templates.py +0 -0
- {dockerbrain-1.0 → dockerbrain-1.0.2}/core/utils.py +0 -0
- dockerbrain-1.0.2/dockerbrain.egg-info/PKG-INFO +63 -0
- {dockerbrain-1.0 → dockerbrain-1.0.2}/dockerbrain.egg-info/SOURCES.txt +1 -0
- {dockerbrain-1.0 → dockerbrain-1.0.2}/dockerbrain.egg-info/dependency_links.txt +0 -0
- {dockerbrain-1.0 → dockerbrain-1.0.2}/dockerbrain.egg-info/entry_points.txt +0 -0
- {dockerbrain-1.0 → dockerbrain-1.0.2}/dockerbrain.egg-info/requires.txt +0 -0
- {dockerbrain-1.0 → dockerbrain-1.0.2}/dockerbrain.egg-info/top_level.txt +0 -0
- {dockerbrain-1.0 → dockerbrain-1.0.2}/pyproject.toml +2 -2
- {dockerbrain-1.0 → dockerbrain-1.0.2}/setup.cfg +4 -4
- {dockerbrain-1.0 → dockerbrain-1.0.2}/tests/test_ai_advisor.py +0 -0
- {dockerbrain-1.0 → dockerbrain-1.0.2}/tests/test_dockerizer.py +0 -0
- {dockerbrain-1.0 → dockerbrain-1.0.2}/tests/test_fixer.py +0 -0
- {dockerbrain-1.0 → dockerbrain-1.0.2}/tests/test_llm.py +0 -0
- {dockerbrain-1.0 → dockerbrain-1.0.2}/tests/test_monitor.py +0 -0
- {dockerbrain-1.0 → dockerbrain-1.0.2}/tests/test_optimizer.py +0 -0
- {dockerbrain-1.0 → dockerbrain-1.0.2}/tests/test_storage.py +0 -0
- {dockerbrain-1.0 → dockerbrain-1.0.2}/tests/test_templates.py +0 -0
- {dockerbrain-1.0 → dockerbrain-1.0.2}/tests/test_utils.py +0 -0
- dockerbrain-1.0/PKG-INFO +0 -156
- dockerbrain-1.0/core/__init__.py +0 -1
- dockerbrain-1.0/dockerbrain.egg-info/PKG-INFO +0 -156
|
File without changes
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: dockerbrain
|
|
3
|
+
Version: 1.0.2
|
|
4
|
+
Summary: AI-powered Docker container monitoring, analysis, and optimization CLI.
|
|
5
|
+
License: Apache-2.0
|
|
6
|
+
Project-URL: Homepage, https://github.com/iamPulakesh/DockerBrain
|
|
7
|
+
Project-URL: Repository, https://github.com/iamPulakesh/DockerBrain
|
|
8
|
+
Project-URL: Issues, https://github.com/iamPulakesh/DockerBrain/issues
|
|
9
|
+
Keywords: docker,containers,monitoring,optimization,gemini,ai,devops,cli
|
|
10
|
+
Classifier: Development Status :: 4 - Beta
|
|
11
|
+
Classifier: Environment :: Console
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: Intended Audience :: System Administrators
|
|
14
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
15
|
+
Classifier: Operating System :: OS Independent
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
21
|
+
Classifier: Topic :: Software Development :: Quality Assurance
|
|
22
|
+
Classifier: Topic :: System :: Monitoring
|
|
23
|
+
Classifier: Topic :: System :: Systems Administration
|
|
24
|
+
Requires-Python: >=3.10
|
|
25
|
+
Description-Content-Type: text/markdown
|
|
26
|
+
License-File: LICENSE
|
|
27
|
+
Requires-Dist: click>=8.0
|
|
28
|
+
Requires-Dist: docker>=6.0
|
|
29
|
+
Requires-Dist: google-genai>=1.0
|
|
30
|
+
Requires-Dist: openai>=1.0
|
|
31
|
+
Requires-Dist: rich>=13.0
|
|
32
|
+
Provides-Extra: dev
|
|
33
|
+
Requires-Dist: pytest>=7.0; extra == "dev"
|
|
34
|
+
Requires-Dist: pytest-cov>=4.0; extra == "dev"
|
|
35
|
+
Dynamic: license-file
|
|
36
|
+
|
|
37
|
+
# Project Info
|
|
38
|
+
|
|
39
|
+
[](https://github.com/iamPulakesh/DockerBrain/actions/workflows/dockerbrain.yml) [](https://github.com/iamPulakesh/DockerBrain)
|
|
40
|
+
|
|
41
|
+
## Core components of DockerBrain
|
|
42
|
+
|
|
43
|
+
This package contains the command-line based program that allows you to monitor your Docker containers in real time, detect resource issues, and use LLMs to generate actionable optimizations for running containers and Dockerfiles right from your terminal.
|
|
44
|
+
|
|
45
|
+
## Installation
|
|
46
|
+
|
|
47
|
+
Complete DockerBrain's setup by installing the package via pip. To install this package, run:
|
|
48
|
+
|
|
49
|
+
**Recommended**:
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
uv tool install dockerbrain
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
**Or with pip:**
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
pip install dockerbrain
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## Contact
|
|
62
|
+
|
|
63
|
+
For bug reports or feature requests, please open an issue on [GitHub](https://github.com/iamPulakesh/DockerBrain/issues)
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# Project Info
|
|
2
|
+
|
|
3
|
+
[](https://github.com/iamPulakesh/DockerBrain/actions/workflows/dockerbrain.yml) [](https://github.com/iamPulakesh/DockerBrain)
|
|
4
|
+
|
|
5
|
+
## Core components of DockerBrain
|
|
6
|
+
|
|
7
|
+
This package contains the command-line based program that allows you to monitor your Docker containers in real time, detect resource issues, and use LLMs to generate actionable optimizations for running containers and Dockerfiles right from your terminal.
|
|
8
|
+
|
|
9
|
+
## Installation
|
|
10
|
+
|
|
11
|
+
Complete DockerBrain's setup by installing the package via pip. To install this package, run:
|
|
12
|
+
|
|
13
|
+
**Recommended**:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
uv tool install dockerbrain
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
**Or with pip:**
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
pip install dockerbrain
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Contact
|
|
26
|
+
|
|
27
|
+
For bug reports or feature requests, please open an issue on [GitHub](https://github.com/iamPulakesh/DockerBrain/issues)
|
|
@@ -23,10 +23,31 @@ DockerBrain monitors your Docker containers in real time, detects resource issue
|
|
|
23
23
|
|
|
24
24
|
---
|
|
25
25
|
|
|
26
|
+
## Usage
|
|
27
|
+
|
|
28
|
+
DockerBrain exposes all functionality through the `dockerb` CLI. Run the following to see all available commands and options:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
dockerb --help
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Each command also has its own help page, for example `dockerb suggest --help`, `dockerb fix --help`, etc.
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
|
|
26
39
|
## Installation
|
|
27
40
|
|
|
28
41
|
**Requirements:** Python 3.10+ and a running Docker daemon.
|
|
29
42
|
|
|
43
|
+
**Recommended**:
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
uv tool install dockerbrain
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
**Or with pip:**
|
|
50
|
+
|
|
30
51
|
```bash
|
|
31
52
|
pip install dockerbrain
|
|
32
53
|
```
|
|
@@ -43,12 +64,12 @@ dockerb --version
|
|
|
43
64
|
dockerb init
|
|
44
65
|
```
|
|
45
66
|
|
|
46
|
-
This creates `.dockerbrainrc` in
|
|
67
|
+
This creates `.dockerbrainrc` in `~/.dockerbrain/`. Open it with `dockerb config` and set your key:
|
|
47
68
|
|
|
48
69
|
```ini
|
|
49
70
|
[llm]
|
|
50
|
-
provider = "
|
|
51
|
-
model = "
|
|
71
|
+
provider = "groq"
|
|
72
|
+
model = "openai/gpt-oss-120b"
|
|
52
73
|
api_key = "your_key_here"
|
|
53
74
|
```
|
|
54
75
|
|
|
@@ -62,18 +83,6 @@ api_key = "your_key_here"
|
|
|
62
83
|
|
|
63
84
|
---
|
|
64
85
|
|
|
65
|
-
## Usage
|
|
66
|
-
|
|
67
|
-
DockerBrain exposes all functionality through the `dockerb` CLI. Run the following to see all available commands and options:
|
|
68
|
-
|
|
69
|
-
```bash
|
|
70
|
-
dockerb --help
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
Each command also has its own help page, for example `dockerb suggest --help`, `dockerb fix --help`, etc.
|
|
74
|
-
|
|
75
|
-
---
|
|
76
|
-
|
|
77
86
|
## Pre-commit Hook
|
|
78
87
|
|
|
79
88
|
DockerBrain can run as a [pre-commit](https://pre-commit.com/) hook to lint Dockerfiles on every commit:
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "1.0.2"
|
|
File without changes
|
|
File without changes
|
|
@@ -237,7 +237,7 @@ README.md
|
|
|
237
237
|
|
|
238
238
|
@cli.command()
|
|
239
239
|
def init() -> None:
|
|
240
|
-
"""Create a .dockerbrainrc config file in
|
|
240
|
+
"""Create a .dockerbrainrc config file in ~/.dockerbrain/.
|
|
241
241
|
|
|
242
242
|
Creates a TOML config with defaults for monitoring thresholds,
|
|
243
243
|
LLM model selection, and other settings. Edit it as per your requirements.
|
|
@@ -247,7 +247,9 @@ def init() -> None:
|
|
|
247
247
|
from rich.console import Console
|
|
248
248
|
|
|
249
249
|
console = Console()
|
|
250
|
-
|
|
250
|
+
config_dir = Path.home() / ".dockerbrain"
|
|
251
|
+
config_dir.mkdir(parents=True, exist_ok=True)
|
|
252
|
+
config_path = config_dir / ".dockerbrainrc"
|
|
251
253
|
|
|
252
254
|
if config_path.exists():
|
|
253
255
|
console.print(f"[yellow] {config_path} already exists.[/]")
|
|
@@ -258,7 +260,7 @@ def init() -> None:
|
|
|
258
260
|
|
|
259
261
|
# LLM Provider & Models, To switch provider or model, edit below.
|
|
260
262
|
|
|
261
|
-
# GEMINI
|
|
263
|
+
# GEMINI
|
|
262
264
|
# provider = "gemini"
|
|
263
265
|
# model = "gemini-3.1-flash-lite-preview", "gemini-flash-latest"
|
|
264
266
|
|
|
@@ -272,8 +274,8 @@ def init() -> None:
|
|
|
272
274
|
# base_url = "http://localhost:11434/v1" # change if not default
|
|
273
275
|
|
|
274
276
|
[llm]
|
|
275
|
-
provider = "
|
|
276
|
-
model = "
|
|
277
|
+
provider = "groq"
|
|
278
|
+
model = "openai/gpt-oss-120b"
|
|
277
279
|
api_key = "" # Paste your LLM API key here
|
|
278
280
|
# base_url = "" # Only for Ollama
|
|
279
281
|
|
|
@@ -295,6 +297,32 @@ check_dockerignore = true # Warn if .dockerignore is missing
|
|
|
295
297
|
config_path.write_text(config_content, encoding="utf-8")
|
|
296
298
|
console.print(f"[green]Created [bold]{config_path}[/bold][/]")
|
|
297
299
|
|
|
300
|
+
@cli.command()
|
|
301
|
+
def config() -> None:
|
|
302
|
+
"""Open the .dockerbrainrc config file in your default editor."""
|
|
303
|
+
import subprocess
|
|
304
|
+
import sys
|
|
305
|
+
from pathlib import Path
|
|
306
|
+
|
|
307
|
+
from rich.console import Console
|
|
308
|
+
|
|
309
|
+
console = Console()
|
|
310
|
+
config_path = Path.home() / ".dockerbrain" / ".dockerbrainrc"
|
|
311
|
+
|
|
312
|
+
if not config_path.exists():
|
|
313
|
+
console.print(
|
|
314
|
+
"[yellow]Config not found.[/] Run [cyan]dockerb init[/] first."
|
|
315
|
+
)
|
|
316
|
+
return
|
|
317
|
+
|
|
318
|
+
if sys.platform == "win32":
|
|
319
|
+
subprocess.run(["notepad", str(config_path)])
|
|
320
|
+
elif sys.platform == "darwin":
|
|
321
|
+
subprocess.run(["open", str(config_path)])
|
|
322
|
+
else:
|
|
323
|
+
editor = __import__("os").environ.get("EDITOR", "nano")
|
|
324
|
+
subprocess.run([editor, str(config_path)])
|
|
325
|
+
|
|
298
326
|
@cli.command()
|
|
299
327
|
def env() -> None:
|
|
300
328
|
"""Check your environment and configs."""
|
|
@@ -340,7 +368,7 @@ def env() -> None:
|
|
|
340
368
|
masked = cfg.api_key[:4] + "…" + cfg.api_key[-4:] if len(cfg.api_key) > 8 else "set ✓"
|
|
341
369
|
_ok("API Key", f"{masked}")
|
|
342
370
|
except SystemExit:
|
|
343
|
-
_fail("API Key", "not set in
|
|
371
|
+
_fail("API Key", "not set in ~/.dockerbrain/.dockerbrainrc")
|
|
344
372
|
|
|
345
373
|
db_path = Path.home() / ".dockerbrain" / "metrics.db"
|
|
346
374
|
if db_path.exists():
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -36,8 +36,8 @@ class LLMConfig:
|
|
|
36
36
|
|
|
37
37
|
|
|
38
38
|
def _read_rc_section(section: str = "llm") -> dict[str, str]:
|
|
39
|
-
"""Read a section from
|
|
40
|
-
rc_path = Path(".dockerbrainrc"
|
|
39
|
+
"""Read a section from ~/.dockerbrain/.dockerbrainrc (simple TOML-like INI parser)."""
|
|
40
|
+
rc_path = Path.home() / ".dockerbrain" / ".dockerbrainrc"
|
|
41
41
|
if not rc_path.exists():
|
|
42
42
|
return {}
|
|
43
43
|
|
|
@@ -96,7 +96,7 @@ def _show_missing_key_error(provider: str) -> None:
|
|
|
96
96
|
"""Show a brief error for missing API key."""
|
|
97
97
|
console.print(
|
|
98
98
|
Panel(
|
|
99
|
-
f"Add your key to [cyan]
|
|
99
|
+
f"Add your key to [cyan]~/.dockerbrain/.dockerbrainrc[/]:\n"
|
|
100
100
|
f' [cyan]api_key = "your_key_here"[/]',
|
|
101
101
|
title="[bold red]Missing API Key[/]",
|
|
102
102
|
border_style="red",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: dockerbrain
|
|
3
|
+
Version: 1.0.2
|
|
4
|
+
Summary: AI-powered Docker container monitoring, analysis, and optimization CLI.
|
|
5
|
+
License: Apache-2.0
|
|
6
|
+
Project-URL: Homepage, https://github.com/iamPulakesh/DockerBrain
|
|
7
|
+
Project-URL: Repository, https://github.com/iamPulakesh/DockerBrain
|
|
8
|
+
Project-URL: Issues, https://github.com/iamPulakesh/DockerBrain/issues
|
|
9
|
+
Keywords: docker,containers,monitoring,optimization,gemini,ai,devops,cli
|
|
10
|
+
Classifier: Development Status :: 4 - Beta
|
|
11
|
+
Classifier: Environment :: Console
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: Intended Audience :: System Administrators
|
|
14
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
15
|
+
Classifier: Operating System :: OS Independent
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
21
|
+
Classifier: Topic :: Software Development :: Quality Assurance
|
|
22
|
+
Classifier: Topic :: System :: Monitoring
|
|
23
|
+
Classifier: Topic :: System :: Systems Administration
|
|
24
|
+
Requires-Python: >=3.10
|
|
25
|
+
Description-Content-Type: text/markdown
|
|
26
|
+
License-File: LICENSE
|
|
27
|
+
Requires-Dist: click>=8.0
|
|
28
|
+
Requires-Dist: docker>=6.0
|
|
29
|
+
Requires-Dist: google-genai>=1.0
|
|
30
|
+
Requires-Dist: openai>=1.0
|
|
31
|
+
Requires-Dist: rich>=13.0
|
|
32
|
+
Provides-Extra: dev
|
|
33
|
+
Requires-Dist: pytest>=7.0; extra == "dev"
|
|
34
|
+
Requires-Dist: pytest-cov>=4.0; extra == "dev"
|
|
35
|
+
Dynamic: license-file
|
|
36
|
+
|
|
37
|
+
# Project Info
|
|
38
|
+
|
|
39
|
+
[](https://github.com/iamPulakesh/DockerBrain/actions/workflows/dockerbrain.yml) [](https://github.com/iamPulakesh/DockerBrain)
|
|
40
|
+
|
|
41
|
+
## Core components of DockerBrain
|
|
42
|
+
|
|
43
|
+
This package contains the command-line based program that allows you to monitor your Docker containers in real time, detect resource issues, and use LLMs to generate actionable optimizations for running containers and Dockerfiles right from your terminal.
|
|
44
|
+
|
|
45
|
+
## Installation
|
|
46
|
+
|
|
47
|
+
Complete DockerBrain's setup by installing the package via pip. To install this package, run:
|
|
48
|
+
|
|
49
|
+
**Recommended**:
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
uv tool install dockerbrain
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
**Or with pip:**
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
pip install dockerbrain
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## Contact
|
|
62
|
+
|
|
63
|
+
For bug reports or feature requests, please open an issue on [GitHub](https://github.com/iamPulakesh/DockerBrain/issues)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -4,9 +4,9 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "dockerbrain"
|
|
7
|
-
version = "1.0"
|
|
7
|
+
version = "1.0.2"
|
|
8
8
|
description = "AI-powered Docker container monitoring, analysis, and optimization CLI."
|
|
9
|
-
readme = "
|
|
9
|
+
readme = "PYPI_README.md"
|
|
10
10
|
requires-python = ">=3.10"
|
|
11
11
|
license = {text = "Apache-2.0"}
|
|
12
12
|
keywords = ["docker", "containers", "monitoring", "optimization", "gemini", "ai", "devops", "cli"]
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
[egg_info]
|
|
2
|
-
tag_build =
|
|
3
|
-
tag_date = 0
|
|
4
|
-
|
|
1
|
+
[egg_info]
|
|
2
|
+
tag_build =
|
|
3
|
+
tag_date = 0
|
|
4
|
+
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
dockerbrain-1.0/PKG-INFO
DELETED
|
@@ -1,156 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: dockerbrain
|
|
3
|
-
Version: 1.0
|
|
4
|
-
Summary: AI-powered Docker container monitoring, analysis, and optimization CLI.
|
|
5
|
-
License: Apache-2.0
|
|
6
|
-
Project-URL: Homepage, https://github.com/iamPulakesh/DockerBrain
|
|
7
|
-
Project-URL: Repository, https://github.com/iamPulakesh/DockerBrain
|
|
8
|
-
Project-URL: Issues, https://github.com/iamPulakesh/DockerBrain/issues
|
|
9
|
-
Keywords: docker,containers,monitoring,optimization,gemini,ai,devops,cli
|
|
10
|
-
Classifier: Development Status :: 4 - Beta
|
|
11
|
-
Classifier: Environment :: Console
|
|
12
|
-
Classifier: Intended Audience :: Developers
|
|
13
|
-
Classifier: Intended Audience :: System Administrators
|
|
14
|
-
Classifier: License :: OSI Approved :: Apache Software License
|
|
15
|
-
Classifier: Operating System :: OS Independent
|
|
16
|
-
Classifier: Programming Language :: Python :: 3
|
|
17
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
18
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
19
|
-
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
-
Classifier: Programming Language :: Python :: 3.13
|
|
21
|
-
Classifier: Topic :: Software Development :: Quality Assurance
|
|
22
|
-
Classifier: Topic :: System :: Monitoring
|
|
23
|
-
Classifier: Topic :: System :: Systems Administration
|
|
24
|
-
Requires-Python: >=3.10
|
|
25
|
-
Description-Content-Type: text/markdown
|
|
26
|
-
License-File: LICENSE
|
|
27
|
-
Requires-Dist: click>=8.0
|
|
28
|
-
Requires-Dist: docker>=6.0
|
|
29
|
-
Requires-Dist: google-genai>=1.0
|
|
30
|
-
Requires-Dist: openai>=1.0
|
|
31
|
-
Requires-Dist: rich>=13.0
|
|
32
|
-
Provides-Extra: dev
|
|
33
|
-
Requires-Dist: pytest>=7.0; extra == "dev"
|
|
34
|
-
Requires-Dist: pytest-cov>=4.0; extra == "dev"
|
|
35
|
-
Dynamic: license-file
|
|
36
|
-
|
|
37
|
-
# DockerBrain
|
|
38
|
-
|
|
39
|
-
**AI-powered Docker container monitoring, optimization, and Dockerfile generation CLI.**
|
|
40
|
-
|
|
41
|
-
[](https://www.python.org/downloads/)
|
|
42
|
-
[](LICENSE)
|
|
43
|
-
[](https://pypi.org/project/dockerbrain/)
|
|
44
|
-
|
|
45
|
-
DockerBrain monitors your Docker containers in real time, detects resource issues, and uses LLMs to generate actionable optimizations for running containers and Dockerfiles. Supports **Gemini**, **Groq**, and **Ollama**. All configuration lives in a single `.dockerbrainrc` file.
|
|
46
|
-
|
|
47
|
-
---
|
|
48
|
-
|
|
49
|
-
## Features
|
|
50
|
-
|
|
51
|
-
| Feature | Command | LLM Required |
|
|
52
|
-
|---|---|:---:|
|
|
53
|
-
| Real-time container monitoring | `dockerb monitor` | No |
|
|
54
|
-
| AI optimization suggestions | `dockerb suggest` | Yes |
|
|
55
|
-
| Auto-fix containers & Dockerfiles | `dockerb fix` | Yes |
|
|
56
|
-
| AI Dockerfile generation from project | `dockerb dockerize` | Yes |
|
|
57
|
-
| Curated Dockerfile templates | `dockerb template` | No |
|
|
58
|
-
| Environment & config diagnostics | `dockerb env` | No |
|
|
59
|
-
|
|
60
|
-
---
|
|
61
|
-
|
|
62
|
-
## Installation
|
|
63
|
-
|
|
64
|
-
**Requirements:** Python 3.10+ and a running Docker daemon.
|
|
65
|
-
|
|
66
|
-
```bash
|
|
67
|
-
pip install dockerbrain
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
Verify:
|
|
71
|
-
|
|
72
|
-
```bash
|
|
73
|
-
dockerb --version
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
### Configure an LLM Provider
|
|
77
|
-
|
|
78
|
-
```bash
|
|
79
|
-
dockerb init
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
This creates `.dockerbrainrc` in your project directory. Open it and set your provider and key:
|
|
83
|
-
|
|
84
|
-
```ini
|
|
85
|
-
[llm]
|
|
86
|
-
provider = "gemini"
|
|
87
|
-
model = "gemini-3.1-flash-lite-preview"
|
|
88
|
-
api_key = "your_key_here"
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
| Provider | API Key | Link |
|
|
92
|
-
|---|:---:|---|
|
|
93
|
-
| Gemini | Required | [aistudio.google.com](https://aistudio.google.com/app/apikey) |
|
|
94
|
-
| Groq | Required | [console.groq.com/keys](https://console.groq.com/keys) |
|
|
95
|
-
| Ollama | Not Required | [ollama.com](https://ollama.com) |
|
|
96
|
-
|
|
97
|
-
> `monitor`, `template`, and `env` commands work without an API key.
|
|
98
|
-
|
|
99
|
-
---
|
|
100
|
-
|
|
101
|
-
## Usage
|
|
102
|
-
|
|
103
|
-
DockerBrain exposes all functionality through the `dockerb` CLI. Run the following to see all available commands and options:
|
|
104
|
-
|
|
105
|
-
```bash
|
|
106
|
-
dockerb --help
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
Each command also has its own help page, for example `dockerb suggest --help`, `dockerb fix --help`, etc.
|
|
110
|
-
|
|
111
|
-
---
|
|
112
|
-
|
|
113
|
-
## Pre-commit Hook
|
|
114
|
-
|
|
115
|
-
DockerBrain can run as a [pre-commit](https://pre-commit.com/) hook to lint Dockerfiles on every commit:
|
|
116
|
-
|
|
117
|
-
```yaml
|
|
118
|
-
# .pre-commit-config.yaml
|
|
119
|
-
repos:
|
|
120
|
-
- repo: https://github.com/iamPulakesh/DockerBrain
|
|
121
|
-
rev: v1.0
|
|
122
|
-
hooks:
|
|
123
|
-
- id: dockerbrain-fix
|
|
124
|
-
```
|
|
125
|
-
|
|
126
|
-
---
|
|
127
|
-
|
|
128
|
-
## Development
|
|
129
|
-
|
|
130
|
-
```bash
|
|
131
|
-
git clone https://github.com/iamPulakesh/DockerBrain.git
|
|
132
|
-
cd DockerBrain
|
|
133
|
-
pip install -e ".[dev]"
|
|
134
|
-
|
|
135
|
-
make test
|
|
136
|
-
make lint
|
|
137
|
-
make clean
|
|
138
|
-
```
|
|
139
|
-
|
|
140
|
-
---
|
|
141
|
-
|
|
142
|
-
See [Changelog.md](Changelog.md) for the full release history.
|
|
143
|
-
|
|
144
|
-
---
|
|
145
|
-
|
|
146
|
-
## Contributing
|
|
147
|
-
|
|
148
|
-
1. Fork the repository
|
|
149
|
-
2. Contribute
|
|
150
|
-
3. Open a Pull Request
|
|
151
|
-
|
|
152
|
-
---
|
|
153
|
-
|
|
154
|
-
## License
|
|
155
|
-
|
|
156
|
-
Apache-2.0 — see [LICENSE](LICENSE) for details.
|
dockerbrain-1.0/core/__init__.py
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "1.0"
|
|
@@ -1,156 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: dockerbrain
|
|
3
|
-
Version: 1.0
|
|
4
|
-
Summary: AI-powered Docker container monitoring, analysis, and optimization CLI.
|
|
5
|
-
License: Apache-2.0
|
|
6
|
-
Project-URL: Homepage, https://github.com/iamPulakesh/DockerBrain
|
|
7
|
-
Project-URL: Repository, https://github.com/iamPulakesh/DockerBrain
|
|
8
|
-
Project-URL: Issues, https://github.com/iamPulakesh/DockerBrain/issues
|
|
9
|
-
Keywords: docker,containers,monitoring,optimization,gemini,ai,devops,cli
|
|
10
|
-
Classifier: Development Status :: 4 - Beta
|
|
11
|
-
Classifier: Environment :: Console
|
|
12
|
-
Classifier: Intended Audience :: Developers
|
|
13
|
-
Classifier: Intended Audience :: System Administrators
|
|
14
|
-
Classifier: License :: OSI Approved :: Apache Software License
|
|
15
|
-
Classifier: Operating System :: OS Independent
|
|
16
|
-
Classifier: Programming Language :: Python :: 3
|
|
17
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
18
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
19
|
-
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
-
Classifier: Programming Language :: Python :: 3.13
|
|
21
|
-
Classifier: Topic :: Software Development :: Quality Assurance
|
|
22
|
-
Classifier: Topic :: System :: Monitoring
|
|
23
|
-
Classifier: Topic :: System :: Systems Administration
|
|
24
|
-
Requires-Python: >=3.10
|
|
25
|
-
Description-Content-Type: text/markdown
|
|
26
|
-
License-File: LICENSE
|
|
27
|
-
Requires-Dist: click>=8.0
|
|
28
|
-
Requires-Dist: docker>=6.0
|
|
29
|
-
Requires-Dist: google-genai>=1.0
|
|
30
|
-
Requires-Dist: openai>=1.0
|
|
31
|
-
Requires-Dist: rich>=13.0
|
|
32
|
-
Provides-Extra: dev
|
|
33
|
-
Requires-Dist: pytest>=7.0; extra == "dev"
|
|
34
|
-
Requires-Dist: pytest-cov>=4.0; extra == "dev"
|
|
35
|
-
Dynamic: license-file
|
|
36
|
-
|
|
37
|
-
# DockerBrain
|
|
38
|
-
|
|
39
|
-
**AI-powered Docker container monitoring, optimization, and Dockerfile generation CLI.**
|
|
40
|
-
|
|
41
|
-
[](https://www.python.org/downloads/)
|
|
42
|
-
[](LICENSE)
|
|
43
|
-
[](https://pypi.org/project/dockerbrain/)
|
|
44
|
-
|
|
45
|
-
DockerBrain monitors your Docker containers in real time, detects resource issues, and uses LLMs to generate actionable optimizations for running containers and Dockerfiles. Supports **Gemini**, **Groq**, and **Ollama**. All configuration lives in a single `.dockerbrainrc` file.
|
|
46
|
-
|
|
47
|
-
---
|
|
48
|
-
|
|
49
|
-
## Features
|
|
50
|
-
|
|
51
|
-
| Feature | Command | LLM Required |
|
|
52
|
-
|---|---|:---:|
|
|
53
|
-
| Real-time container monitoring | `dockerb monitor` | No |
|
|
54
|
-
| AI optimization suggestions | `dockerb suggest` | Yes |
|
|
55
|
-
| Auto-fix containers & Dockerfiles | `dockerb fix` | Yes |
|
|
56
|
-
| AI Dockerfile generation from project | `dockerb dockerize` | Yes |
|
|
57
|
-
| Curated Dockerfile templates | `dockerb template` | No |
|
|
58
|
-
| Environment & config diagnostics | `dockerb env` | No |
|
|
59
|
-
|
|
60
|
-
---
|
|
61
|
-
|
|
62
|
-
## Installation
|
|
63
|
-
|
|
64
|
-
**Requirements:** Python 3.10+ and a running Docker daemon.
|
|
65
|
-
|
|
66
|
-
```bash
|
|
67
|
-
pip install dockerbrain
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
Verify:
|
|
71
|
-
|
|
72
|
-
```bash
|
|
73
|
-
dockerb --version
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
### Configure an LLM Provider
|
|
77
|
-
|
|
78
|
-
```bash
|
|
79
|
-
dockerb init
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
This creates `.dockerbrainrc` in your project directory. Open it and set your provider and key:
|
|
83
|
-
|
|
84
|
-
```ini
|
|
85
|
-
[llm]
|
|
86
|
-
provider = "gemini"
|
|
87
|
-
model = "gemini-3.1-flash-lite-preview"
|
|
88
|
-
api_key = "your_key_here"
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
| Provider | API Key | Link |
|
|
92
|
-
|---|:---:|---|
|
|
93
|
-
| Gemini | Required | [aistudio.google.com](https://aistudio.google.com/app/apikey) |
|
|
94
|
-
| Groq | Required | [console.groq.com/keys](https://console.groq.com/keys) |
|
|
95
|
-
| Ollama | Not Required | [ollama.com](https://ollama.com) |
|
|
96
|
-
|
|
97
|
-
> `monitor`, `template`, and `env` commands work without an API key.
|
|
98
|
-
|
|
99
|
-
---
|
|
100
|
-
|
|
101
|
-
## Usage
|
|
102
|
-
|
|
103
|
-
DockerBrain exposes all functionality through the `dockerb` CLI. Run the following to see all available commands and options:
|
|
104
|
-
|
|
105
|
-
```bash
|
|
106
|
-
dockerb --help
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
Each command also has its own help page, for example `dockerb suggest --help`, `dockerb fix --help`, etc.
|
|
110
|
-
|
|
111
|
-
---
|
|
112
|
-
|
|
113
|
-
## Pre-commit Hook
|
|
114
|
-
|
|
115
|
-
DockerBrain can run as a [pre-commit](https://pre-commit.com/) hook to lint Dockerfiles on every commit:
|
|
116
|
-
|
|
117
|
-
```yaml
|
|
118
|
-
# .pre-commit-config.yaml
|
|
119
|
-
repos:
|
|
120
|
-
- repo: https://github.com/iamPulakesh/DockerBrain
|
|
121
|
-
rev: v1.0
|
|
122
|
-
hooks:
|
|
123
|
-
- id: dockerbrain-fix
|
|
124
|
-
```
|
|
125
|
-
|
|
126
|
-
---
|
|
127
|
-
|
|
128
|
-
## Development
|
|
129
|
-
|
|
130
|
-
```bash
|
|
131
|
-
git clone https://github.com/iamPulakesh/DockerBrain.git
|
|
132
|
-
cd DockerBrain
|
|
133
|
-
pip install -e ".[dev]"
|
|
134
|
-
|
|
135
|
-
make test
|
|
136
|
-
make lint
|
|
137
|
-
make clean
|
|
138
|
-
```
|
|
139
|
-
|
|
140
|
-
---
|
|
141
|
-
|
|
142
|
-
See [Changelog.md](Changelog.md) for the full release history.
|
|
143
|
-
|
|
144
|
-
---
|
|
145
|
-
|
|
146
|
-
## Contributing
|
|
147
|
-
|
|
148
|
-
1. Fork the repository
|
|
149
|
-
2. Contribute
|
|
150
|
-
3. Open a Pull Request
|
|
151
|
-
|
|
152
|
-
---
|
|
153
|
-
|
|
154
|
-
## License
|
|
155
|
-
|
|
156
|
-
Apache-2.0 — see [LICENSE](LICENSE) for details.
|