You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+49-17Lines changed: 49 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,4 @@
1
+
1
2
# CLI Monitor 🖥️
2
3
3
4
> **CLI Monitor** is a *cross-platform* Python tool that repeatedly runs a command, captures its output, optionally logs it, and can even trigger a secondary command whenever a regex pattern is matched.
@@ -7,13 +8,14 @@
7
8
**Unittests status for Win/Lin/Mac environments:**[](https://github.com/Dimos082/cli-monitor/actions/workflows/test.yml)
8
9
9
10
<details>
10
-
<summary>📖 Table of Contents</summary>
11
+
<summary>📖 Table of Contents (expandable)</summary>
11
12
12
13
-[Overview](#overview)
13
14
-[Features](#features)
14
15
-[Quick Start](#quick-start)
15
16
-[Example Commands](#example-commands)
16
17
-[Arguments Overview](#arguments-overview)
18
+
-[Automated Version Bumping, Testing and Release](#bumping)
17
19
-[Contributing](#contributing)
18
20
-[License](#license)
19
21
</details>
@@ -33,13 +35,17 @@ CLI Monitor is designed to help automate command execution, log outputs, and mon
Keeps logs within 50 KB by trimming older entries.
92
+
Keeps logs within 5 KB by trimming older entries.
87
93
88
94
### Detecting Errors in Logs
89
95
@@ -112,15 +118,44 @@ Runs for 10 seconds, searching for "error" or "fail" and executing an alert comm
112
118
113
119
[🔼 Back to top](#cli-monitor-️)
114
120
121
+
## 🔄 Automated Version Bumping, Testing and Release <aid="bumping"></a>
122
+
123
+
**GitHub Actions will:**
124
+
-[Run tests in several environments](https://github.com/Dimos082/cli-monitor/blob/main/.github/workflows/test.yml)
125
+
- Bump version in cli_monitor.py
126
+
- Create a [GitHub Release](https://github.com/Dimos082/cli-monitor/releases)
127
+
- Attach cli_monitor.py for download
128
+
129
+
[GitHub Actions](https://github.com/Dimos082/cli-monitor/tree/main/.github/workflows) automatically bumps versions when commit messages include specific keywords:
130
+
- Patch (X.Y.Z+1********) → PATCH: Fixed issue
131
+
- Minor (X.Y+1.0********) → MINOR: Added logging
132
+
- Major (X+1.0.0********) → MAJOR: Breaking change
133
+
134
+
**Triggering a Release:**
135
+
To increment a patch number `1.0.1+`:
136
+
```bash
137
+
git commit -m "PATCH: Fixed issue in regex matching"
138
+
git push origin main
139
+
```
140
+
To increment major number `1+.0.0`, commit a major change:
141
+
```bash
142
+
git commit -m "MAJOR: Refactored CLI to use POSIX structure"
143
+
git push origin main
144
+
```
145
+
146
+
[🔼 Back to top](#cli-monitor-️)
147
+
115
148
## 🛠️ Contributing <aid="contributing"></a>
116
149
150
+
If you find a bug or have a feature request, check out [open issues](https://github.com/Dimos082/cli-monitor/issues) or create a new one. Your feedback is valuable!
151
+
117
152
I welcome contributions to make CLI Monitor even better! If you have an idea for an improvement or new [test cases](https://github.com/Dimos082/cli-monitor/tree/main/tests), feel free to:
118
153
119
154
-**Fork the repository**
120
155
-**Create a new feature branch**:
121
156
`git checkout -b feature/NewFeature`
122
-
-**Make your changes and commit**:
123
-
`git commit -m "Added NewFeature"`
157
+
-**Make your changes and commit with the version number incrementation**:
158
+
`git commit -m "MINOR: Added feature XYZ"`
124
159
-**Push your changes**: `git push origin feature/NewFeature`
125
160
-**Open a pull request** 🐈⬛
126
161
@@ -131,13 +166,10 @@ The controller (subject) runs commands, logs output, and notifies other modules
131
166
This structure makes the code more maintainable and extensible.
132
167
To add a new “observer” (e.g., a custom notification module), simply attach it to the flow in the controller without modifying existing logic significantly.
133
168
134
-
If you find a bug or have a feature request, check out [open issues](https://github.com/Dimos082/cli-monitor/issues) or create a new one. Your feedback is valuable!
135
-
136
-
If you find [cli_monitor.py](https://raw.githubusercontent.com/Dimos082/cli-monitor/refs/heads/main/cli_monitor.py) useful, consider giving it a ⭐ on GitHub!
137
-
138
-
139
169
## 📜 License <aid="license"></a>
140
170
141
171
This project is licensed under the Apache 2.0 - see the [LICENSE](https://github.com/Dimos082/cli-monitor?tab=Apache-2.0-1-ov-file) file for details.
142
172
143
-
[🔼 Back to top](#cli-monitor-️)
173
+
If you find [cli_monitor.py](https://raw.githubusercontent.com/Dimos082/cli-monitor/refs/heads/main/cli_monitor.py) useful, consider giving it a ⭐ on GitHub!
0 commit comments