dockerbrain 1.1.0__tar.gz → 1.2.1__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.
Files changed (44) hide show
  1. {dockerbrain-1.1.0/dockerbrain.egg-info → dockerbrain-1.2.1}/PKG-INFO +3 -2
  2. {dockerbrain-1.1.0 → dockerbrain-1.2.1}/PYPI_README.md +1 -1
  3. {dockerbrain-1.1.0 → dockerbrain-1.2.1}/README.md +138 -129
  4. dockerbrain-1.2.1/core/__init__.py +1 -0
  5. {dockerbrain-1.1.0 → dockerbrain-1.2.1}/core/cli.py +510 -397
  6. {dockerbrain-1.1.0 → dockerbrain-1.2.1}/core/llm.py +259 -212
  7. {dockerbrain-1.1.0 → dockerbrain-1.2.1}/core/monitor/display.py +629 -501
  8. dockerbrain-1.2.1/core/monitor/log_analyzer.py +107 -0
  9. dockerbrain-1.2.1/core/utils.py +91 -0
  10. {dockerbrain-1.1.0 → dockerbrain-1.2.1/dockerbrain.egg-info}/PKG-INFO +3 -2
  11. {dockerbrain-1.1.0 → dockerbrain-1.2.1}/dockerbrain.egg-info/SOURCES.txt +1 -0
  12. {dockerbrain-1.1.0 → dockerbrain-1.2.1}/dockerbrain.egg-info/requires.txt +1 -0
  13. {dockerbrain-1.1.0 → dockerbrain-1.2.1}/pyproject.toml +58 -57
  14. dockerbrain-1.2.1/tests/test_llm.py +181 -0
  15. dockerbrain-1.1.0/core/__init__.py +0 -1
  16. dockerbrain-1.1.0/core/utils.py +0 -38
  17. dockerbrain-1.1.0/tests/test_llm.py +0 -164
  18. {dockerbrain-1.1.0 → dockerbrain-1.2.1}/LICENSE +0 -0
  19. {dockerbrain-1.1.0 → dockerbrain-1.2.1}/core/__main__.py +0 -0
  20. {dockerbrain-1.1.0 → dockerbrain-1.2.1}/core/ai_advisor.py +0 -0
  21. {dockerbrain-1.1.0 → dockerbrain-1.2.1}/core/dockerizer.py +0 -0
  22. {dockerbrain-1.1.0 → dockerbrain-1.2.1}/core/fixer/__init__.py +0 -0
  23. {dockerbrain-1.1.0 → dockerbrain-1.2.1}/core/fixer/container.py +0 -0
  24. {dockerbrain-1.1.0 → dockerbrain-1.2.1}/core/fixer/dockerfile.py +0 -0
  25. {dockerbrain-1.1.0 → dockerbrain-1.2.1}/core/monitor/__init__.py +0 -0
  26. {dockerbrain-1.1.0 → dockerbrain-1.2.1}/core/monitor/collector.py +0 -0
  27. {dockerbrain-1.1.0 → dockerbrain-1.2.1}/core/monitor/snapshot.py +0 -0
  28. {dockerbrain-1.1.0 → dockerbrain-1.2.1}/core/optimizer/__init__.py +0 -0
  29. {dockerbrain-1.1.0 → dockerbrain-1.2.1}/core/optimizer/engine.py +0 -0
  30. {dockerbrain-1.1.0 → dockerbrain-1.2.1}/core/optimizer/rules.py +0 -0
  31. {dockerbrain-1.1.0 → dockerbrain-1.2.1}/core/storage.py +0 -0
  32. {dockerbrain-1.1.0 → dockerbrain-1.2.1}/core/templates.py +0 -0
  33. {dockerbrain-1.1.0 → dockerbrain-1.2.1}/dockerbrain.egg-info/dependency_links.txt +0 -0
  34. {dockerbrain-1.1.0 → dockerbrain-1.2.1}/dockerbrain.egg-info/entry_points.txt +0 -0
  35. {dockerbrain-1.1.0 → dockerbrain-1.2.1}/dockerbrain.egg-info/top_level.txt +0 -0
  36. {dockerbrain-1.1.0 → dockerbrain-1.2.1}/setup.cfg +0 -0
  37. {dockerbrain-1.1.0 → dockerbrain-1.2.1}/tests/test_ai_advisor.py +0 -0
  38. {dockerbrain-1.1.0 → dockerbrain-1.2.1}/tests/test_dockerizer.py +0 -0
  39. {dockerbrain-1.1.0 → dockerbrain-1.2.1}/tests/test_fixer.py +0 -0
  40. {dockerbrain-1.1.0 → dockerbrain-1.2.1}/tests/test_monitor.py +0 -0
  41. {dockerbrain-1.1.0 → dockerbrain-1.2.1}/tests/test_optimizer.py +0 -0
  42. {dockerbrain-1.1.0 → dockerbrain-1.2.1}/tests/test_storage.py +0 -0
  43. {dockerbrain-1.1.0 → dockerbrain-1.2.1}/tests/test_templates.py +0 -0
  44. {dockerbrain-1.1.0 → dockerbrain-1.2.1}/tests/test_utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dockerbrain
