dockerbrain 1.2.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.
- {dockerbrain-1.2.0/dockerbrain.egg-info → dockerbrain-1.2.1}/PKG-INFO +1 -1
- {dockerbrain-1.2.0 → dockerbrain-1.2.1}/README.md +138 -138
- dockerbrain-1.2.1/core/__init__.py +1 -0
- {dockerbrain-1.2.0 → dockerbrain-1.2.1}/core/cli.py +510 -481
- {dockerbrain-1.2.0 → dockerbrain-1.2.1}/core/llm.py +259 -259
- {dockerbrain-1.2.0 → dockerbrain-1.2.1}/core/monitor/log_analyzer.py +107 -107
- dockerbrain-1.2.1/core/utils.py +91 -0
- {dockerbrain-1.2.0 → dockerbrain-1.2.1/dockerbrain.egg-info}/PKG-INFO +1 -1
- {dockerbrain-1.2.0 → dockerbrain-1.2.1}/pyproject.toml +58 -58
- {dockerbrain-1.2.0 → dockerbrain-1.2.1}/tests/test_llm.py +181 -181
- dockerbrain-1.2.0/core/__init__.py +0 -1
- dockerbrain-1.2.0/core/utils.py +0 -38
- {dockerbrain-1.2.0 → dockerbrain-1.2.1}/LICENSE +0 -0
- {dockerbrain-1.2.0 → dockerbrain-1.2.1}/PYPI_README.md +0 -0
- {dockerbrain-1.2.0 → dockerbrain-1.2.1}/core/__main__.py +0 -0
- {dockerbrain-1.2.0 → dockerbrain-1.2.1}/core/ai_advisor.py +0 -0
- {dockerbrain-1.2.0 → dockerbrain-1.2.1}/core/dockerizer.py +0 -0
- {dockerbrain-1.2.0 → dockerbrain-1.2.1}/core/fixer/__init__.py +0 -0
- {dockerbrain-1.2.0 → dockerbrain-1.2.1}/core/fixer/container.py +0 -0
- {dockerbrain-1.2.0 → dockerbrain-1.2.1}/core/fixer/dockerfile.py +0 -0
- {dockerbrain-1.2.0 → dockerbrain-1.2.1}/core/monitor/__init__.py +0 -0
- {dockerbrain-1.2.0 → dockerbrain-1.2.1}/core/monitor/collector.py +0 -0
- {dockerbrain-1.2.0 → dockerbrain-1.2.1}/core/monitor/display.py +0 -0
- {dockerbrain-1.2.0 → dockerbrain-1.2.1}/core/monitor/snapshot.py +0 -0
- {dockerbrain-1.2.0 → dockerbrain-1.2.1}/core/optimizer/__init__.py +0 -0
- {dockerbrain-1.2.0 → dockerbrain-1.2.1}/core/optimizer/engine.py +0 -0
- {dockerbrain-1.2.0 → dockerbrain-1.2.1}/core/optimizer/rules.py +0 -0
- {dockerbrain-1.2.0 → dockerbrain-1.2.1}/core/storage.py +0 -0
- {dockerbrain-1.2.0 → dockerbrain-1.2.1}/core/templates.py +0 -0
- {dockerbrain-1.2.0 → dockerbrain-1.2.1}/dockerbrain.egg-info/SOURCES.txt +0 -0
- {dockerbrain-1.2.0 → dockerbrain-1.2.1}/dockerbrain.egg-info/dependency_links.txt +0 -0
- {dockerbrain-1.2.0 → dockerbrain-1.2.1}/dockerbrain.egg-info/entry_points.txt +0 -0
- {dockerbrain-1.2.0 → dockerbrain-1.2.1}/dockerbrain.egg-info/requires.txt +0 -0
- {dockerbrain-1.2.0 → dockerbrain-1.2.1}/dockerbrain.egg-info/top_level.txt +0 -0
- {dockerbrain-1.2.0 → dockerbrain-1.2.1}/setup.cfg +0 -0
- {dockerbrain-1.2.0 → dockerbrain-1.2.1}/tests/test_ai_advisor.py +0 -0
- {dockerbrain-1.2.0 → dockerbrain-1.2.1}/tests/test_dockerizer.py +0 -0
- {dockerbrain-1.2.0 → dockerbrain-1.2.1}/tests/test_fixer.py +0 -0
- {dockerbrain-1.2.0 → dockerbrain-1.2.1}/tests/test_monitor.py +0 -0
- {dockerbrain-1.2.0 → dockerbrain-1.2.1}/tests/test_optimizer.py +0 -0
- {dockerbrain-1.2.0 → dockerbrain-1.2.1}/tests/test_storage.py +0 -0
- {dockerbrain-1.2.0 → dockerbrain-1.2.1}/tests/test_templates.py +0 -0
- {dockerbrain-1.2.0 → dockerbrain-1.2.1}/tests/test_utils.py +0 -0
|
@@ -1,138 +1,138 @@
|
|
|
1
|
-
<div align="center">
|
|
2
|
-
|
|
3
|
-
# DockerBrain
|
|
4
|
-
|
|
5
|
-
**
|
|
6
|
-
|
|
7
|
-
[](https://pepy.tech/projects/dockerbrain)
|
|
8
|
-
[](https://www.python.org/downloads/)
|
|
9
|
-
[](LICENSE)
|
|
10
|
-
[](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.
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
3
|
+
# DockerBrain
|
|
4
|
+
|
|
5
|
+
**An intelligent terminal dashboard for Docker monitoring, automated debugging, and optimization.**
|
|
6
|
+
|
|
7
|
+
[](https://pepy.tech/projects/dockerbrain)
|
|
8
|
+
[](https://www.python.org/downloads/)
|
|
9
|
+
[](LICENSE)
|
|
10
|
+
[](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"
|