mcli-framework 7.8.0__py3-none-any.whl → 7.8.2__py3-none-any.whl
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.
Potentially problematic release.
This version of mcli-framework might be problematic. Click here for more details.
- mcli/__init__.py +160 -0
- mcli/__main__.py +14 -0
- mcli/app/__init__.py +23 -0
- mcli/app/model/__init__.py +0 -0
- mcli/app/video/__init__.py +5 -0
- mcli/chat/__init__.py +34 -0
- mcli/lib/__init__.py +0 -0
- mcli/lib/api/__init__.py +0 -0
- mcli/lib/auth/__init__.py +1 -0
- mcli/lib/config/__init__.py +1 -0
- mcli/lib/erd/__init__.py +25 -0
- mcli/lib/files/__init__.py +0 -0
- mcli/lib/fs/__init__.py +1 -0
- mcli/lib/logger/__init__.py +3 -0
- mcli/lib/performance/__init__.py +17 -0
- mcli/lib/pickles/__init__.py +1 -0
- mcli/lib/shell/__init__.py +0 -0
- mcli/lib/toml/__init__.py +1 -0
- mcli/lib/watcher/__init__.py +0 -0
- mcli/ml/__init__.py +16 -0
- mcli/ml/api/__init__.py +30 -0
- mcli/ml/api/routers/__init__.py +27 -0
- mcli/ml/auth/__init__.py +41 -0
- mcli/ml/backtesting/__init__.py +33 -0
- mcli/ml/cli/__init__.py +5 -0
- mcli/ml/config/__init__.py +33 -0
- mcli/ml/configs/__init__.py +16 -0
- mcli/ml/dashboard/__init__.py +12 -0
- mcli/ml/dashboard/components/__init__.py +7 -0
- mcli/ml/dashboard/pages/__init__.py +6 -0
- mcli/ml/data_ingestion/__init__.py +29 -0
- mcli/ml/database/__init__.py +40 -0
- mcli/ml/experimentation/__init__.py +29 -0
- mcli/ml/features/__init__.py +39 -0
- mcli/ml/mlops/__init__.py +19 -0
- mcli/ml/models/__init__.py +90 -0
- mcli/ml/monitoring/__init__.py +25 -0
- mcli/ml/optimization/__init__.py +27 -0
- mcli/ml/predictions/__init__.py +5 -0
- mcli/ml/preprocessing/__init__.py +24 -0
- mcli/ml/scripts/__init__.py +1 -0
- mcli/ml/trading/__init__.py +63 -0
- mcli/ml/training/__init__.py +7 -0
- mcli/mygroup/__init__.py +3 -0
- mcli/public/__init__.py +1 -0
- mcli/public/commands/__init__.py +2 -0
- mcli/self/__init__.py +3 -0
- mcli/test/__init__.py +1 -0
- mcli/workflow/__init__.py +0 -0
- mcli/workflow/daemon/__init__.py +15 -0
- mcli/workflow/dashboard/__init__.py +5 -0
- mcli/workflow/docker/__init__.py +0 -0
- mcli/workflow/file/__init__.py +0 -0
- mcli/workflow/gcloud/__init__.py +1 -0
- mcli/workflow/git_commit/__init__.py +0 -0
- mcli/workflow/interview/__init__.py +0 -0
- mcli/workflow/politician_trading/__init__.py +4 -0
- mcli/workflow/registry/__init__.py +0 -0
- mcli/workflow/repo/__init__.py +0 -0
- mcli/workflow/scheduler/__init__.py +25 -0
- mcli/workflow/search/__init__.py +0 -0
- mcli/workflow/sync/__init__.py +5 -0
- mcli/workflow/videos/__init__.py +1 -0
- mcli/workflow/wakatime/__init__.py +80 -0
- mcli_framework-7.8.2.dist-info/METADATA +615 -0
- {mcli_framework-7.8.0.dist-info → mcli_framework-7.8.2.dist-info}/RECORD +70 -6
- mcli_framework-7.8.0.dist-info/METADATA +0 -491
- {mcli_framework-7.8.0.dist-info → mcli_framework-7.8.2.dist-info}/WHEEL +0 -0
- {mcli_framework-7.8.0.dist-info → mcli_framework-7.8.2.dist-info}/entry_points.txt +0 -0
- {mcli_framework-7.8.0.dist-info → mcli_framework-7.8.2.dist-info}/licenses/LICENSE +0 -0
- {mcli_framework-7.8.0.dist-info → mcli_framework-7.8.2.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,615 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: mcli-framework
|
|
3
|
+
Version: 7.8.2
|
|
4
|
+
Summary: Portable workflow framework - transform any script into a versioned, schedulable command. Store in ~/.mcli/commands/, version with lockfile, run as daemon or cron job.
|
|
5
|
+
Author-email: Luis Fernandez de la Vara <luis@lefv.io>
|
|
6
|
+
Maintainer-email: Luis Fernandez de la Vara <luis@lefv.io>
|
|
7
|
+
License: MIT
|
|
8
|
+
Project-URL: Homepage, https://github.com/gwicho38/mcli
|
|
9
|
+
Project-URL: Repository, https://github.com/gwicho38/mcli
|
|
10
|
+
Project-URL: Documentation, https://github.com/gwicho38/mcli#readme
|
|
11
|
+
Project-URL: Issues, https://github.com/gwicho38/mcli/issues
|
|
12
|
+
Project-URL: Changelog, https://github.com/gwicho38/mcli/releases
|
|
13
|
+
Project-URL: Source, https://github.com/gwicho38/mcli
|
|
14
|
+
Keywords: cli,command-line,framework,chat,assistant,rust,performance,visual,tui,terminal,ai,openai,anthropic,productivity
|
|
15
|
+
Classifier: Development Status :: 4 - Beta
|
|
16
|
+
Classifier: Environment :: Console
|
|
17
|
+
Classifier: Intended Audience :: Developers
|
|
18
|
+
Classifier: Intended Audience :: System Administrators
|
|
19
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
20
|
+
Classifier: Operating System :: OS Independent
|
|
21
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
22
|
+
Classifier: Operating System :: MacOS
|
|
23
|
+
Classifier: Operating System :: Microsoft :: Windows
|
|
24
|
+
Classifier: Programming Language :: Python :: 3
|
|
25
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
26
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
27
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
28
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
29
|
+
Classifier: Programming Language :: Rust
|
|
30
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
31
|
+
Classifier: Topic :: System :: Shells
|
|
32
|
+
Classifier: Topic :: System :: Systems Administration
|
|
33
|
+
Classifier: Topic :: Terminals
|
|
34
|
+
Classifier: Topic :: Utilities
|
|
35
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
36
|
+
Classifier: Typing :: Typed
|
|
37
|
+
Requires-Python: >=3.9
|
|
38
|
+
Description-Content-Type: text/markdown
|
|
39
|
+
License-File: LICENSE
|
|
40
|
+
Requires-Dist: click<9.0.0,>=8.1.7
|
|
41
|
+
Requires-Dist: rich>=14.0.0
|
|
42
|
+
Requires-Dist: requests<3.0.0,>=2.31.0
|
|
43
|
+
Requires-Dist: tomli>=2.2.1
|
|
44
|
+
Requires-Dist: python-dotenv>=1.1.1
|
|
45
|
+
Requires-Dist: watchdog<4.0.0,>=3.0.0
|
|
46
|
+
Requires-Dist: tqdm<5.0.0,>=4.66.1
|
|
47
|
+
Requires-Dist: humanize<5.0.0,>=4.9.0
|
|
48
|
+
Requires-Dist: psutil<6.0.0,>=5.9.0
|
|
49
|
+
Requires-Dist: inquirerpy<0.4.0,>=0.3.4
|
|
50
|
+
Requires-Dist: gitpython<4.0.0,>=3.1.40
|
|
51
|
+
Requires-Dist: aiohttp>=3.9.0
|
|
52
|
+
Requires-Dist: httpx>=0.28.1
|
|
53
|
+
Requires-Dist: websockets>=12.0
|
|
54
|
+
Requires-Dist: beautifulsoup4>=4.13.5
|
|
55
|
+
Requires-Dist: fuzzywuzzy>=0.18.0
|
|
56
|
+
Requires-Dist: openai<2.0.0,>=1.3.0
|
|
57
|
+
Requires-Dist: anthropic>=0.60.0
|
|
58
|
+
Requires-Dist: ollama>=0.5.3
|
|
59
|
+
Requires-Dist: ipython<9.0.0,>=8.12.0
|
|
60
|
+
Requires-Dist: fastapi>=0.110.0
|
|
61
|
+
Requires-Dist: uvicorn>=0.27.0
|
|
62
|
+
Requires-Dist: uvloop>=0.19.0
|
|
63
|
+
Requires-Dist: aiosqlite>=0.20.0
|
|
64
|
+
Requires-Dist: redis>=5.0.0
|
|
65
|
+
Requires-Dist: aiohttp-sse-client>=0.2.1
|
|
66
|
+
Requires-Dist: aiomqtt>=2.0.0
|
|
67
|
+
Requires-Dist: opencv-python>=4.11.0.86
|
|
68
|
+
Requires-Dist: pillow>=11.2.1
|
|
69
|
+
Requires-Dist: numpy<2.0.0,>=1.24.0
|
|
70
|
+
Requires-Dist: scikit-image>=0.24.0
|
|
71
|
+
Requires-Dist: scipy>=1.10.0
|
|
72
|
+
Requires-Dist: pypdf2>=3.0.1
|
|
73
|
+
Requires-Dist: pymupdf>=1.26.3
|
|
74
|
+
Requires-Dist: pandas>=2.3.1
|
|
75
|
+
Requires-Dist: openpyxl>=3.1.5
|
|
76
|
+
Requires-Dist: matplotlib>=3.9.4
|
|
77
|
+
Requires-Dist: pydot>=4.0.1
|
|
78
|
+
Requires-Dist: graphviz>=0.21
|
|
79
|
+
Requires-Dist: seaborn>=0.13.0
|
|
80
|
+
Requires-Dist: plotly>=5.17.0
|
|
81
|
+
Requires-Dist: supabase>=2.18.1
|
|
82
|
+
Requires-Dist: sqlalchemy>=2.0.0
|
|
83
|
+
Requires-Dist: alembic>=1.12.0
|
|
84
|
+
Requires-Dist: psycopg2-binary>=2.9.7
|
|
85
|
+
Requires-Dist: asyncpg>=0.29.0
|
|
86
|
+
Requires-Dist: torch>=2.0.0
|
|
87
|
+
Requires-Dist: torchvision>=0.15.0
|
|
88
|
+
Requires-Dist: pytorch-lightning>=2.0.0
|
|
89
|
+
Requires-Dist: scikit-learn<2.0.0,>=1.3.0
|
|
90
|
+
Requires-Dist: mlflow>=2.8.0
|
|
91
|
+
Requires-Dist: dvc>=3.0.0
|
|
92
|
+
Requires-Dist: polars>=0.19.0
|
|
93
|
+
Requires-Dist: pyarrow>=14.0.0
|
|
94
|
+
Requires-Dist: yfinance>=0.2.18
|
|
95
|
+
Requires-Dist: alpha-vantage>=2.3.1
|
|
96
|
+
Requires-Dist: alpaca-py==0.42.2
|
|
97
|
+
Requires-Dist: cvxpy>=1.4.0
|
|
98
|
+
Requires-Dist: python-jose[cryptography]>=3.3.0
|
|
99
|
+
Requires-Dist: passlib[bcrypt]>=1.7.4
|
|
100
|
+
Requires-Dist: pydantic-settings>=2.1.0
|
|
101
|
+
Requires-Dist: dynaconf>=3.2.0
|
|
102
|
+
Requires-Dist: pandera>=0.17.0
|
|
103
|
+
Requires-Dist: pendulum>=2.1.2
|
|
104
|
+
Requires-Dist: optuna>=3.4.0
|
|
105
|
+
Requires-Dist: PyPortfolioOpt>=1.5.5
|
|
106
|
+
Requires-Dist: jupyter>=1.0.0
|
|
107
|
+
Requires-Dist: jupyterlab>=4.0.0
|
|
108
|
+
Requires-Dist: ipykernel>=6.27.0
|
|
109
|
+
Requires-Dist: prometheus-client>=0.19.0
|
|
110
|
+
Requires-Dist: structlog>=23.2.0
|
|
111
|
+
Requires-Dist: gunicorn>=21.2.0
|
|
112
|
+
Requires-Dist: newrelic>=9.2.0
|
|
113
|
+
Requires-Dist: datadog>=0.49.0
|
|
114
|
+
Requires-Dist: orjson>=3.9.0
|
|
115
|
+
Requires-Dist: kafka-python>=2.0.2
|
|
116
|
+
Requires-Dist: streamlit>=1.50.0
|
|
117
|
+
Requires-Dist: altair<5.0.0,>=4.2.1
|
|
118
|
+
Requires-Dist: streamlit-autorefresh>=1.0.1
|
|
119
|
+
Requires-Dist: typer>=0.9.0
|
|
120
|
+
Requires-Dist: flask<3.0.0,>=2.3.0
|
|
121
|
+
Provides-Extra: gpu
|
|
122
|
+
Requires-Dist: cupy-cuda12x>=12.3.0; extra == "gpu"
|
|
123
|
+
Requires-Dist: nvidia-ml-py>=12.535.0; extra == "gpu"
|
|
124
|
+
Provides-Extra: chat
|
|
125
|
+
Provides-Extra: async-extras
|
|
126
|
+
Provides-Extra: video
|
|
127
|
+
Provides-Extra: documents
|
|
128
|
+
Provides-Extra: viz
|
|
129
|
+
Provides-Extra: database
|
|
130
|
+
Provides-Extra: ml
|
|
131
|
+
Provides-Extra: monitoring
|
|
132
|
+
Provides-Extra: streaming
|
|
133
|
+
Provides-Extra: dashboard
|
|
134
|
+
Provides-Extra: web
|
|
135
|
+
Provides-Extra: dev
|
|
136
|
+
Requires-Dist: pytest>=8.4.1; extra == "dev"
|
|
137
|
+
Requires-Dist: pytest-cov<5.0.0,>=4.1.0; extra == "dev"
|
|
138
|
+
Requires-Dist: pytest-mock>=3.14.1; extra == "dev"
|
|
139
|
+
Requires-Dist: pytest-asyncio>=1.1.0; extra == "dev"
|
|
140
|
+
Requires-Dist: pytest-benchmark>=4.0.0; extra == "dev"
|
|
141
|
+
Requires-Dist: pytest-timeout>=2.2.0; extra == "dev"
|
|
142
|
+
Requires-Dist: pytest-xdist>=3.5.0; extra == "dev"
|
|
143
|
+
Requires-Dist: hypothesis>=6.92.0; extra == "dev"
|
|
144
|
+
Requires-Dist: faker>=22.0.0; extra == "dev"
|
|
145
|
+
Requires-Dist: responses>=0.24.0; extra == "dev"
|
|
146
|
+
Requires-Dist: freezegun>=1.4.0; extra == "dev"
|
|
147
|
+
Requires-Dist: pytest-html>=4.1.0; extra == "dev"
|
|
148
|
+
Requires-Dist: pytest-json-report>=1.5.0; extra == "dev"
|
|
149
|
+
Requires-Dist: black>=23.0.0; extra == "dev"
|
|
150
|
+
Requires-Dist: isort<6.0.0,>=5.12.0; extra == "dev"
|
|
151
|
+
Requires-Dist: mypy<2.0.0,>=1.7.1; extra == "dev"
|
|
152
|
+
Requires-Dist: ruff>=0.1.0; extra == "dev"
|
|
153
|
+
Requires-Dist: pre-commit>=3.6.0; extra == "dev"
|
|
154
|
+
Requires-Dist: build>=1.2.2.post1; extra == "dev"
|
|
155
|
+
Requires-Dist: maturin>=1.9.3; extra == "dev"
|
|
156
|
+
Requires-Dist: twine>=4.0.0; extra == "dev"
|
|
157
|
+
Provides-Extra: all
|
|
158
|
+
Dynamic: license-file
|
|
159
|
+
|
|
160
|
+
# MCLI - Portable Workflow Framework
|
|
161
|
+
|
|
162
|
+
**Transform any script into a versioned, portable, schedulable workflow command.**
|
|
163
|
+
|
|
164
|
+
MCLI is a modular CLI framework that lets you write scripts once and run them anywhere - as interactive commands, scheduled jobs, or background daemons. Your workflows live in `~/.mcli/commands/`, are versioned via lockfile, and completely decoupled from the engine source code.
|
|
165
|
+
|
|
166
|
+
## 🎯 Core Philosophy
|
|
167
|
+
|
|
168
|
+
Write a script. Store it. Version it. Run it anywhere. Schedule it. Share it.
|
|
169
|
+
|
|
170
|
+
No coupling to the engine. No vendor lock-in. Just portable workflows that work.
|
|
171
|
+
|
|
172
|
+
## ⚡ Quick Start
|
|
173
|
+
|
|
174
|
+
### Installation
|
|
175
|
+
|
|
176
|
+
```bash
|
|
177
|
+
# Install from PyPI
|
|
178
|
+
pip install mcli-framework
|
|
179
|
+
|
|
180
|
+
# Or with UV (recommended)
|
|
181
|
+
uv pip install mcli-framework
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
### Create Your First Workflow
|
|
185
|
+
|
|
186
|
+
#### Method 1: From a Python Script
|
|
187
|
+
|
|
188
|
+
```bash
|
|
189
|
+
# Write your script
|
|
190
|
+
cat > my_task.py << 'EOF'
|
|
191
|
+
import click
|
|
192
|
+
|
|
193
|
+
@click.command()
|
|
194
|
+
@click.option('--message', default='Hello', help='Message to display')
|
|
195
|
+
def app(message):
|
|
196
|
+
"""My custom workflow"""
|
|
197
|
+
click.echo(f"{message} from my workflow!")
|
|
198
|
+
EOF
|
|
199
|
+
|
|
200
|
+
# Import as workflow
|
|
201
|
+
mcli commands import-script my_task.py --name my-task --group workflow
|
|
202
|
+
|
|
203
|
+
# Run it
|
|
204
|
+
mcli workflow my-task --message "Hi"
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
#### Method 2: Interactive Creation
|
|
208
|
+
|
|
209
|
+
```bash
|
|
210
|
+
# Create workflow interactively
|
|
211
|
+
mcli commands add my-task --group workflow
|
|
212
|
+
|
|
213
|
+
# Edit in your $EDITOR, then run
|
|
214
|
+
mcli workflow my-task
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
## 📦 Workflow System Features
|
|
218
|
+
|
|
219
|
+
### 1. **Create Workflows**
|
|
220
|
+
|
|
221
|
+
Multiple ways to create workflows:
|
|
222
|
+
|
|
223
|
+
```bash
|
|
224
|
+
# Import from existing Python script
|
|
225
|
+
mcli commands import-script script.py --name my-workflow --group workflow
|
|
226
|
+
|
|
227
|
+
# Create new workflow interactively
|
|
228
|
+
mcli commands add my-workflow --group workflow --description "Does something useful"
|
|
229
|
+
|
|
230
|
+
# List all workflows
|
|
231
|
+
mcli commands list-custom
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
### 2. **Edit & Manage Workflows**
|
|
235
|
+
|
|
236
|
+
```bash
|
|
237
|
+
# Edit workflow in $EDITOR
|
|
238
|
+
mcli commands edit my-workflow
|
|
239
|
+
|
|
240
|
+
# Show workflow details
|
|
241
|
+
mcli commands info my-workflow
|
|
242
|
+
|
|
243
|
+
# Search workflows
|
|
244
|
+
mcli commands search "pdf"
|
|
245
|
+
|
|
246
|
+
# Remove workflow
|
|
247
|
+
mcli commands remove my-workflow
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
### 3. **Export & Import (Portability)**
|
|
251
|
+
|
|
252
|
+
Share workflows across machines or with your team:
|
|
253
|
+
|
|
254
|
+
```bash
|
|
255
|
+
# Export all workflows to JSON
|
|
256
|
+
mcli commands export my-workflows.json
|
|
257
|
+
|
|
258
|
+
# Import on another machine
|
|
259
|
+
mcli commands import my-workflows.json
|
|
260
|
+
|
|
261
|
+
# Export single workflow to Python script
|
|
262
|
+
mcli commands export-script my-workflow --output my_workflow.py
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
Your workflows are just JSON files in `~/.mcli/commands/`:
|
|
266
|
+
|
|
267
|
+
```bash
|
|
268
|
+
$ ls ~/.mcli/commands/
|
|
269
|
+
pdf-processor.json
|
|
270
|
+
data-sync.json
|
|
271
|
+
git-commit.json
|
|
272
|
+
commands.lock.json # Version lockfile
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
### 4. **Version Control with Lockfile**
|
|
276
|
+
|
|
277
|
+
MCLI automatically maintains a lockfile for reproducibility:
|
|
278
|
+
|
|
279
|
+
```bash
|
|
280
|
+
# Update lockfile with current workflow versions
|
|
281
|
+
mcli commands update-lockfile
|
|
282
|
+
|
|
283
|
+
# Verify workflows match lockfile
|
|
284
|
+
mcli commands verify
|
|
285
|
+
```
|
|
286
|
+
|
|
287
|
+
Example `commands.lock.json`:
|
|
288
|
+
|
|
289
|
+
```json
|
|
290
|
+
{
|
|
291
|
+
"version": "1.0",
|
|
292
|
+
"generated_at": "2025-10-17T10:30:00Z",
|
|
293
|
+
"commands": {
|
|
294
|
+
"pdf-processor": {
|
|
295
|
+
"name": "pdf-processor",
|
|
296
|
+
"description": "Intelligent PDF processor",
|
|
297
|
+
"group": "workflow",
|
|
298
|
+
"version": "1.2",
|
|
299
|
+
"updated_at": "2025-10-15T14:30:00Z"
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
```
|
|
304
|
+
|
|
305
|
+
**Version control your workflows:**
|
|
306
|
+
|
|
307
|
+
```bash
|
|
308
|
+
# Add lockfile to git
|
|
309
|
+
git add ~/.mcli/commands/commands.lock.json ~/.mcli/commands/*.json
|
|
310
|
+
git commit -m "Update workflows"
|
|
311
|
+
|
|
312
|
+
# On another machine
|
|
313
|
+
git pull
|
|
314
|
+
mcli commands verify # Ensures consistency
|
|
315
|
+
```
|
|
316
|
+
|
|
317
|
+
### 5. **Run as Daemon or Scheduled Task**
|
|
318
|
+
|
|
319
|
+
Workflows aren't coupled to the engine - run them however you want:
|
|
320
|
+
|
|
321
|
+
#### As a Daemon:
|
|
322
|
+
|
|
323
|
+
```bash
|
|
324
|
+
# Start workflow as background daemon
|
|
325
|
+
mcli workflow daemon start my-task-daemon --workflow my-task
|
|
326
|
+
|
|
327
|
+
# Check daemon status
|
|
328
|
+
mcli workflow daemon status
|
|
329
|
+
|
|
330
|
+
# Stop daemon
|
|
331
|
+
mcli workflow daemon stop my-task-daemon
|
|
332
|
+
```
|
|
333
|
+
|
|
334
|
+
#### As Scheduled Task:
|
|
335
|
+
|
|
336
|
+
```bash
|
|
337
|
+
# Schedule workflow to run every hour
|
|
338
|
+
mcli workflow scheduler add \
|
|
339
|
+
--name hourly-sync \
|
|
340
|
+
--schedule "0 * * * *" \
|
|
341
|
+
--workflow my-task
|
|
342
|
+
|
|
343
|
+
# List scheduled workflows
|
|
344
|
+
mcli workflow scheduler list
|
|
345
|
+
|
|
346
|
+
# View logs
|
|
347
|
+
mcli workflow scheduler logs hourly-sync
|
|
348
|
+
```
|
|
349
|
+
|
|
350
|
+
## 🎨 Real-World Workflow Examples
|
|
351
|
+
|
|
352
|
+
### Example 1: PDF Processor
|
|
353
|
+
|
|
354
|
+
```bash
|
|
355
|
+
# Create PDF processing workflow
|
|
356
|
+
mcli commands import-script pdf_tool.py --name pdf --group workflow
|
|
357
|
+
|
|
358
|
+
# Use it
|
|
359
|
+
mcli workflow pdf extract ~/Documents/report.pdf
|
|
360
|
+
mcli workflow pdf compress ~/Documents/*.pdf --output compressed/
|
|
361
|
+
mcli workflow pdf split large.pdf --pages 10
|
|
362
|
+
```
|
|
363
|
+
|
|
364
|
+
### Example 2: Data Sync Workflow
|
|
365
|
+
|
|
366
|
+
```bash
|
|
367
|
+
# Create sync workflow
|
|
368
|
+
cat > sync.py << 'EOF'
|
|
369
|
+
import click
|
|
370
|
+
import subprocess
|
|
371
|
+
|
|
372
|
+
@click.group()
|
|
373
|
+
def app():
|
|
374
|
+
"""Multi-cloud sync workflow"""
|
|
375
|
+
pass
|
|
376
|
+
|
|
377
|
+
@app.command()
|
|
378
|
+
@click.argument('source')
|
|
379
|
+
@click.argument('dest')
|
|
380
|
+
def backup(source, dest):
|
|
381
|
+
"""Backup data to cloud"""
|
|
382
|
+
subprocess.run(['rclone', 'sync', source, dest])
|
|
383
|
+
click.echo(f"Synced {source} to {dest}")
|
|
384
|
+
|
|
385
|
+
@app.command()
|
|
386
|
+
def status():
|
|
387
|
+
"""Check sync status"""
|
|
388
|
+
click.echo("Checking sync status...")
|
|
389
|
+
EOF
|
|
390
|
+
|
|
391
|
+
mcli commands import-script sync.py --name sync --group workflow
|
|
392
|
+
|
|
393
|
+
# Run manually
|
|
394
|
+
mcli workflow sync backup ~/data remote:backup
|
|
395
|
+
|
|
396
|
+
# Or schedule it
|
|
397
|
+
mcli workflow scheduler add \
|
|
398
|
+
--name nightly-backup \
|
|
399
|
+
--schedule "0 2 * * *" \
|
|
400
|
+
--workflow "sync backup ~/data remote:backup"
|
|
401
|
+
```
|
|
402
|
+
|
|
403
|
+
### Example 3: Git Commit Helper
|
|
404
|
+
|
|
405
|
+
```bash
|
|
406
|
+
# Already included as built-in workflow
|
|
407
|
+
mcli workflow git-commit
|
|
408
|
+
|
|
409
|
+
# Or create your own variant
|
|
410
|
+
mcli commands export-script git-commit --output my_git_helper.py
|
|
411
|
+
# Edit my_git_helper.py to customize
|
|
412
|
+
mcli commands import-script my_git_helper.py --name my-git --group workflow
|
|
413
|
+
```
|
|
414
|
+
|
|
415
|
+
## 🔧 Workflow Structure
|
|
416
|
+
|
|
417
|
+
Each workflow is a JSON file with this structure:
|
|
418
|
+
|
|
419
|
+
```json
|
|
420
|
+
{
|
|
421
|
+
"name": "my-workflow",
|
|
422
|
+
"group": "workflow",
|
|
423
|
+
"description": "Does something useful",
|
|
424
|
+
"version": "1.0",
|
|
425
|
+
"metadata": {
|
|
426
|
+
"author": "you@example.com",
|
|
427
|
+
"tags": ["utility", "automation"]
|
|
428
|
+
},
|
|
429
|
+
"code": "import click\n\n@click.command()\ndef app():\n click.echo('Hello!')",
|
|
430
|
+
"updated_at": "2025-10-17T10:00:00Z"
|
|
431
|
+
}
|
|
432
|
+
```
|
|
433
|
+
|
|
434
|
+
## 🚀 Built-in Workflows
|
|
435
|
+
|
|
436
|
+
MCLI comes with powerful built-in workflows:
|
|
437
|
+
|
|
438
|
+
```bash
|
|
439
|
+
mcli workflow --help
|
|
440
|
+
```
|
|
441
|
+
|
|
442
|
+
Available workflows:
|
|
443
|
+
- **pdf** - Intelligent PDF processing (extract, compress, split, merge)
|
|
444
|
+
- **clean** - Enhanced Mac system cleaner
|
|
445
|
+
- **emulator** - Android/iOS emulator management
|
|
446
|
+
- **git-commit** - AI-powered commit message generation
|
|
447
|
+
- **scheduler** - Cron-like job scheduling
|
|
448
|
+
- **daemon** - Process management and daemonization
|
|
449
|
+
- **redis** - Redis cache management
|
|
450
|
+
- **videos** - Video processing and overlay removal
|
|
451
|
+
- **sync** - Multi-cloud synchronization
|
|
452
|
+
- **politician-trading** - Financial data collection (specialized)
|
|
453
|
+
|
|
454
|
+
## 💡 Why MCLI?
|
|
455
|
+
|
|
456
|
+
### The Problem
|
|
457
|
+
|
|
458
|
+
You write scripts. They work. Then:
|
|
459
|
+
- ❌ Can't remember where you saved them
|
|
460
|
+
- ❌ Hard to share with team members
|
|
461
|
+
- ❌ No version control or change tracking
|
|
462
|
+
- ❌ Coupling to specific runners or frameworks
|
|
463
|
+
- ❌ No easy way to schedule or daemonize
|
|
464
|
+
|
|
465
|
+
### The MCLI Solution
|
|
466
|
+
|
|
467
|
+
- ✅ **Centralized Storage**: All workflows in `~/.mcli/commands/`
|
|
468
|
+
- ✅ **Portable**: Export/import as JSON, share anywhere
|
|
469
|
+
- ✅ **Versioned**: Lockfile for reproducibility
|
|
470
|
+
- ✅ **Decoupled**: Zero coupling to engine source code
|
|
471
|
+
- ✅ **Flexible Execution**: Run interactively, scheduled, or as daemon
|
|
472
|
+
- ✅ **Discoverable**: Tab completion, search, info commands
|
|
473
|
+
|
|
474
|
+
## 📚 Advanced Features
|
|
475
|
+
|
|
476
|
+
### Shell Completion
|
|
477
|
+
|
|
478
|
+
```bash
|
|
479
|
+
# Install completion for your shell
|
|
480
|
+
mcli completion install
|
|
481
|
+
|
|
482
|
+
# Now use tab completion
|
|
483
|
+
mcli workflow <TAB> # Shows all workflows
|
|
484
|
+
mcli workflow pdf <TAB> # Shows pdf subcommands
|
|
485
|
+
```
|
|
486
|
+
|
|
487
|
+
### AI Chat Integration
|
|
488
|
+
|
|
489
|
+
```bash
|
|
490
|
+
# Chat with AI about your workflows
|
|
491
|
+
mcli chat
|
|
492
|
+
|
|
493
|
+
# Configure AI providers
|
|
494
|
+
export OPENAI_API_KEY=your-key
|
|
495
|
+
export ANTHROPIC_API_KEY=your-key
|
|
496
|
+
```
|
|
497
|
+
|
|
498
|
+
### Self-Update
|
|
499
|
+
|
|
500
|
+
```bash
|
|
501
|
+
# Update MCLI to latest version
|
|
502
|
+
mcli self update
|
|
503
|
+
|
|
504
|
+
# Check version
|
|
505
|
+
mcli version
|
|
506
|
+
```
|
|
507
|
+
|
|
508
|
+
## 🛠️ Development
|
|
509
|
+
|
|
510
|
+
### For Development or Customization
|
|
511
|
+
|
|
512
|
+
```bash
|
|
513
|
+
# Clone repository
|
|
514
|
+
git clone https://github.com/gwicho38/mcli.git
|
|
515
|
+
cd mcli
|
|
516
|
+
|
|
517
|
+
# Setup with UV
|
|
518
|
+
uv venv
|
|
519
|
+
uv pip install -e ".[dev]"
|
|
520
|
+
|
|
521
|
+
# Run tests
|
|
522
|
+
make test
|
|
523
|
+
|
|
524
|
+
# Build wheel
|
|
525
|
+
make wheel
|
|
526
|
+
```
|
|
527
|
+
|
|
528
|
+
## 📖 Documentation
|
|
529
|
+
|
|
530
|
+
- **Installation**: See [Installation Guide](docs/setup/INSTALLATION.md)
|
|
531
|
+
- **Workflows**: Full workflow documentation (this README)
|
|
532
|
+
- **Shell Completion**: See [Shell Completion Guide](docs/features/SHELL_COMPLETION.md)
|
|
533
|
+
- **Contributing**: See [Contributing Guide](CONTRIBUTING.md)
|
|
534
|
+
|
|
535
|
+
## 🎯 Common Use Cases
|
|
536
|
+
|
|
537
|
+
### Use Case 1: Daily Automation Scripts
|
|
538
|
+
|
|
539
|
+
```bash
|
|
540
|
+
# Create your daily automation
|
|
541
|
+
mcli commands add daily-tasks --group workflow
|
|
542
|
+
# Add your tasks in $EDITOR
|
|
543
|
+
mcli workflow scheduler add --name daily --schedule "0 9 * * *" --workflow daily-tasks
|
|
544
|
+
```
|
|
545
|
+
|
|
546
|
+
### Use Case 2: Team Workflow Sharing
|
|
547
|
+
|
|
548
|
+
```bash
|
|
549
|
+
# On your machine
|
|
550
|
+
mcli commands export team-workflows.json
|
|
551
|
+
|
|
552
|
+
# Share file with team
|
|
553
|
+
# On teammate's machine
|
|
554
|
+
mcli commands import team-workflows.json
|
|
555
|
+
mcli commands verify # Ensure consistency
|
|
556
|
+
```
|
|
557
|
+
|
|
558
|
+
### Use Case 3: CI/CD Integration
|
|
559
|
+
|
|
560
|
+
```bash
|
|
561
|
+
# In your CI pipeline
|
|
562
|
+
- pip install mcli-framework
|
|
563
|
+
- mcli commands import ci-workflows.json
|
|
564
|
+
- mcli workflow build-and-test
|
|
565
|
+
- mcli workflow deploy --env production
|
|
566
|
+
```
|
|
567
|
+
|
|
568
|
+
## 📦 Dependencies
|
|
569
|
+
|
|
570
|
+
### Core (Always Installed)
|
|
571
|
+
- **click**: CLI framework
|
|
572
|
+
- **rich**: Beautiful terminal output
|
|
573
|
+
- **requests**: HTTP client
|
|
574
|
+
- **python-dotenv**: Environment management
|
|
575
|
+
|
|
576
|
+
### Optional Features
|
|
577
|
+
|
|
578
|
+
All features are included by default as of v7.0.0. For specialized needs:
|
|
579
|
+
|
|
580
|
+
```bash
|
|
581
|
+
# GPU support (CUDA required)
|
|
582
|
+
pip install "mcli-framework[gpu]"
|
|
583
|
+
|
|
584
|
+
# Development tools
|
|
585
|
+
pip install "mcli-framework[dev]"
|
|
586
|
+
```
|
|
587
|
+
|
|
588
|
+
## 🤝 Contributing
|
|
589
|
+
|
|
590
|
+
We welcome contributions! Especially workflow examples.
|
|
591
|
+
|
|
592
|
+
1. Fork the repository
|
|
593
|
+
2. Create feature branch: `git checkout -b feature/awesome-workflow`
|
|
594
|
+
3. Create your workflow
|
|
595
|
+
4. Export it: `mcli commands export my-workflow.json`
|
|
596
|
+
5. Submit PR with workflow JSON
|
|
597
|
+
|
|
598
|
+
## 📄 License
|
|
599
|
+
|
|
600
|
+
MIT License - see [LICENSE](LICENSE) for details.
|
|
601
|
+
|
|
602
|
+
## 🙏 Acknowledgments
|
|
603
|
+
|
|
604
|
+
- Built with [Click](https://click.palletsprojects.com/)
|
|
605
|
+
- Styled with [Rich](https://github.com/Textualize/rich)
|
|
606
|
+
- Managed with [UV](https://docs.astral.sh/uv/)
|
|
607
|
+
|
|
608
|
+
---
|
|
609
|
+
|
|
610
|
+
**Start transforming your scripts into portable workflows today:**
|
|
611
|
+
|
|
612
|
+
```bash
|
|
613
|
+
pip install mcli-framework
|
|
614
|
+
mcli commands add my-first-workflow --group workflow
|
|
615
|
+
```
|