3
- Version: 1.1.0
3
+ Version: 1.2.1
4
4
  Summary: Dockerfile and container monitoring, analysis, and optimization CLI.
5
5
  License: Apache-2.0
6
6
  Project-URL: Homepage, https://github.com/iamPulakesh/DockerBrain
@@ -24,6 +24,7 @@ Classifier: Topic :: System :: Systems Administration
24
24
  Requires-Python: >=3.10
25
25
  Description-Content-Type: text/markdown
26
26
  License-File: LICENSE
27
+ Requires-Dist: anthropic>=0.30
27
28
  Requires-Dist: click>=8.0
28
29
  Requires-Dist: docker>=6.0
29
30
  Requires-Dist: google-genai>=1.0
@@ -37,7 +38,7 @@ Dynamic: license-file
37
38
 
38
39
  # Project Info
39
40
 
40
- [![pipeline](https://github.com/iamPulakesh/DockerBrain/actions/workflows/dockerbrain.yml/badge.svg)](https://github.com/iamPulakesh/DockerBrain/actions/workflows/dockerbrain.yml) [![github project](https://img.shields.io/badge/github-project-blue.svg?logo=github)](https://github.com/iamPulakesh/DockerBrain)
41
+ [![pipeline](https://github.com/iamPulakesh/DockerBrain/actions/workflows/dockerbrain.yml/badge.svg)](https://github.com/iamPulakesh/DockerBrain/actions/workflows/dockerbrain.yml) [![github project](https://img.shields.io/badge/github-project-blue.svg?logo=github)](https://github.com/iamPulakesh/DockerBrain) [![PyPI Downloads](https://static.pepy.tech/personalized-badge/dockerbrain?period=total&units=INTERNATIONAL_SYSTEM&left_color=GRAY&right_color=RED&left_text=Downloads)](https://pepy.tech/projects/dockerbrain)
41
42
 
42
43
  ## Core components of DockerBrain
43
44
 
@@ -1,6 +1,6 @@
1
1
  # Project Info
2
2
 
3
- [![pipeline](https://github.com/iamPulakesh/DockerBrain/actions/workflows/dockerbrain.yml/badge.svg)](https://github.com/iamPulakesh/DockerBrain/actions/workflows/dockerbrain.yml) [![github project](https://img.shields.io/badge/github-project-blue.svg?logo=github)](https://github.com/iamPulakesh/DockerBrain)
3
+ [![pipeline](https://github.com/iamPulakesh/DockerBrain/actions/workflows/dockerbrain.yml/badge.svg)](https://github.com/iamPulakesh/DockerBrain/actions/workflows/dockerbrain.yml) [![github project](https://img.shields.io/badge/github-project-blue.svg?logo=github)](https://github.com/iamPulakesh/DockerBrain) [![PyPI Downloads](https://static.pepy.tech/personalized-badge/dockerbrain?period=total&units=INTERNATIONAL_SYSTEM&left_color=GRAY&right_color=RED&left_text=Downloads)](https://pepy.tech/projects/dockerbrain)
4
4
 
5
5
  ## Core components of DockerBrain
6
6
 
@@ -1,129 +1,138 @@
1
- # DockerBrain
2
-
3
- **AI-powered Docker container monitoring, optimization, and Dockerfile generation CLI.**
4
-
5
- [![Python 3.10+](https://img.shields.io/badge/python-3.10%2B-blue.svg)](https://www.python.org/downloads/)
6
- [![License: Apache 2.0](https://img.shields.io/badge/License-Apache_2.0-green.svg)](LICENSE)
7
- [![PyPI](https://img.shields.io/pypi/v/dockerbrain)](https://pypi.org/project/dockerbrain/)
8
-
9
- 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.
10
-
11
- ---
12
-
13
- ## Features
14
-
15
- | Feature | Command | LLM Required |
16
- |---|---|:---:|
17
- | Real-time container monitoring | `dockerb monitor` | No |
18
- | AI optimization suggestions | `dockerb suggest` | Yes |
19
- | Auto-fix containers & Dockerfiles | `dockerb fix` | Yes |
20
- | AI Dockerfile generation from project | `dockerb dockerize` | Yes |
21
- | Curated Dockerfile templates | `dockerb template` | No |
22
- | Environment & config diagnostics | `dockerb env` | No |
23
-
24
- ---
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
-
39
- ## Installation
40
-
41
- **Requirements:** Python 3.10+ and a running Docker daemon.
42
-
43
- **Recommended**:
44
-
45
- ```bash
46
- uv tool install dockerbrain
47
- ```
48
-
49
- **Or with pip:**
50
-
51
- ```bash
52
- pip install dockerbrain
53
- ```
54
-
55
- Verify:
56
-
57
- ```bash
58
- dockerb --version
59
- ```
60
-
61
- ### Configure an LLM Provider
62
-
63
- ```bash
64
- dockerb init
65
- ```
66
-
67
- This creates `.dockerbrainrc` in `~/.dockerbrain/`. Open it with `dockerb config` and set your key:
68
-
69
- ```ini
70
- [llm]
71
- provider = "groq"
72
- model = "openai/gpt-oss-120b"
73
- api_key = "your_key_here"
74
- ```
75
-
76
- | Provider | API Key | Link |
77
- |---|:---:|---|
78
- | Gemini | Required | [aistudio.google.com](https://aistudio.google.com/app/apikey) |
79
- | Groq | Required | [console.groq.com/keys](https://console.groq.com/keys) |
80
- | Ollama | Not Required | [ollama.com](https://ollama.com) |
81
-
82
- > `monitor`, `template`, and `env` commands work without an API key.
83
-
84
- ---
85
-
86
- ## Pre-commit Hook
87
-
88
- DockerBrain can run as a [pre-commit](https://pre-commit.com/) hook to lint Dockerfiles on every commit:
89
-
90
- ```yaml
91
- # .pre-commit-config.yaml
92
- repos:
93
- - repo: https://github.com/iamPulakesh/DockerBrain
94
- rev: v1.0
95
- hooks:
96
- - id: dockerbrain-fix
97
- ```
98
-
99
- ---
100
-
101
- ## Development
102
-
103
- ```bash
104
- git clone https://github.com/iamPulakesh/DockerBrain.git
105
- cd DockerBrain
106
- pip install -e ".[dev]"
107
-
108
- make test
109
- make lint
110
- make clean
111
- ```
112
-
113
- ---
114
-
115
- See [Changelog.md](Changelog.md) for the full release history.
116
-
117
- ---
118
-
119
- ## Contributing
120
-
121
- 1. Fork the repository
122
- 2. Contribute
123
- 3. Open a Pull Request
124
-
125
- ---
126
-
127
- ## License
128
-
129
- Apache-2.0 — see [LICENSE](LICENSE) for details.
1
+ <div align="center">
2
+
3
+ # DockerBrain
4
+
5
+ **An intelligent terminal dashboard for Docker monitoring, automated debugging, and optimization.**
6
+
7
+ [![PyPI Downloads](https://static.pepy.tech/personalized-badge/dockerbrain?period=total&units=INTERNATIONAL_SYSTEM&left_color=GRAY&right_color=RED&left_text=PyPI+downloads)](https://pepy.tech/projects/dockerbrain)
8
+ [![Python 3.10+](https://img.shields.io/badge/python-3.10%2B-blue.svg)](https://www.python.org/downloads/)
9
+ [![License: Apache 2.0](https://img.shields.io/badge/License-Apache_2.0-green.svg)](LICENSE)
10
+ [![PyPI](https://img.shields.io/pypi/v/dockerbrain)](https://pypi.org/project/dockerbrain/)
11
+
12
+ <p align="center">
13
+ DockerBrain monitors your Docker containers in real time, detects resource issues, and uses LLMs to generate actionable optimizations for running containers and Dockerfiles.
14
+ </p>
15
+
16
+ ---
17
+
18
+ </div>
19
+
20
+ ## Features
21
+
22
+ | Feature | Command | LLM Required |
23
+ |---|---|:---:|
24
+ | Real-time container monitoring | `dockerb monitor` | No |
25
+ | AI optimization suggestions | `dockerb suggest` | Yes |
26
+ | Auto-fix containers & Dockerfiles | `dockerb fix` | Yes |
27
+ | AI Dockerfile generation from project | `dockerb dockerize` | Yes |
28
+ | Curated Dockerfile templates | `dockerb template` | No |
29
+ | Environment & config diagnostics | `dockerb env` | No |
30
+
31
+ ---
32
+
33
+ ## Usage
34
+
35
+ DockerBrain exposes all functionality through the `dockerb` CLI. Run the following to see all available commands and options:
36
+
37
+ ```bash
38
+ dockerb --help
39
+ ```
40
+
41
+ Each command also has its own help page, for example `dockerb suggest --help`, `dockerb fix --help`, etc.
42
+
43
+ ---
44
+
45
+
46
+ ## Installation
47
+
48
+ **Requirements:** Python 3.10+ and a running Docker daemon.
49
+
50
+ **Recommended**:
51
+
52
+ ```bash
53
+ uv tool install dockerbrain
54
+ ```
55
+
56
+ **Or with pip:**
57
+
58
+ ```bash
59
+ pip install dockerbrain
60
+ ```
61
+
62
+ Verify:
63
+
64
+ ```bash
65
+ dockerb --version
66
+ ```
67
+
68
+ ### Configure an LLM Provider
69
+
70
+ ```bash
71
+ dockerb init
72
+ ```
73
+
74
+ This creates `.dockerbrainrc` in `~/.dockerbrain/`. Open it with `dockerb config` and set your key:
75
+
76
+ ```ini
77
+ [llm]
78
+ provider = "choose_provider"
79
+ model = "choose_model"
80
+ api_key = "your_key_here"
81
+ ```
82
+
83
+ | Provider | API Key | Link |
84
+ |---|:---:|---|
85
+ | Gemini | Required | [aistudio.google.com](https://aistudio.google.com/app/apikey) |
86
+ | ChatGPT | Required | [platform.openai.com](https://platform.openai.com/api-keys) |
87
+ | Claude | Required | [console.anthropic.com](https://console.anthropic.com/settings/keys) |
88
+ | Groq | Required | [console.groq.com/keys](https://console.groq.com/keys) |
89
+ | Ollama | Not Required | [ollama.com](https://ollama.com) |
90
+
91
+ > `monitor`, `template`, and `env` commands work without an API key.
92
+
93
+ ---
94
+
95
+ ## Pre-commit Hook
96
+
97
+ DockerBrain can run as a [pre-commit](https://pre-commit.com/) hook to lint Dockerfiles on every commit:
98
+
99
+ ```yaml
100
+ # .pre-commit-config.yaml
101
+ repos:
102
+ - repo: https://github.com/iamPulakesh/DockerBrain
103
+ rev: v1.0
104
+ hooks:
105
+ - id: dockerbrain-fix
106
+ ```
107
+
108
+ ---
109
+
110
+ ## Development
111
+
112
+ ```bash
113
+ git clone https://github.com/iamPulakesh/DockerBrain.git
114
+ cd DockerBrain
115
+ pip install -e ".[dev]"
116
+
117
+ make test
118
+ make lint
119
+ make clean
120
+ ```
121
+
122
+ ---
123
+
124
+ See [Changelog.md](Changelog.md) for the full release history.
125
+
126
+ ---
127
+
128
+ ## Contributing
129
+
130
+ 1. Fork the repository
131
+ 2. Contribute
132
+ 3. Open a Pull Request
133
+
134
+ ---
135
+
136
+ ## License
137
+
138
+ Apache-2.0 — see [LICENSE](LICENSE) for details.
@@ -0,0 +1 @@
1
+ __version__ = "1.2.1"