mcli-framework 7.9.6__py3-none-any.whl → 7.10.0__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/app/commands_cmd.py +161 -15
- mcli/app/model_cmd.py +0 -2
- mcli/lib/custom_commands.py +126 -6
- {mcli_framework-7.9.6.dist-info → mcli_framework-7.10.0.dist-info}/METADATA +1 -1
- {mcli_framework-7.9.6.dist-info → mcli_framework-7.10.0.dist-info}/RECORD +9 -9
- {mcli_framework-7.9.6.dist-info → mcli_framework-7.10.0.dist-info}/WHEEL +0 -0
- {mcli_framework-7.9.6.dist-info → mcli_framework-7.10.0.dist-info}/entry_points.txt +0 -0
- {mcli_framework-7.9.6.dist-info → mcli_framework-7.10.0.dist-info}/licenses/LICENSE +0 -0
- {mcli_framework-7.9.6.dist-info → mcli_framework-7.10.0.dist-info}/top_level.txt +0 -0
mcli/app/commands_cmd.py
CHANGED
|
@@ -496,6 +496,37 @@ def {name}_command(name: str = "World"):
|
|
|
496
496
|
return template
|
|
497
497
|
|
|
498
498
|
|
|
499
|
+
def get_shell_command_template(name: str, shell: str = "bash", description: str = "") -> str:
|
|
500
|
+
"""Generate template shell script for a new command."""
|
|
501
|
+
template = f"""#!/usr/bin/env {shell}
|
|
502
|
+
# {name} - {description or "Shell workflow command"}
|
|
503
|
+
#
|
|
504
|
+
# This is a shell-based MCLI workflow command.
|
|
505
|
+
# Arguments are passed as positional parameters: $1, $2, $3, etc.
|
|
506
|
+
# The command name is available in: $MCLI_COMMAND
|
|
507
|
+
|
|
508
|
+
set -euo pipefail # Exit on error, undefined variables, and pipe failures
|
|
509
|
+
|
|
510
|
+
# Command logic
|
|
511
|
+
echo "Hello from {name} shell command!"
|
|
512
|
+
echo "Command: $MCLI_COMMAND"
|
|
513
|
+
|
|
514
|
+
# Example: Access arguments
|
|
515
|
+
if [ $# -gt 0 ]; then
|
|
516
|
+
echo "Arguments: $@"
|
|
517
|
+
for arg in "$@"; do
|
|
518
|
+
echo " - $arg"
|
|
519
|
+
done
|
|
520
|
+
else
|
|
521
|
+
echo "No arguments provided"
|
|
522
|
+
fi
|
|
523
|
+
|
|
524
|
+
# Exit successfully
|
|
525
|
+
exit 0
|
|
526
|
+
"""
|
|
527
|
+
return template
|
|
528
|
+
|
|
529
|
+
|
|
499
530
|
def open_editor_for_command(
|
|
500
531
|
command_name: str, command_group: str, description: str
|
|
501
532
|
) -> Optional[str]:
|
|
@@ -655,20 +686,39 @@ logger = get_logger()
|
|
|
655
686
|
is_flag=True,
|
|
656
687
|
help="Use template mode (skip editor and use predefined template)",
|
|
657
688
|
)
|
|
658
|
-
|
|
689
|
+
@click.option(
|
|
690
|
+
"--language",
|
|
691
|
+
"-l",
|
|
692
|
+
type=click.Choice(["python", "shell"], case_sensitive=False),
|
|
693
|
+
default="python",
|
|
694
|
+
help="Command language (python or shell)",
|
|
695
|
+
)
|
|
696
|
+
@click.option(
|
|
697
|
+
"--shell",
|
|
698
|
+
"-s",
|
|
699
|
+
type=click.Choice(["bash", "zsh", "fish", "sh"], case_sensitive=False),
|
|
700
|
+
help="Shell type for shell commands (defaults to $SHELL)",
|
|
701
|
+
)
|
|
702
|
+
def add_command(command_name, group, description, template, language, shell):
|
|
659
703
|
"""
|
|
660
704
|
Generate a new portable custom command saved to ~/.mcli/commands/.
|
|
661
705
|
|
|
662
|
-
This command will open your default editor to allow you to write
|
|
663
|
-
for your command. The editor will be opened with a template that you can modify.
|
|
706
|
+
This command will open your default editor to allow you to write Python or shell
|
|
707
|
+
logic for your command. The editor will be opened with a template that you can modify.
|
|
664
708
|
|
|
665
709
|
Commands are automatically nested under the 'workflow' group by default,
|
|
666
710
|
making them portable and persistent across updates.
|
|
667
711
|
|
|
668
|
-
|
|
712
|
+
Examples:
|
|
713
|
+
# Python command (default)
|
|
669
714
|
mcli commands add my_command
|
|
670
715
|
mcli commands add analytics --group data
|
|
671
|
-
mcli commands add quick_cmd --template
|
|
716
|
+
mcli commands add quick_cmd --template
|
|
717
|
+
|
|
718
|
+
# Shell command
|
|
719
|
+
mcli commands add backup-db --language shell
|
|
720
|
+
mcli commands add deploy --language shell --shell bash
|
|
721
|
+
mcli commands add quick-sh -l shell -t # Template mode
|
|
672
722
|
"""
|
|
673
723
|
command_name = command_name.lower().replace("-", "_")
|
|
674
724
|
|
|
@@ -713,18 +763,61 @@ def add_command(command_name, group, description, template):
|
|
|
713
763
|
click.echo("Command creation aborted.")
|
|
714
764
|
return 1
|
|
715
765
|
|
|
766
|
+
# Normalize language
|
|
767
|
+
language = language.lower()
|
|
768
|
+
|
|
769
|
+
# Determine shell type for shell commands
|
|
770
|
+
if language == "shell":
|
|
771
|
+
if not shell:
|
|
772
|
+
# Default to $SHELL environment variable or bash
|
|
773
|
+
shell_env = os.environ.get("SHELL", "/bin/bash")
|
|
774
|
+
shell = shell_env.split("/")[-1]
|
|
775
|
+
click.echo(f"Using shell: {shell} (from $SHELL environment variable)")
|
|
776
|
+
|
|
716
777
|
# Generate command code
|
|
717
778
|
if template:
|
|
718
779
|
# Use template mode - generate and save directly
|
|
719
|
-
|
|
720
|
-
|
|
780
|
+
if language == "shell":
|
|
781
|
+
code = get_shell_command_template(command_name, shell, description)
|
|
782
|
+
click.echo(f"Using shell template for command: {command_name}")
|
|
783
|
+
else:
|
|
784
|
+
code = get_command_template(command_name, command_group)
|
|
785
|
+
click.echo(f"Using Python template for command: {command_name}")
|
|
721
786
|
else:
|
|
722
787
|
# Editor mode - open editor for user to write code
|
|
723
788
|
click.echo(f"Opening editor for command: {command_name}")
|
|
724
|
-
|
|
725
|
-
if
|
|
726
|
-
|
|
727
|
-
|
|
789
|
+
|
|
790
|
+
if language == "shell":
|
|
791
|
+
# For shell commands, open editor with shell template
|
|
792
|
+
shell_template = get_shell_command_template(command_name, shell, description)
|
|
793
|
+
|
|
794
|
+
# Create temp file with shell template
|
|
795
|
+
with tempfile.NamedTemporaryFile(mode="w", suffix=".sh", delete=False) as tmp:
|
|
796
|
+
tmp.write(shell_template)
|
|
797
|
+
tmp_path = tmp.name
|
|
798
|
+
|
|
799
|
+
try:
|
|
800
|
+
editor = os.environ.get("EDITOR", "vim")
|
|
801
|
+
result = subprocess.run([editor, tmp_path])
|
|
802
|
+
|
|
803
|
+
if result.returncode != 0:
|
|
804
|
+
click.echo("Editor exited with error. Command creation cancelled.")
|
|
805
|
+
return 1
|
|
806
|
+
|
|
807
|
+
with open(tmp_path, "r") as f:
|
|
808
|
+
code = f.read()
|
|
809
|
+
|
|
810
|
+
if not code.strip():
|
|
811
|
+
click.echo("No code provided. Command creation cancelled.")
|
|
812
|
+
return 1
|
|
813
|
+
finally:
|
|
814
|
+
Path(tmp_path).unlink(missing_ok=True)
|
|
815
|
+
else:
|
|
816
|
+
# Python command - use existing editor function
|
|
817
|
+
code = open_editor_for_command(command_name, command_group, description)
|
|
818
|
+
if code is None:
|
|
819
|
+
click.echo("Command creation cancelled.")
|
|
820
|
+
return 1
|
|
728
821
|
|
|
729
822
|
# Save the command
|
|
730
823
|
saved_path = manager.save_command(
|
|
@@ -732,11 +825,18 @@ def add_command(command_name, group, description, template):
|
|
|
732
825
|
code=code,
|
|
733
826
|
description=description,
|
|
734
827
|
group=command_group,
|
|
828
|
+
language=language,
|
|
829
|
+
shell=shell if language == "shell" else None,
|
|
735
830
|
)
|
|
736
831
|
|
|
737
|
-
|
|
738
|
-
|
|
832
|
+
lang_display = f"{language}" if language == "python" else f"{language} ({shell})"
|
|
833
|
+
logger.info(f"Created portable custom command: {command_name} ({lang_display})")
|
|
834
|
+
console.print(
|
|
835
|
+
f"[green]Created portable custom command: {command_name}[/green] [dim]({lang_display})[/dim]"
|
|
836
|
+
)
|
|
739
837
|
console.print(f"[dim]Saved to: {saved_path}[/dim]")
|
|
838
|
+
console.print(f"[dim]Group: {command_group}[/dim]")
|
|
839
|
+
console.print(f"[dim]Execute with: mcli {command_group} {command_name}[/dim]")
|
|
740
840
|
console.print("[dim]Command will be automatically loaded on next mcli startup[/dim]")
|
|
741
841
|
console.print(
|
|
742
842
|
f"[dim]You can share this command by copying {saved_path} to another machine's ~/.mcli/commands/ directory[/dim]"
|
|
@@ -903,7 +1003,7 @@ def import_commands(source, script, overwrite, name, group, description, interac
|
|
|
903
1003
|
source_path = Path(source)
|
|
904
1004
|
|
|
905
1005
|
if script:
|
|
906
|
-
# Import
|
|
1006
|
+
# Import script as command (Python or Shell)
|
|
907
1007
|
if not source_path.exists():
|
|
908
1008
|
console.print(f"[red]Script not found: {source_path}[/red]")
|
|
909
1009
|
return 1
|
|
@@ -916,6 +1016,43 @@ def import_commands(source, script, overwrite, name, group, description, interac
|
|
|
916
1016
|
console.print(f"[red]Failed to read script: {e}[/red]")
|
|
917
1017
|
return 1
|
|
918
1018
|
|
|
1019
|
+
# Auto-detect language from shebang or file extension
|
|
1020
|
+
detected_language = "python"
|
|
1021
|
+
detected_shell = None
|
|
1022
|
+
|
|
1023
|
+
if code.strip().startswith("#!"):
|
|
1024
|
+
# Parse shebang
|
|
1025
|
+
shebang = code.strip().split("\n")[0]
|
|
1026
|
+
if "bash" in shebang:
|
|
1027
|
+
detected_language = "shell"
|
|
1028
|
+
detected_shell = "bash"
|
|
1029
|
+
elif "zsh" in shebang:
|
|
1030
|
+
detected_language = "shell"
|
|
1031
|
+
detected_shell = "zsh"
|
|
1032
|
+
elif "fish" in shebang:
|
|
1033
|
+
detected_language = "shell"
|
|
1034
|
+
detected_shell = "fish"
|
|
1035
|
+
elif "/bin/sh" in shebang or "/sh" in shebang:
|
|
1036
|
+
detected_language = "shell"
|
|
1037
|
+
detected_shell = "sh"
|
|
1038
|
+
elif "python" in shebang:
|
|
1039
|
+
detected_language = "python"
|
|
1040
|
+
|
|
1041
|
+
# Also check file extension
|
|
1042
|
+
if source_path.suffix in [".sh", ".bash", ".zsh"]:
|
|
1043
|
+
detected_language = "shell"
|
|
1044
|
+
if not detected_shell:
|
|
1045
|
+
if source_path.suffix == ".bash":
|
|
1046
|
+
detected_shell = "bash"
|
|
1047
|
+
elif source_path.suffix == ".zsh":
|
|
1048
|
+
detected_shell = "zsh"
|
|
1049
|
+
else:
|
|
1050
|
+
detected_shell = "bash" # Default for .sh
|
|
1051
|
+
|
|
1052
|
+
console.print(f"[dim]Detected language: {detected_language}[/dim]")
|
|
1053
|
+
if detected_language == "shell":
|
|
1054
|
+
console.print(f"[dim]Detected shell: {detected_shell}[/dim]")
|
|
1055
|
+
|
|
919
1056
|
# Determine command name
|
|
920
1057
|
if not name:
|
|
921
1058
|
name = source_path.stem.lower().replace("-", "_")
|
|
@@ -961,6 +1098,8 @@ def import_commands(source, script, overwrite, name, group, description, interac
|
|
|
961
1098
|
code=code,
|
|
962
1099
|
description=description,
|
|
963
1100
|
group=group,
|
|
1101
|
+
language=detected_language,
|
|
1102
|
+
shell=detected_shell if detected_language == "shell" else None,
|
|
964
1103
|
metadata={
|
|
965
1104
|
"source": "import-script",
|
|
966
1105
|
"original_file": str(source_path),
|
|
@@ -968,7 +1107,14 @@ def import_commands(source, script, overwrite, name, group, description, interac
|
|
|
968
1107
|
},
|
|
969
1108
|
)
|
|
970
1109
|
|
|
971
|
-
|
|
1110
|
+
lang_display = (
|
|
1111
|
+
f"{detected_language}"
|
|
1112
|
+
if detected_language == "python"
|
|
1113
|
+
else f"{detected_language} ({detected_shell})"
|
|
1114
|
+
)
|
|
1115
|
+
console.print(
|
|
1116
|
+
f"[green]Imported script as command: {name}[/green] [dim]({lang_display})[/dim]"
|
|
1117
|
+
)
|
|
972
1118
|
console.print(f"[dim]Saved to: {saved_path}[/dim]")
|
|
973
1119
|
console.print(f"[dim]Use with: mcli {group} {name}[/dim]")
|
|
974
1120
|
console.print("[dim]Command will be available after restart or reload[/dim]")
|
mcli/app/model_cmd.py
CHANGED
|
@@ -10,8 +10,6 @@ from pathlib import Path
|
|
|
10
10
|
|
|
11
11
|
# Try to load the model command from the workflow system
|
|
12
12
|
try:
|
|
13
|
-
from mcli.lib.custom_commands import load_command_from_file
|
|
14
|
-
|
|
15
13
|
# Load model command from ~/.mcli/commands/model.json
|
|
16
14
|
model_json_path = Path.home() / ".mcli" / "commands" / "model.json"
|
|
17
15
|
|
mcli/lib/custom_commands.py
CHANGED
|
@@ -7,6 +7,9 @@ format in ~/.mcli/commands/ and automatically load them at startup.
|
|
|
7
7
|
|
|
8
8
|
import importlib.util
|
|
9
9
|
import json
|
|
10
|
+
import os
|
|
11
|
+
import stat
|
|
12
|
+
import subprocess
|
|
10
13
|
import sys
|
|
11
14
|
import tempfile
|
|
12
15
|
from datetime import datetime
|
|
@@ -15,7 +18,7 @@ from typing import Any, Dict, List, Optional
|
|
|
15
18
|
|
|
16
19
|
import click
|
|
17
20
|
|
|
18
|
-
from mcli.lib.logger.logger import get_logger
|
|
21
|
+
from mcli.lib.logger.logger import get_logger, register_subprocess
|
|
19
22
|
from mcli.lib.paths import get_custom_commands_dir
|
|
20
23
|
|
|
21
24
|
logger = get_logger()
|
|
@@ -36,16 +39,20 @@ class CustomCommandManager:
|
|
|
36
39
|
description: str = "",
|
|
37
40
|
group: Optional[str] = None,
|
|
38
41
|
metadata: Optional[Dict[str, Any]] = None,
|
|
42
|
+
language: str = "python",
|
|
43
|
+
shell: Optional[str] = None,
|
|
39
44
|
) -> Path:
|
|
40
45
|
"""
|
|
41
46
|
Save a custom command to the commands directory.
|
|
42
47
|
|
|
43
48
|
Args:
|
|
44
49
|
name: Command name
|
|
45
|
-
code: Python code for the command
|
|
50
|
+
code: Python code or shell script for the command
|
|
46
51
|
description: Command description
|
|
47
52
|
group: Optional command group
|
|
48
53
|
metadata: Additional metadata
|
|
54
|
+
language: Command language ("python" or "shell")
|
|
55
|
+
shell: Shell type for shell commands (bash, zsh, fish, sh)
|
|
49
56
|
|
|
50
57
|
Returns:
|
|
51
58
|
Path to the saved command file
|
|
@@ -55,12 +62,17 @@ class CustomCommandManager:
|
|
|
55
62
|
"code": code,
|
|
56
63
|
"description": description,
|
|
57
64
|
"group": group,
|
|
65
|
+
"language": language,
|
|
58
66
|
"created_at": datetime.utcnow().isoformat() + "Z",
|
|
59
67
|
"updated_at": datetime.utcnow().isoformat() + "Z",
|
|
60
68
|
"version": "1.0",
|
|
61
69
|
"metadata": metadata or {},
|
|
62
70
|
}
|
|
63
71
|
|
|
72
|
+
# Add shell type for shell commands
|
|
73
|
+
if language == "shell":
|
|
74
|
+
command_data["shell"] = shell or os.environ.get("SHELL", "bash").split("/")[-1]
|
|
75
|
+
|
|
64
76
|
# Save as JSON file
|
|
65
77
|
command_file = self.commands_dir / f"{name}.json"
|
|
66
78
|
with open(command_file, "w") as f:
|
|
@@ -307,6 +319,103 @@ class CustomCommandManager:
|
|
|
307
319
|
logger.error(f"Failed to register custom command {name}: {e}")
|
|
308
320
|
return False
|
|
309
321
|
|
|
322
|
+
def register_shell_command_with_click(
|
|
323
|
+
self, command_data: Dict[str, Any], target_group: click.Group
|
|
324
|
+
) -> bool:
|
|
325
|
+
"""
|
|
326
|
+
Dynamically register a shell command with a Click group.
|
|
327
|
+
|
|
328
|
+
Args:
|
|
329
|
+
command_data: Command data dictionary
|
|
330
|
+
target_group: Click group to register the command with
|
|
331
|
+
|
|
332
|
+
Returns:
|
|
333
|
+
True if successful, False otherwise
|
|
334
|
+
"""
|
|
335
|
+
try:
|
|
336
|
+
name = command_data["name"]
|
|
337
|
+
code = command_data["code"]
|
|
338
|
+
shell_type = command_data.get("shell", "bash")
|
|
339
|
+
description = command_data.get("description", "Shell command")
|
|
340
|
+
|
|
341
|
+
# Create a Click command wrapper for the shell script
|
|
342
|
+
def create_shell_command(script_code: str, shell: str, cmd_name: str):
|
|
343
|
+
"""Factory function to create shell command wrapper."""
|
|
344
|
+
|
|
345
|
+
@click.command(name=cmd_name, help=description)
|
|
346
|
+
@click.argument("args", nargs=-1)
|
|
347
|
+
@click.pass_context
|
|
348
|
+
def shell_command(ctx, args):
|
|
349
|
+
"""Execute shell script command."""
|
|
350
|
+
# Create temporary script file
|
|
351
|
+
with tempfile.NamedTemporaryFile(
|
|
352
|
+
mode="w", suffix=".sh", delete=False, prefix=f"mcli_{cmd_name}_"
|
|
353
|
+
) as temp_file:
|
|
354
|
+
# Add shebang if not present
|
|
355
|
+
if not script_code.strip().startswith("#!"):
|
|
356
|
+
temp_file.write(f"#!/usr/bin/env {shell}\n")
|
|
357
|
+
temp_file.write(script_code)
|
|
358
|
+
temp_file_path = temp_file.name
|
|
359
|
+
|
|
360
|
+
try:
|
|
361
|
+
# Make script executable
|
|
362
|
+
os.chmod(temp_file_path, stat.S_IRUSR | stat.S_IWUSR | stat.S_IXUSR)
|
|
363
|
+
|
|
364
|
+
# Execute the shell script
|
|
365
|
+
logger.info(f"Executing shell command: {cmd_name}")
|
|
366
|
+
process = subprocess.Popen(
|
|
367
|
+
[temp_file_path] + list(args),
|
|
368
|
+
stdout=subprocess.PIPE,
|
|
369
|
+
stderr=subprocess.PIPE,
|
|
370
|
+
text=True,
|
|
371
|
+
env={**os.environ, "MCLI_COMMAND": cmd_name},
|
|
372
|
+
)
|
|
373
|
+
|
|
374
|
+
# Register for monitoring
|
|
375
|
+
register_subprocess(process)
|
|
376
|
+
|
|
377
|
+
# Wait and capture output
|
|
378
|
+
stdout, stderr = process.communicate()
|
|
379
|
+
|
|
380
|
+
# Print output
|
|
381
|
+
if stdout:
|
|
382
|
+
click.echo(stdout, nl=False)
|
|
383
|
+
if stderr:
|
|
384
|
+
click.echo(stderr, nl=False, err=True)
|
|
385
|
+
|
|
386
|
+
# Exit with same code as script
|
|
387
|
+
if process.returncode != 0:
|
|
388
|
+
logger.warning(
|
|
389
|
+
f"Shell command {cmd_name} exited with code {process.returncode}"
|
|
390
|
+
)
|
|
391
|
+
ctx.exit(process.returncode)
|
|
392
|
+
|
|
393
|
+
except Exception as e:
|
|
394
|
+
logger.error(f"Failed to execute shell command {cmd_name}: {e}")
|
|
395
|
+
click.echo(f"Error executing shell command: {e}", err=True)
|
|
396
|
+
ctx.exit(1)
|
|
397
|
+
finally:
|
|
398
|
+
# Clean up temporary file
|
|
399
|
+
try:
|
|
400
|
+
Path(temp_file_path).unlink(missing_ok=True)
|
|
401
|
+
except Exception:
|
|
402
|
+
pass
|
|
403
|
+
|
|
404
|
+
return shell_command
|
|
405
|
+
|
|
406
|
+
# Create the command
|
|
407
|
+
command_obj = create_shell_command(code, shell_type, name)
|
|
408
|
+
|
|
409
|
+
# Register with the target group
|
|
410
|
+
target_group.add_command(command_obj, name=name)
|
|
411
|
+
self.loaded_commands[name] = command_obj
|
|
412
|
+
logger.info(f"Registered shell command: {name} (shell: {shell_type})")
|
|
413
|
+
return True
|
|
414
|
+
|
|
415
|
+
except Exception as e:
|
|
416
|
+
logger.error(f"Failed to register shell command {name}: {e}")
|
|
417
|
+
return False
|
|
418
|
+
|
|
310
419
|
def export_commands(self, export_path: Path) -> bool:
|
|
311
420
|
"""
|
|
312
421
|
Export all custom commands to a single JSON file.
|
|
@@ -396,6 +505,7 @@ def load_custom_commands(target_group: click.Group) -> int:
|
|
|
396
505
|
for command_data in commands:
|
|
397
506
|
# Check if command should be nested under a group
|
|
398
507
|
group_name = command_data.get("group")
|
|
508
|
+
language = command_data.get("language", "python")
|
|
399
509
|
|
|
400
510
|
if group_name:
|
|
401
511
|
# Find or create the group
|
|
@@ -414,13 +524,23 @@ def load_custom_commands(target_group: click.Group) -> int:
|
|
|
414
524
|
target_group.add_command(group_cmd)
|
|
415
525
|
logger.info(f"Created command group: {group_name}")
|
|
416
526
|
|
|
417
|
-
# Register the command under the group
|
|
527
|
+
# Register the command under the group based on language
|
|
418
528
|
if isinstance(group_cmd, click.Group):
|
|
419
|
-
if
|
|
529
|
+
if language == "shell":
|
|
530
|
+
success = manager.register_shell_command_with_click(command_data, group_cmd)
|
|
531
|
+
else:
|
|
532
|
+
success = manager.register_command_with_click(command_data, group_cmd)
|
|
533
|
+
|
|
534
|
+
if success:
|
|
420
535
|
loaded_count += 1
|
|
421
536
|
else:
|
|
422
|
-
# Register at top level
|
|
423
|
-
if
|
|
537
|
+
# Register at top level based on language
|
|
538
|
+
if language == "shell":
|
|
539
|
+
success = manager.register_shell_command_with_click(command_data, target_group)
|
|
540
|
+
else:
|
|
541
|
+
success = manager.register_command_with_click(command_data, target_group)
|
|
542
|
+
|
|
543
|
+
if success:
|
|
424
544
|
loaded_count += 1
|
|
425
545
|
|
|
426
546
|
if loaded_count > 0:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: mcli-framework
|
|
3
|
-
Version: 7.
|
|
3
|
+
Version: 7.10.0
|
|
4
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
5
|
Author-email: Luis Fernandez de la Vara <luis@lefv.io>
|
|
6
6
|
Maintainer-email: Luis Fernandez de la Vara <luis@lefv.io>
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
mcli/cli.py,sha256=6KTyXn-pmVkAbCDu59PbiNKBwNra5su31ujFFZ6CBOM,389
|
|
2
2
|
mcli/config.toml,sha256=263yEVvP_W9F2zOLssUBgy7amKaRAFQuBrfxcMhKxaQ,1706
|
|
3
|
-
mcli/app/commands_cmd.py,sha256=
|
|
3
|
+
mcli/app/commands_cmd.py,sha256=H5lEuMTQOE-DKBWIBBbz12LQS40n-fCq_hwWH8uGh3c,63961
|
|
4
4
|
mcli/app/completion_helpers.py,sha256=e62C6w2N-XoD66GYYHgtvKKoD3kYMuIeBBGzVKbuL04,7497
|
|
5
5
|
mcli/app/main.py,sha256=aFQbKMTqClswmwwxpbS5zxVXOXcZMvF27LO19x1X7Cg,19208
|
|
6
|
-
mcli/app/model_cmd.py,sha256=
|
|
6
|
+
mcli/app/model_cmd.py,sha256=LQQD8FaebFoaJGK3u_kt19wZ3HJyo_ecwSMYyC2xIp8,2497
|
|
7
7
|
mcli/app/model/model.py,sha256=EUGu_td-hRlbf4OElkdk1-0p7WyuG7sZmb-Ux2-J9KY,39061
|
|
8
8
|
mcli/app/video/video.py,sha256=3TL8vG3XSKzH_Iyy-IHPZOwNtT7js0VqVVNwIgfDvpk,41910
|
|
9
9
|
mcli/chat/chat.py,sha256=tk4laKe2uSVg9JukacSNTQhCFRlzYbaz1Qdkg8Mu_Bw,102138
|
|
@@ -11,7 +11,7 @@ mcli/chat/command_rag.py,sha256=Ee8usPyRDRYDWpQ79dI7xbxM8Ljxsy_ym_MnL37nPAo,1936
|
|
|
11
11
|
mcli/chat/enhanced_chat.py,sha256=e3odh5klewDHIjfNOyvifLzCdHrysDc2IvNVHzTPIh4,27072
|
|
12
12
|
mcli/chat/system_controller.py,sha256=SuGvnIh2QObvM1DMicF3gGyeBkbz_xXS-hOOHjWx5j4,39114
|
|
13
13
|
mcli/chat/system_integration.py,sha256=xQ11thOUswPg8r1HZkId6U3bTCOtMYngt0-mUYYXpt4,40196
|
|
14
|
-
mcli/lib/custom_commands.py,sha256=
|
|
14
|
+
mcli/lib/custom_commands.py,sha256=FcM-Ng05AB1qLaNltw0bRv2qFDUMUV5jzrmbo6dWeII,19591
|
|
15
15
|
mcli/lib/lib.py,sha256=-CFUfmcubYBxt3LDBY0uj9DF232pz8MPDu-Qg0Ocy8M,850
|
|
16
16
|
mcli/lib/paths.py,sha256=k6sDwvD8QRzBkBOllvXkokameumpTjpJ7pQrP7z1en0,2455
|
|
17
17
|
mcli/lib/api/api.py,sha256=sPgAIYC8Z7AWV2TCBssNSKotbRggBqNLsbfzbjkhmUY,18558
|
|
@@ -215,9 +215,9 @@ mcli/workflow/scheduler/persistence.py,sha256=SU8-F5wTpTercZvTeAXKlGI7gwHyfmYDhX
|
|
|
215
215
|
mcli/workflow/scheduler/scheduler.py,sha256=1Ujq9VgL1rSTCAtshuLA2_sodW6HOj0MEZem7Ga-kic,23351
|
|
216
216
|
mcli/workflow/sync/test_cmd.py,sha256=neVgs9zEnKSxlvzDpFkuCGucqnzjrShm2OvJtHibslg,10009
|
|
217
217
|
mcli/workflow/wakatime/wakatime.py,sha256=sEjsUKa3-XyE8Ni6sAb_D3GAY5jDcA30KknW9YTbLTA,142
|
|
218
|
-
mcli_framework-7.
|
|
219
|
-
mcli_framework-7.
|
|
220
|
-
mcli_framework-7.
|
|
221
|
-
mcli_framework-7.
|
|
222
|
-
mcli_framework-7.
|
|
223
|
-
mcli_framework-7.
|
|
218
|
+
mcli_framework-7.10.0.dist-info/licenses/LICENSE,sha256=sahwAMfrJv2-V66HNPTp7A9UmMjxtyejwTZZoWQvEcI,1075
|
|
219
|
+
mcli_framework-7.10.0.dist-info/METADATA,sha256=c8JMqCuG8rD8u-1eMM4iElNqE-xRy9dA1sHskxI6trY,16419
|
|
220
|
+
mcli_framework-7.10.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
221
|
+
mcli_framework-7.10.0.dist-info/entry_points.txt,sha256=dYrZbDIm-KUPsl1wfv600Kx_8sMy89phMkCihbDRgP8,261
|
|
222
|
+
mcli_framework-7.10.0.dist-info/top_level.txt,sha256=_bnO8J2EUkliWivey_1le0UrnocFKmyVMQjbQ8iVXjc,5
|
|
223
|
+
mcli_framework-7.10.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|