mcli-framework 7.8.1__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_framework-7.8.2.dist-info/METADATA +615 -0
- {mcli_framework-7.8.1.dist-info → mcli_framework-7.8.2.dist-info}/RECORD +6 -6
- mcli_framework-7.8.1.dist-info/METADATA +0 -491
- {mcli_framework-7.8.1.dist-info → mcli_framework-7.8.2.dist-info}/WHEEL +0 -0
- {mcli_framework-7.8.1.dist-info → mcli_framework-7.8.2.dist-info}/entry_points.txt +0 -0
- {mcli_framework-7.8.1.dist-info → mcli_framework-7.8.2.dist-info}/licenses/LICENSE +0 -0
- {mcli_framework-7.8.1.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
|
+
```
|
|
@@ -270,9 +270,9 @@ mcli/workflow/sync/test_cmd.py,sha256=neVgs9zEnKSxlvzDpFkuCGucqnzjrShm2OvJtHibsl
|
|
|
270
270
|
mcli/workflow/videos/__init__.py,sha256=aV3DEoO7qdKJY4odWKoQbOKDQq4ludTeCLnZcupOFIM,25
|
|
271
271
|
mcli/workflow/wakatime/__init__.py,sha256=wKG8cVIHVtMPhNRFGFtX43bRnocHqOMMkFMkmW-M6pU,2626
|
|
272
272
|
mcli/workflow/wakatime/wakatime.py,sha256=sEjsUKa3-XyE8Ni6sAb_D3GAY5jDcA30KknW9YTbLTA,142
|
|
273
|
-
mcli_framework-7.8.
|
|
274
|
-
mcli_framework-7.8.
|
|
275
|
-
mcli_framework-7.8.
|
|
276
|
-
mcli_framework-7.8.
|
|
277
|
-
mcli_framework-7.8.
|
|
278
|
-
mcli_framework-7.8.
|
|
273
|
+
mcli_framework-7.8.2.dist-info/licenses/LICENSE,sha256=sahwAMfrJv2-V66HNPTp7A9UmMjxtyejwTZZoWQvEcI,1075
|
|
274
|
+
mcli_framework-7.8.2.dist-info/METADATA,sha256=fbnExs67JJlwgbny8lKt9iIWB1kMRaq54DGaSA2V288,16374
|
|
275
|
+
mcli_framework-7.8.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
276
|
+
mcli_framework-7.8.2.dist-info/entry_points.txt,sha256=dYrZbDIm-KUPsl1wfv600Kx_8sMy89phMkCihbDRgP8,261
|
|
277
|
+
mcli_framework-7.8.2.dist-info/top_level.txt,sha256=_bnO8J2EUkliWivey_1le0UrnocFKmyVMQjbQ8iVXjc,5
|
|
278
|
+
mcli_framework-7.8.2.dist-info/RECORD,,
|
|
@@ -1,491 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: mcli-framework
|
|
3
|
-
Version: 7.8.1
|
|
4
|
-
Summary: 🚀 High-performance CLI framework with Rust extensions, AI chat, and stunning visuals
|
|
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
|
|
161
|
-
|
|
162
|
-
A modern CLI framework with chat capabilities, command management, and extensible architecture.
|
|
163
|
-
|
|
164
|
-
## Features
|
|
165
|
-
|
|
166
|
-
- 🚀 **Modern CLI Framework**: Built with Click and Rich for beautiful command-line interfaces
|
|
167
|
-
- 💬 **AI Chat Integration**: Built-in chat capabilities with OpenAI and Anthropic support
|
|
168
|
-
- 🔧 **Command Management**: Dynamic command discovery and registration
|
|
169
|
-
- 🎨 **Rich UI**: Colorful, interactive command-line experience
|
|
170
|
-
- 📦 **Easy Extension**: Simple framework for adding custom commands
|
|
171
|
-
- 🛠️ **Developer Tools**: IPython integration for interactive development
|
|
172
|
-
- ⚡ **Shell Completion**: Full tab completion for bash, zsh, and fish shells
|
|
173
|
-
|
|
174
|
-
## Quick Start
|
|
175
|
-
|
|
176
|
-
### Prerequisites
|
|
177
|
-
|
|
178
|
-
- Python 3.9 or higher
|
|
179
|
-
- [UV](https://docs.astral.sh/uv/) (recommended) or pip
|
|
180
|
-
|
|
181
|
-
### Installation from PyPI (Recommended)
|
|
182
|
-
|
|
183
|
-
The easiest way to install mcli is from PyPI:
|
|
184
|
-
|
|
185
|
-
```bash
|
|
186
|
-
# Install latest version (includes all features)
|
|
187
|
-
pip install mcli-framework
|
|
188
|
-
|
|
189
|
-
# Or with UV (recommended)
|
|
190
|
-
uv pip install mcli-framework
|
|
191
|
-
|
|
192
|
-
# Optional: GPU support (CUDA required)
|
|
193
|
-
pip install "mcli-framework[gpu]"
|
|
194
|
-
```
|
|
195
|
-
|
|
196
|
-
**Note:** As of v7.0.0, all features are included by default. GPU support is optional as it requires CUDA.
|
|
197
|
-
|
|
198
|
-
**Self-Update Feature:** Once installed from PyPI, you can update mcli to the latest version with:
|
|
199
|
-
|
|
200
|
-
```bash
|
|
201
|
-
# Check for updates
|
|
202
|
-
mcli self update --check
|
|
203
|
-
|
|
204
|
-
# Install updates automatically
|
|
205
|
-
mcli self update
|
|
206
|
-
|
|
207
|
-
# Install with confirmation
|
|
208
|
-
mcli self update --yes
|
|
209
|
-
```
|
|
210
|
-
|
|
211
|
-
### Installation from Source
|
|
212
|
-
|
|
213
|
-
For development or if you want to customize mcli:
|
|
214
|
-
|
|
215
|
-
#### With UV
|
|
216
|
-
|
|
217
|
-
```bash
|
|
218
|
-
# Clone the repository
|
|
219
|
-
git clone https://github.com/gwicho38/mcli.git
|
|
220
|
-
cd mcli
|
|
221
|
-
|
|
222
|
-
# Install with UV (recommended)
|
|
223
|
-
uv venv
|
|
224
|
-
uv pip install -e .
|
|
225
|
-
|
|
226
|
-
# Or install development dependencies
|
|
227
|
-
uv pip install -e ".[dev]"
|
|
228
|
-
```
|
|
229
|
-
|
|
230
|
-
#### With pip
|
|
231
|
-
|
|
232
|
-
```bash
|
|
233
|
-
# Clone the repository
|
|
234
|
-
git clone https://github.com/gwicho38/mcli.git
|
|
235
|
-
cd mcli
|
|
236
|
-
|
|
237
|
-
# Create virtual environment
|
|
238
|
-
python -m venv .venv
|
|
239
|
-
source .venv/bin/activate # On Windows: .venv\Scripts\activate
|
|
240
|
-
|
|
241
|
-
# Install the package
|
|
242
|
-
pip install -e .
|
|
243
|
-
```
|
|
244
|
-
|
|
245
|
-
### Usage
|
|
246
|
-
|
|
247
|
-
```bash
|
|
248
|
-
# Show available commands
|
|
249
|
-
mcli --help
|
|
250
|
-
|
|
251
|
-
# Start a chat session
|
|
252
|
-
mcli chat
|
|
253
|
-
|
|
254
|
-
# Get version information
|
|
255
|
-
mcli version
|
|
256
|
-
|
|
257
|
-
# Manage the application
|
|
258
|
-
mcli self --help
|
|
259
|
-
|
|
260
|
-
# List available commands
|
|
261
|
-
mcli commands
|
|
262
|
-
```
|
|
263
|
-
|
|
264
|
-
### Shell Completion (Optional)
|
|
265
|
-
|
|
266
|
-
Enable tab completion for faster command discovery:
|
|
267
|
-
|
|
268
|
-
```bash
|
|
269
|
-
# Install completion for your shell (auto-detects bash/zsh/fish)
|
|
270
|
-
mcli completion install
|
|
271
|
-
|
|
272
|
-
# Check completion status
|
|
273
|
-
mcli completion status
|
|
274
|
-
```
|
|
275
|
-
|
|
276
|
-
After installation, you'll have full tab completion:
|
|
277
|
-
- `mcli <TAB>` → shows all available commands
|
|
278
|
-
- `mcli workflow <TAB>` → shows workflow subcommands
|
|
279
|
-
- `mcli workflow politician-trading <TAB>` → shows politician-trading options
|
|
280
|
-
|
|
281
|
-
See [SHELL_COMPLETION.md](docs/features/SHELL_COMPLETION.md) for detailed setup and troubleshooting.
|
|
282
|
-
|
|
283
|
-
## Development Workflow
|
|
284
|
-
|
|
285
|
-
This project uses [UV](https://docs.astral.sh/uv/) for fast, reliable Python package management.
|
|
286
|
-
|
|
287
|
-
### Setup Development Environment
|
|
288
|
-
|
|
289
|
-
```bash
|
|
290
|
-
# 1. Set up the development environment
|
|
291
|
-
make setup
|
|
292
|
-
|
|
293
|
-
# Or manually with UV
|
|
294
|
-
uv venv
|
|
295
|
-
uv pip install -e ".[dev]"
|
|
296
|
-
|
|
297
|
-
# 2. Configure environment variables
|
|
298
|
-
cp .env.example .env
|
|
299
|
-
# Edit .env with your API keys and configuration
|
|
300
|
-
```
|
|
301
|
-
|
|
302
|
-
### Available Make Commands
|
|
303
|
-
|
|
304
|
-
```bash
|
|
305
|
-
# Setup and Installation
|
|
306
|
-
make setup # Setup UV environment with caching
|
|
307
|
-
make install # Install the package with caching
|
|
308
|
-
|
|
309
|
-
# Building
|
|
310
|
-
make wheel # Build Python wheel package
|
|
311
|
-
make portable # Build portable executable
|
|
312
|
-
make validate-build # Validate application for distribution
|
|
313
|
-
|
|
314
|
-
# Testing
|
|
315
|
-
make test # Test basic installation and functionality
|
|
316
|
-
make test-all # Run complete test suite (if available)
|
|
317
|
-
make validate-build # Comprehensive build validation
|
|
318
|
-
|
|
319
|
-
# CI/CD
|
|
320
|
-
make ci-trigger-build # Trigger GitHub Actions build workflow
|
|
321
|
-
make ci-trigger-test # Trigger GitHub Actions test workflow
|
|
322
|
-
make ci-watch # Watch GitHub Actions runs in real-time
|
|
323
|
-
make ci-status # Show GitHub Actions run status
|
|
324
|
-
|
|
325
|
-
# Maintenance
|
|
326
|
-
make clean # Clean all build artifacts
|
|
327
|
-
make debug # Show debug information
|
|
328
|
-
```
|
|
329
|
-
|
|
330
|
-
### Project Structure
|
|
331
|
-
|
|
332
|
-
```
|
|
333
|
-
mcli/
|
|
334
|
-
├── src/mcli/ # Main package source
|
|
335
|
-
│ ├── app/ # Application modules
|
|
336
|
-
│ │ ├── main.py # Main CLI entry point
|
|
337
|
-
│ │ ├── chat_cmd.py # Chat command implementation
|
|
338
|
-
│ │ └── commands_cmd.py # Command management
|
|
339
|
-
│ ├── chat/ # Chat system
|
|
340
|
-
│ ├── lib/ # Shared libraries
|
|
341
|
-
│ │ ├── api/ # API functionality
|
|
342
|
-
│ │ ├── ui/ # UI components
|
|
343
|
-
│ │ └── logger/ # Logging utilities
|
|
344
|
-
│ └── self/ # Self-management commands
|
|
345
|
-
├── tests/ # Test suite
|
|
346
|
-
├── .github/workflows/ # CI/CD workflows
|
|
347
|
-
├── pyproject.toml # Project configuration
|
|
348
|
-
├── Makefile # Build and development commands
|
|
349
|
-
└── README.md # This file
|
|
350
|
-
```
|
|
351
|
-
|
|
352
|
-
## Dependencies
|
|
353
|
-
|
|
354
|
-
### Core Dependencies
|
|
355
|
-
- **click**: Command-line interface creation
|
|
356
|
-
- **rich**: Rich text and beautiful formatting
|
|
357
|
-
- **requests**: HTTP library
|
|
358
|
-
- **tomli**: TOML parser
|
|
359
|
-
|
|
360
|
-
### AI & Chat
|
|
361
|
-
- **openai**: OpenAI API integration
|
|
362
|
-
- **anthropic**: Anthropic API integration
|
|
363
|
-
|
|
364
|
-
### Development Tools
|
|
365
|
-
- **ipython**: Interactive Python shell
|
|
366
|
-
- **inquirerpy**: Interactive command-line prompts
|
|
367
|
-
|
|
368
|
-
### Optional Dependencies
|
|
369
|
-
|
|
370
|
-
MCLI has been optimized with minimal core dependencies. Install only what you need:
|
|
371
|
-
|
|
372
|
-
```bash
|
|
373
|
-
# Chat and AI features
|
|
374
|
-
uv pip install -e ".[chat]"
|
|
375
|
-
|
|
376
|
-
# Video processing
|
|
377
|
-
uv pip install -e ".[video]"
|
|
378
|
-
|
|
379
|
-
# Document processing (PDF, Excel, etc.)
|
|
380
|
-
uv pip install -e ".[documents]"
|
|
381
|
-
|
|
382
|
-
# ML/Trading features
|
|
383
|
-
uv pip install -e ".[ml]"
|
|
384
|
-
|
|
385
|
-
# Database support
|
|
386
|
-
uv pip install -e ".[database]"
|
|
387
|
-
|
|
388
|
-
# Web dashboards
|
|
389
|
-
uv pip install -e ".[dashboard]"
|
|
390
|
-
|
|
391
|
-
# Development tools
|
|
392
|
-
uv pip install -e ".[dev]"
|
|
393
|
-
|
|
394
|
-
# Everything
|
|
395
|
-
uv pip install -e ".[all]"
|
|
396
|
-
```
|
|
397
|
-
|
|
398
|
-
Available extras:
|
|
399
|
-
- `chat` - OpenAI, Anthropic, Ollama support
|
|
400
|
-
- `async-extras` - FastAPI, Redis, advanced async features
|
|
401
|
-
- `video` - OpenCV, image processing
|
|
402
|
-
- `documents` - PDF, Excel processing
|
|
403
|
-
- `viz` - Matplotlib, Plotly visualization
|
|
404
|
-
- `database` - Supabase, SQLAlchemy, PostgreSQL
|
|
405
|
-
- `ml` - PyTorch, MLflow, DVC, trading features
|
|
406
|
-
- `gpu` - CUDA support
|
|
407
|
-
- `monitoring` - Prometheus, Datadog
|
|
408
|
-
- `streaming` - Kafka support
|
|
409
|
-
- `dashboard` - Streamlit dashboards
|
|
410
|
-
- `web` - Flask, FastAPI web frameworks
|
|
411
|
-
- `dev` - Testing, linting, type checking
|
|
412
|
-
- `all` - All optional features
|
|
413
|
-
|
|
414
|
-
## Configuration
|
|
415
|
-
|
|
416
|
-
MCLI can be configured through environment variables and configuration files.
|
|
417
|
-
|
|
418
|
-
### Environment Setup
|
|
419
|
-
|
|
420
|
-
1. **Copy the environment template:**
|
|
421
|
-
```bash
|
|
422
|
-
cp .env.example .env
|
|
423
|
-
```
|
|
424
|
-
|
|
425
|
-
2. **Edit the `.env` file with your configuration:**
|
|
426
|
-
```bash
|
|
427
|
-
# Required for AI chat functionality
|
|
428
|
-
OPENAI_API_KEY=your-openai-api-key-here
|
|
429
|
-
ANTHROPIC_API_KEY=your-anthropic-api-key-here
|
|
430
|
-
|
|
431
|
-
# Required for politician trading features
|
|
432
|
-
SUPABASE_URL=https://your-project.supabase.co
|
|
433
|
-
SUPABASE_ANON_KEY=your-supabase-anon-key-here
|
|
434
|
-
SUPABASE_SERVICE_ROLE_KEY=your-supabase-service-role-key-here
|
|
435
|
-
```
|
|
436
|
-
|
|
437
|
-
3. **Optional development settings:**
|
|
438
|
-
```bash
|
|
439
|
-
# Enable debug logging
|
|
440
|
-
MCLI_TRACE_LEVEL=1
|
|
441
|
-
MCLI_DEBUG=true
|
|
442
|
-
|
|
443
|
-
# Performance optimization
|
|
444
|
-
MCLI_AUTO_OPTIMIZE=true
|
|
445
|
-
```
|
|
446
|
-
|
|
447
|
-
See `.env.example` for a complete list of configuration options.
|
|
448
|
-
|
|
449
|
-
## Creating Custom Commands
|
|
450
|
-
|
|
451
|
-
MCLI supports dynamic command discovery. Add your commands to the appropriate modules:
|
|
452
|
-
|
|
453
|
-
```python
|
|
454
|
-
import click
|
|
455
|
-
from mcli.lib.ui.styling import success
|
|
456
|
-
|
|
457
|
-
@click.command()
|
|
458
|
-
def my_command():
|
|
459
|
-
"""My custom command."""
|
|
460
|
-
success("Hello from my custom command!")
|
|
461
|
-
```
|
|
462
|
-
|
|
463
|
-
## CI/CD
|
|
464
|
-
|
|
465
|
-
The project includes comprehensive CI/CD with GitHub Actions:
|
|
466
|
-
|
|
467
|
-
- **Build Workflow**: Multi-platform builds (Ubuntu, macOS)
|
|
468
|
-
- **Test Workflow**: Multi-Python version testing (3.9-3.12)
|
|
469
|
-
- **Automatic Triggers**: Runs on push/PR to main branch
|
|
470
|
-
- **Manual Triggers**: Use `make ci-trigger-*` commands
|
|
471
|
-
|
|
472
|
-
## Contributing
|
|
473
|
-
|
|
474
|
-
1. Fork the repository
|
|
475
|
-
2. Create a feature branch: `git checkout -b feature-name`
|
|
476
|
-
3. Make your changes
|
|
477
|
-
4. Run tests: `make test`
|
|
478
|
-
5. Validate build: `make validate-build`
|
|
479
|
-
6. Commit your changes: `git commit -am 'Add feature'`
|
|
480
|
-
7. Push to your fork: `git push origin feature-name`
|
|
481
|
-
8. Create a Pull Request
|
|
482
|
-
|
|
483
|
-
## License
|
|
484
|
-
|
|
485
|
-
MIT License - see [LICENSE](LICENSE) for details.
|
|
486
|
-
|
|
487
|
-
## Acknowledgments
|
|
488
|
-
|
|
489
|
-
- Built with [Click](https://click.palletsprojects.com/) for CLI interfaces
|
|
490
|
-
- Styled with [Rich](https://github.com/Textualize/rich) for beautiful output
|
|
491
|
-
- Managed with [UV](https://docs.astral.sh/uv/) for fast Python packaging
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|