machineconfig 4.7__py3-none-any.whl → 4.8__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 machineconfig might be problematic. Click here for more details.
- machineconfig/cluster/sessions_managers/wt_local_manager.py +15 -6
- machineconfig/scripts/python/devops.py +33 -42
- machineconfig/scripts/python/fire_agents.py +49 -70
- machineconfig/scripts/python/fire_agents_help_launch.py +1 -8
- machineconfig/scripts/python/fire_agents_helper_types.py +12 -0
- machineconfig/scripts/python/fire_jobs.py +0 -6
- machineconfig/scripts/python/fire_jobs_args_helper.py +0 -1
- machineconfig/scripts/python/fire_jobs_layout_helper.py +100 -36
- machineconfig/scripts/python/repos.py +7 -6
- machineconfig/scripts/python/share_terminal.py +6 -4
- machineconfig/setup_linux/web_shortcuts/interactive.sh +1 -1
- machineconfig/setup_windows/web_shortcuts/interactive.ps1 +1 -1
- machineconfig/utils/procs.py +0 -4
- {machineconfig-4.7.dist-info → machineconfig-4.8.dist-info}/METADATA +1 -1
- {machineconfig-4.7.dist-info → machineconfig-4.8.dist-info}/RECORD +18 -19
- {machineconfig-4.7.dist-info → machineconfig-4.8.dist-info}/entry_points.txt +0 -1
- machineconfig/scripts/linux/fire_agents +0 -2
- machineconfig/scripts/linux/programs +0 -21
- {machineconfig-4.7.dist-info → machineconfig-4.8.dist-info}/WHEEL +0 -0
- {machineconfig-4.7.dist-info → machineconfig-4.8.dist-info}/top_level.txt +0 -0
|
@@ -5,10 +5,19 @@ import uuid
|
|
|
5
5
|
import logging
|
|
6
6
|
import subprocess
|
|
7
7
|
from pathlib import Path
|
|
8
|
-
from typing import Optional, Dict, List, Any
|
|
8
|
+
from typing import TypedDict, Optional, Dict, List, Any
|
|
9
9
|
from machineconfig.utils.scheduler import Scheduler
|
|
10
10
|
from machineconfig.cluster.sessions_managers.wt_local import WTLayoutGenerator
|
|
11
11
|
from machineconfig.utils.schemas.layouts.layout_types import LayoutConfig
|
|
12
|
+
from machineconfig.cluster.sessions_managers.zellij_utils.monitoring_types import (
|
|
13
|
+
StartResult, GlobalSummary, ActiveSessionInfo, CommandStatus, CommandSummary
|
|
14
|
+
)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class WTSessionReport(TypedDict):
|
|
18
|
+
session_status: Dict[str, Any] # WT-specific session status
|
|
19
|
+
commands_status: Dict[str, CommandStatus]
|
|
20
|
+
summary: CommandSummary
|
|
12
21
|
|
|
13
22
|
logging.basicConfig(level=logging.INFO)
|
|
14
23
|
logger = logging.getLogger(__name__)
|
|
@@ -44,7 +53,7 @@ class WTLocalManager:
|
|
|
44
53
|
"""Get all managed session names."""
|
|
45
54
|
return [manager.session_name for manager in self.managers if manager.session_name is not None]
|
|
46
55
|
|
|
47
|
-
def start_all_sessions(self) -> Dict[str,
|
|
56
|
+
def start_all_sessions(self) -> Dict[str, StartResult]:
|
|
48
57
|
"""Start all Windows Terminal sessions with their layouts."""
|
|
49
58
|
results = {}
|
|
50
59
|
for manager in self.managers:
|
|
@@ -75,7 +84,7 @@ class WTLocalManager:
|
|
|
75
84
|
|
|
76
85
|
return results
|
|
77
86
|
|
|
78
|
-
def kill_all_sessions(self) -> Dict[str,
|
|
87
|
+
def kill_all_sessions(self) -> Dict[str, StartResult]:
|
|
79
88
|
"""Kill all managed Windows Terminal sessions."""
|
|
80
89
|
results = {}
|
|
81
90
|
for manager in self.managers:
|
|
@@ -119,7 +128,7 @@ class WTLocalManager:
|
|
|
119
128
|
commands.append("")
|
|
120
129
|
return "\n".join(commands)
|
|
121
130
|
|
|
122
|
-
def check_all_sessions_status(self) -> Dict[str,
|
|
131
|
+
def check_all_sessions_status(self) -> Dict[str, WTSessionReport]:
|
|
123
132
|
"""Check the status of all sessions and their commands."""
|
|
124
133
|
status_report = {}
|
|
125
134
|
|
|
@@ -144,7 +153,7 @@ class WTLocalManager:
|
|
|
144
153
|
|
|
145
154
|
return status_report
|
|
146
155
|
|
|
147
|
-
def get_global_summary(self) ->
|
|
156
|
+
def get_global_summary(self) -> GlobalSummary:
|
|
148
157
|
"""Get a global summary across all sessions."""
|
|
149
158
|
all_status = self.check_all_sessions_status()
|
|
150
159
|
|
|
@@ -395,7 +404,7 @@ class WTLocalManager:
|
|
|
395
404
|
logger.error(f"Failed to delete session {session_id}: {e}")
|
|
396
405
|
return False
|
|
397
406
|
|
|
398
|
-
def list_active_sessions(self) -> List[
|
|
407
|
+
def list_active_sessions(self) -> List[ActiveSessionInfo]:
|
|
399
408
|
"""List currently active Windows Terminal sessions managed by this instance."""
|
|
400
409
|
active_sessions = []
|
|
401
410
|
|
|
@@ -1,37 +1,44 @@
|
|
|
1
1
|
"""devops with emojis"""
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
import machineconfig.scripts.python.fire_agents as fire_agents
|
|
4
|
+
import machineconfig.scripts.python.fire_jobs_layout_helper as fire_jobs_layout_helper
|
|
4
5
|
import machineconfig.scripts.python.devops_devapps_install as installer_entry_point
|
|
6
|
+
import machineconfig.scripts.python.share_terminal as share_terminal
|
|
7
|
+
import machineconfig.scripts.python.repos as repos
|
|
5
8
|
|
|
6
|
-
from platform import system
|
|
7
|
-
from rich.console import Console
|
|
8
|
-
from rich.panel import Panel
|
|
9
9
|
import typer
|
|
10
10
|
|
|
11
|
-
console = Console()
|
|
12
11
|
app = typer.Typer(help="🛠️ DevOps operations with emojis", no_args_is_help=True)
|
|
13
12
|
|
|
14
13
|
|
|
15
|
-
|
|
14
|
+
agents_app = typer.Typer(help="🤖 AI Agents management subcommands")
|
|
15
|
+
agents_app.command("create")(fire_agents.create)
|
|
16
|
+
agents_app.command("collect")(fire_agents.collect)
|
|
17
|
+
app.add_typer(agents_app, name="agents")
|
|
18
|
+
|
|
19
|
+
layouts_app = typer.Typer(help="Layouts management subcommands")
|
|
20
|
+
layouts_app.command("launch")(fire_jobs_layout_helper.launch)
|
|
21
|
+
layouts_app.command("load-balance")(fire_jobs_layout_helper.load_balance)
|
|
22
|
+
app.add_typer(layouts_app, name="session")
|
|
23
|
+
|
|
24
|
+
app.command(name="install", help="📦 Install essential packages")(installer_entry_point.main)
|
|
25
|
+
app.command(name="share-terminal", help="📡 Share terminal via web browser")(share_terminal.main)
|
|
26
|
+
app.command(name="repos", help="📁 Manage git repositories")(repos.main)
|
|
27
|
+
|
|
28
|
+
ssh_app = typer.Typer(help="🔐 SSH operations subcommands", no_args_is_help=True)
|
|
29
|
+
app.add_typer(ssh_app, name="ssh")
|
|
16
30
|
|
|
17
31
|
|
|
18
32
|
@app.command()
|
|
19
33
|
def update():
|
|
20
34
|
"""🔄 UPDATE essential repos"""
|
|
21
|
-
console.print(Panel("🔄 Updating essential repositories...", width=BOX_WIDTH, border_style="blue"))
|
|
22
35
|
import machineconfig.scripts.python.devops_update_repos as helper
|
|
23
36
|
helper.main()
|
|
24
37
|
|
|
25
38
|
|
|
26
|
-
app.command(name="install", help="📦 Install essential packages")(installer_entry_point.main)
|
|
27
|
-
app.command(name="share-terminal", help="📡 Share terminal via web browser")(share_terminal_main)
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
39
|
@app.command()
|
|
32
40
|
def symlinks():
|
|
33
41
|
"""🔗 SYMLINKS of dotfiles."""
|
|
34
|
-
console.print(Panel("🔗 Setting up symlinks, PATH, and shell profile...", width=BOX_WIDTH, border_style="blue"))
|
|
35
42
|
import machineconfig.profile.create as helper
|
|
36
43
|
helper.main_symlinks()
|
|
37
44
|
|
|
@@ -39,7 +46,6 @@ def symlinks():
|
|
|
39
46
|
@app.command()
|
|
40
47
|
def profile():
|
|
41
48
|
"""🔗 Update shell profile."""
|
|
42
|
-
console.print(Panel("🔗 Setting up symlinks, PATH, and shell profile...", width=BOX_WIDTH, border_style="blue"))
|
|
43
49
|
import machineconfig.profile.create as helper
|
|
44
50
|
helper.main_profile()
|
|
45
51
|
|
|
@@ -47,48 +53,35 @@ def profile():
|
|
|
47
53
|
@app.command()
|
|
48
54
|
def symlinks_new():
|
|
49
55
|
"""🆕 SYMLINKS new"""
|
|
50
|
-
console.print(Panel("🔄 Creating new symlinks...", width=BOX_WIDTH, border_style="blue"))
|
|
51
56
|
import machineconfig.jobs.python.python_ve_symlink as helper
|
|
52
57
|
helper.main()
|
|
53
58
|
|
|
54
59
|
|
|
55
|
-
@
|
|
56
|
-
def
|
|
60
|
+
@ssh_app.command()
|
|
61
|
+
def add_key():
|
|
57
62
|
"""🔑 SSH add pub key to this machine"""
|
|
58
|
-
console.print(Panel("🔑 Adding public SSH key to this machine...", width=BOX_WIDTH, border_style="blue"))
|
|
59
63
|
import machineconfig.scripts.python.devops_add_ssh_key as helper
|
|
60
64
|
helper.main()
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
@app.command()
|
|
64
|
-
def ssh_add_identity():
|
|
65
|
+
@ssh_app.command()
|
|
66
|
+
def add_identity():
|
|
65
67
|
"""🗝️ SSH add identity (private key) to this machine"""
|
|
66
|
-
console.print(Panel("🗝️ Adding SSH identity (private key) to this machine...", width=BOX_WIDTH, border_style="blue"))
|
|
67
68
|
import machineconfig.scripts.python.devops_add_identity as helper
|
|
68
69
|
helper.main()
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
@app.command()
|
|
72
|
-
def ssh_connect():
|
|
70
|
+
@ssh_app.command()
|
|
71
|
+
def connect():
|
|
73
72
|
"""🔐 SSH use key pair to connect two machines"""
|
|
74
|
-
console.print(Panel("❌ ERROR: Not Implemented\nSSH key pair connection feature is not yet implemented", title_align="left", border_style="red", width=BOX_WIDTH))
|
|
75
73
|
raise NotImplementedError
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
@app.command()
|
|
79
|
-
def ssh_setup():
|
|
74
|
+
@ssh_app.command()
|
|
75
|
+
def setup():
|
|
80
76
|
"""📡 SSH setup"""
|
|
81
|
-
console.print(Panel("📡 Setting up SSH...", width=BOX_WIDTH, border_style="blue"))
|
|
82
77
|
_program_windows = """Invoke-WebRequest https://raw.githubusercontent.com/thisismygitrepo/machineconfig/main/src/machineconfig/setup_windows/openssh_all.ps1 | Invoke-Expression # https://github.com/thisismygitrepo.keys"""
|
|
83
78
|
_program_linux = """curl https://raw.githubusercontent.com/thisismygitrepo/machineconfig/main/src/machineconfig/setup_linux/openssh_all.sh | sudo bash # https://github.com/thisismygitrepo.keys"""
|
|
84
79
|
import subprocess
|
|
80
|
+
from platform import system
|
|
85
81
|
subprocess.run(_program_linux if system() == "Linux" else _program_windows, shell=True, check=True)
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
@app.command()
|
|
89
|
-
def ssh_setup_wsl():
|
|
82
|
+
@ssh_app.command()
|
|
83
|
+
def setup_wsl():
|
|
90
84
|
"""🐧 SSH setup wsl"""
|
|
91
|
-
console.print(Panel("🐧 Setting up SSH for WSL...", width=BOX_WIDTH, border_style="blue"))
|
|
92
85
|
import subprocess
|
|
93
86
|
subprocess.run("curl https://raw.githubusercontent.com/thisismygitrepo/machineconfig/main/src/machineconfig/setup_linux/openssh_wsl.sh | sudo bash", shell=True, check=True)
|
|
94
87
|
|
|
@@ -96,7 +89,6 @@ def ssh_setup_wsl():
|
|
|
96
89
|
@app.command()
|
|
97
90
|
def backup():
|
|
98
91
|
"""💾 BACKUP"""
|
|
99
|
-
console.print(Panel("💾 Creating backup...", width=BOX_WIDTH, border_style="blue"))
|
|
100
92
|
from machineconfig.scripts.python.devops_backup_retrieve import main_backup_retrieve
|
|
101
93
|
main_backup_retrieve(direction="BACKUP")
|
|
102
94
|
|
|
@@ -104,7 +96,6 @@ def backup():
|
|
|
104
96
|
@app.command()
|
|
105
97
|
def retrieve():
|
|
106
98
|
"""📥 RETRIEVE"""
|
|
107
|
-
console.print(Panel("📥 Retrieving backup...", width=BOX_WIDTH, border_style="blue"))
|
|
108
99
|
from machineconfig.scripts.python.devops_backup_retrieve import main_backup_retrieve
|
|
109
100
|
main_backup_retrieve(direction="RETRIEVE")
|
|
110
101
|
|
|
@@ -112,16 +103,16 @@ def retrieve():
|
|
|
112
103
|
@app.command()
|
|
113
104
|
def scheduler():
|
|
114
105
|
"""⏰ SCHEDULER"""
|
|
115
|
-
console.print(Panel("⏰ Setting up scheduler...", width=BOX_WIDTH, border_style="blue"))
|
|
116
106
|
# from machineconfig.scripts.python.scheduler import main as helper
|
|
117
107
|
# helper()
|
|
118
108
|
|
|
119
|
-
@app.command(
|
|
109
|
+
@app.command()
|
|
120
110
|
def interactive():
|
|
121
111
|
"""🤖 INTERACTIVE configuration of machine."""
|
|
122
112
|
from machineconfig.scripts.python.interactive import main
|
|
123
113
|
main()
|
|
124
114
|
|
|
125
115
|
|
|
116
|
+
|
|
126
117
|
if __name__ == "__main__":
|
|
127
118
|
pass
|
|
@@ -1,35 +1,11 @@
|
|
|
1
1
|
"""Utilitfrom pathlib import Path
|
|
2
|
-
from typing import cast, get_args, Iterable, Optional, TypeAlias, Literal
|
|
3
|
-
import json
|
|
4
|
-
import typer
|
|
5
|
-
|
|
6
|
-
from machineconfig.scripts.python.fire_agents_help_launch import prep_agent_launch, get_agents_launch_layout, AGENTS
|
|
7
|
-
from machineconfig.scripts.python.fire_agents_help_search import search_files_by_pattern, search_python_files
|
|
8
|
-
from machineconfig.scripts.python.fire_agents_load_balancer import chunk_prompts
|
|
9
|
-
from machineconfig.utils.accessories import get_repo_rootch multiple AI agent prompts in a Zellij session.
|
|
10
2
|
|
|
11
|
-
Improved design notes:
|
|
12
|
-
* Clear separation of: input collection, prompt preparation, agent launch.
|
|
13
|
-
* Configurable max agent cap (default 15) with interactive confirmation if exceeded.
|
|
14
|
-
* Added type aliases + docstrings for maintainability.
|
|
15
|
-
* Preserves original core behavior & command generation for each agent type.
|
|
16
3
|
"""
|
|
17
4
|
|
|
18
5
|
from pathlib import Path
|
|
19
|
-
from typing import cast, Iterable, Optional,
|
|
20
|
-
import json
|
|
21
|
-
import time
|
|
6
|
+
from typing import cast, Iterable, Optional, get_args
|
|
22
7
|
import typer
|
|
23
|
-
|
|
24
|
-
from machineconfig.scripts.python.fire_agents_help_launch import prep_agent_launch, get_agents_launch_layout, AGENTS
|
|
25
|
-
from machineconfig.scripts.python.fire_agents_help_search import search_files_by_pattern, search_python_files
|
|
26
|
-
from machineconfig.scripts.python.fire_agents_load_balancer import chunk_prompts
|
|
27
|
-
from machineconfig.utils.schemas.layouts.layout_types import LayoutsFile
|
|
28
|
-
from machineconfig.utils.accessories import get_repo_root, randstr
|
|
29
|
-
|
|
30
|
-
SEARCH_STRATEGIES: TypeAlias = Literal["file_path", "keyword_search", "filename_pattern"]
|
|
31
|
-
|
|
32
|
-
app = typer.Typer()
|
|
8
|
+
from machineconfig.scripts.python.fire_agents_helper_types import AGENTS
|
|
33
9
|
|
|
34
10
|
|
|
35
11
|
def _write_list_file(target: Path, files: Iterable[Path]) -> None:
|
|
@@ -37,7 +13,6 @@ def _write_list_file(target: Path, files: Iterable[Path]) -> None:
|
|
|
37
13
|
target.write_text("\n".join(str(f) for f in files), encoding="utf-8")
|
|
38
14
|
|
|
39
15
|
|
|
40
|
-
@app.command()
|
|
41
16
|
def create(
|
|
42
17
|
context_path: Optional[Path] = typer.Option(None, help="Path to the context file"),
|
|
43
18
|
keyword_search: Optional[str] = typer.Option(None, help="Keyword to search in Python files"),
|
|
@@ -52,6 +27,13 @@ def create(
|
|
|
52
27
|
output_path: Optional[Path] = typer.Option(None, help="Path to write the layout.json file"),
|
|
53
28
|
agents_dir: Optional[Path] = typer.Option(None, help="Directory to store agent files. If not provided, will be constructed automatically."),
|
|
54
29
|
):
|
|
30
|
+
|
|
31
|
+
from machineconfig.scripts.python.fire_agents_help_launch import prep_agent_launch, get_agents_launch_layout
|
|
32
|
+
from machineconfig.scripts.python.fire_agents_help_search import search_files_by_pattern, search_python_files
|
|
33
|
+
from machineconfig.scripts.python.fire_agents_load_balancer import chunk_prompts
|
|
34
|
+
from machineconfig.utils.accessories import get_repo_root, randstr
|
|
35
|
+
import json
|
|
36
|
+
|
|
55
37
|
# validate mutual exclusive
|
|
56
38
|
context_options = [context_path, keyword_search, filename_pattern]
|
|
57
39
|
provided_context = [opt for opt in context_options if opt is not None]
|
|
@@ -131,48 +113,6 @@ fire_agents create --context-path "{prompt_material_path}" \\
|
|
|
131
113
|
typer.echo(f"Ceated layout in {layout_output_path}")
|
|
132
114
|
|
|
133
115
|
|
|
134
|
-
@app.command()
|
|
135
|
-
def run(layout_path: Path = typer.Argument(..., help="Path to the layout.json file"),
|
|
136
|
-
max_tabs: int = typer.Option(6, help="Maximum number of tabs to launch"),
|
|
137
|
-
sleep_inbetween: float = typer.Option(1.0, help="Sleep time in seconds between launching layouts"),
|
|
138
|
-
kill_upon_completion: bool = typer.Option(False, help="Kill the layout sessions upon completion")):
|
|
139
|
-
layoutfile: LayoutsFile = json.loads(layout_path.read_text())
|
|
140
|
-
for a_layout in layoutfile["layouts"]:
|
|
141
|
-
if len(a_layout["layoutTabs"]) > max_tabs:
|
|
142
|
-
typer.echo(f"Layout '{a_layout.get('layoutName', 'Unnamed')}' has {len(a_layout['layoutTabs'])} tabs which exceeds the max of {max_tabs}.")
|
|
143
|
-
confirm = typer.confirm("Do you want to proceed with launching this layout?", default=False)
|
|
144
|
-
if not confirm:
|
|
145
|
-
typer.echo("Aborting launch.")
|
|
146
|
-
raise typer.Exit(0)
|
|
147
|
-
from machineconfig.cluster.sessions_managers.zellij_local_manager import ZellijLocalManager
|
|
148
|
-
for i, a_layouts in enumerate(layoutfile["layouts"]):
|
|
149
|
-
manager = ZellijLocalManager(session_layouts=[a_layouts])
|
|
150
|
-
manager.start_all_sessions(poll_interval=2, poll_seconds=2)
|
|
151
|
-
manager.run_monitoring_routine(wait_ms=2000)
|
|
152
|
-
if kill_upon_completion:
|
|
153
|
-
manager.kill_all_sessions()
|
|
154
|
-
if i < len(layoutfile["layouts"]) - 1: # Don't sleep after the last layout
|
|
155
|
-
time.sleep(sleep_inbetween)
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
@app.command(help="Adjust layout file to limit max tabs per layout, etc.")
|
|
159
|
-
def load_balance(layout_path: Path = typer.Argument(..., help="Path to the layout.json file"),
|
|
160
|
-
max_thresh: int = typer.Option(..., help="Maximum tabs per layout"),
|
|
161
|
-
thresh_type: Literal['number', 'weight'] = typer.Option(..., help="Threshold type"),
|
|
162
|
-
breaking_method: Literal['moreLayouts', 'combineTabs'] = typer.Option(..., help="Breaking method"),
|
|
163
|
-
output_path: Optional[Path] = typer.Option(None, help="Path to write the adjusted layout.json file")):
|
|
164
|
-
layoutfile: LayoutsFile = json.loads(layout_path.read_text())
|
|
165
|
-
layout_configs = layoutfile["layouts"]
|
|
166
|
-
from machineconfig.cluster.sessions_managers.utils.load_balancer import limit_tab_num
|
|
167
|
-
new_layouts = limit_tab_num(layout_configs=layout_configs, max_thresh=max_thresh, threshold_type=thresh_type, breaking_method=breaking_method)
|
|
168
|
-
layoutfile["layouts"] = new_layouts
|
|
169
|
-
target_file = output_path if output_path is not None else layout_path.parent / f'{layout_path.stem}_adjusted_{max_thresh}_{thresh_type}_{breaking_method}.json'
|
|
170
|
-
target_file.parent.mkdir(parents=True, exist_ok=True)
|
|
171
|
-
target_file.write_text(data=json.dumps(layoutfile, indent=4), encoding="utf-8")
|
|
172
|
-
typer.echo(f"Adjusted layout saved to {target_file}")
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
@app.command()
|
|
176
116
|
def collect(
|
|
177
117
|
agent_dir: Path = typer.Argument(..., help="Path to the agent directory containing the prompts folder"),
|
|
178
118
|
output_path: Path = typer.Argument(..., help="Path to write the concatenated material files"),
|
|
@@ -214,5 +154,44 @@ def collect(
|
|
|
214
154
|
typer.echo(f"Concatenated material written to {output_path}")
|
|
215
155
|
|
|
216
156
|
|
|
157
|
+
def template():
|
|
158
|
+
template_bash = """#!/bin/bash
|
|
159
|
+
JOB_NAME="outpatient_mapping"
|
|
160
|
+
REPO_ROOT="$HOME/code/work/winter_planning/"
|
|
161
|
+
CONTEXT_PATH="$REPO_ROOT/data/outpatient_mapping/op_services_collected.csv"
|
|
162
|
+
PROMPT_PATH="$REPO_ROOT/data/outpatient_mapping/prompt"
|
|
163
|
+
|
|
164
|
+
AGENTS_DIR="$REPO_ROOT/.ai/agents/$JOB_NAME"
|
|
165
|
+
LAYOUT_PATH="$REPO_ROOT/.ai/agents/$JOB_NAME/layout_unbalanced.json"
|
|
166
|
+
LAYOUT_BALANCED_PATH="$REPO_ROOT/.ai/agents/$JOB_NAME/layout_balanced.json"
|
|
167
|
+
|
|
168
|
+
fire_agents create --context-path $CONTEXT_PATH --tasks-per-prompt 10 --agent crush --prompt-path $PROMPT_PATH --keep-separate --output-path $LAYOUT_PATH --agents-dir $AGENTS_DIR
|
|
169
|
+
fire_agents load-balance $LAYOUT_PATH --max-thresh 6 --breaking-method moreLayouts --thresh-type number --output-path $LAYOUT_BALANCED_PATH
|
|
170
|
+
|
|
171
|
+
fire_agents run $LAYOUT_BALANCED_PATH --kill-upon-completion
|
|
172
|
+
fire_agents collect $AGENTS_DIR "$REPO_ROOT/.ai/agents/$JOB_NAME/collected.txt"
|
|
173
|
+
"""
|
|
174
|
+
template_powershell = """
|
|
175
|
+
|
|
176
|
+
"""
|
|
177
|
+
from platform import system
|
|
178
|
+
if system() == "Linux":
|
|
179
|
+
template = template_bash
|
|
180
|
+
elif system() == "Windows":
|
|
181
|
+
template = template_powershell
|
|
182
|
+
else:
|
|
183
|
+
raise typer.BadParameter(f"Unsupported OS: {system()}")
|
|
184
|
+
|
|
185
|
+
from machineconfig.utils.accessories import get_repo_root
|
|
186
|
+
repo_root = get_repo_root(Path.cwd())
|
|
187
|
+
if repo_root is None:
|
|
188
|
+
typer.echo("💥 Could not determine the repository root. Please run this script from within a git repository.")
|
|
189
|
+
raise typer.Exit(1)
|
|
190
|
+
save_path = repo_root / ".ai" / "agents" / "template_fire_agents.sh"
|
|
191
|
+
save_path.parent.mkdir(parents=True, exist_ok=True)
|
|
192
|
+
save_path.write_text(template, encoding="utf-8")
|
|
193
|
+
typer.echo(f"Template bash script written to {save_path}")
|
|
194
|
+
|
|
195
|
+
|
|
217
196
|
if __name__ == "__main__": # pragma: no cover
|
|
218
|
-
|
|
197
|
+
pass
|
|
@@ -2,14 +2,7 @@
|
|
|
2
2
|
import random
|
|
3
3
|
import shlex
|
|
4
4
|
from pathlib import Path
|
|
5
|
-
from
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
AGENTS: TypeAlias = Literal[
|
|
9
|
-
"cursor-agent", "gemini", "crush", "q"
|
|
10
|
-
# warp terminal
|
|
11
|
-
]
|
|
12
|
-
AGENT_NAME_FORMATTER = "agent_{idx}_cmd.sh" # e.g., agent_0_cmd.sh
|
|
5
|
+
from machineconfig.scripts.python.fire_agents_helper_types import AGENTS, AGENT_NAME_FORMATTER
|
|
13
6
|
|
|
14
7
|
|
|
15
8
|
def get_gemini_api_keys() -> list[str]:
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
|
|
2
|
+
from typing import Literal, TypeAlias
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
AGENTS: TypeAlias = Literal[
|
|
6
|
+
"cursor-agent", "gemini", "crush", "q"
|
|
7
|
+
# warp terminal
|
|
8
|
+
]
|
|
9
|
+
AGENT_NAME_FORMATTER = "agent_{idx}_cmd.sh" # e.g., agent_0_cmd.sh
|
|
10
|
+
|
|
11
|
+
SEARCH_STRATEGIES: TypeAlias = Literal["file_path", "keyword_search", "filename_pattern"]
|
|
12
|
+
|
|
@@ -26,10 +26,6 @@ import typer
|
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
def route(args: FireJobArgs, fire_args: str = "") -> None:
|
|
29
|
-
if args.layout:
|
|
30
|
-
from machineconfig.scripts.python.fire_jobs_layout_helper import handle_layout_args
|
|
31
|
-
return handle_layout_args(args.path, args.function)
|
|
32
|
-
|
|
33
29
|
path_obj = sanitize_path(args.path)
|
|
34
30
|
if not path_obj.exists():
|
|
35
31
|
suffixes = {".py", ".sh", ".ps1"}
|
|
@@ -348,7 +344,6 @@ def main(
|
|
|
348
344
|
Nprocess: Annotated[int, typer.Option("--Nprocess", "-p", help="Number of processes to use")] = 1,
|
|
349
345
|
zellij_tab: Annotated[Optional[str], typer.Option("--zellij_tab", "-z", help="Open in a new zellij tab")] = None,
|
|
350
346
|
watch: Annotated[bool, typer.Option("--watch", "-w", help="Watch the file for changes")] = False,
|
|
351
|
-
layout: Annotated[bool, typer.Option("--layout", "-L", help="Use layout configuration (Zellij Or WindowsTerminal)")] = False,
|
|
352
347
|
) -> None:
|
|
353
348
|
"""Main function to process fire jobs arguments."""
|
|
354
349
|
|
|
@@ -377,7 +372,6 @@ def main(
|
|
|
377
372
|
Nprocess=Nprocess,
|
|
378
373
|
zellij_tab=zellij_tab,
|
|
379
374
|
watch=watch,
|
|
380
|
-
layout=layout,
|
|
381
375
|
)
|
|
382
376
|
try:
|
|
383
377
|
route(args, fire_args)
|
|
@@ -1,30 +1,45 @@
|
|
|
1
|
+
|
|
1
2
|
from pathlib import Path
|
|
2
|
-
from
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
from typing import Optional, Literal
|
|
4
|
+
import typer
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
def load_balance(layout_path: Path = typer.Argument(..., help="Path to the layout.json file"),
|
|
8
|
+
max_thresh: int = typer.Option(..., help="Maximum tabs per layout"),
|
|
9
|
+
thresh_type: Literal['number', 'weight'] = typer.Option(..., help="Threshold type"),
|
|
10
|
+
breaking_method: Literal['moreLayouts', 'combineTabs'] = typer.Option(..., help="Breaking method"),
|
|
11
|
+
output_path: Optional[Path] = typer.Option(None, help="Path to write the adjusted layout.json file")):
|
|
12
|
+
"""Adjust layout file to limit max tabs per layout, etc."""
|
|
13
|
+
from machineconfig.utils.schemas.layouts.layout_types import LayoutsFile
|
|
14
|
+
import json
|
|
15
|
+
layoutfile: LayoutsFile = json.loads(layout_path.read_text())
|
|
16
|
+
layout_configs = layoutfile["layouts"]
|
|
17
|
+
from machineconfig.cluster.sessions_managers.utils.load_balancer import limit_tab_num
|
|
18
|
+
new_layouts = limit_tab_num(layout_configs=layout_configs, max_thresh=max_thresh, threshold_type=thresh_type, breaking_method=breaking_method)
|
|
19
|
+
layoutfile["layouts"] = new_layouts
|
|
20
|
+
target_file = output_path if output_path is not None else layout_path.parent / f'{layout_path.stem}_adjusted_{max_thresh}_{thresh_type}_{breaking_method}.json'
|
|
21
|
+
target_file.parent.mkdir(parents=True, exist_ok=True)
|
|
22
|
+
target_file.write_text(data=json.dumps(layoutfile, indent=4), encoding="utf-8")
|
|
23
|
+
typer.echo(f"Adjusted layout saved to {target_file}")
|
|
8
24
|
|
|
9
25
|
|
|
10
|
-
def select_layout(layouts_json_file: Path,
|
|
26
|
+
def select_layout(layouts_json_file: Path, selected_layouts_names: Optional[list[str]], select_interactively: bool) -> list["LayoutConfig"]:
|
|
11
27
|
import json
|
|
28
|
+
from machineconfig.utils.options import choose_from_options
|
|
29
|
+
from machineconfig.utils.schemas.layouts.layout_types import LayoutConfig, LayoutsFile
|
|
12
30
|
layout_file: LayoutsFile = json.loads(layouts_json_file.read_text(encoding="utf-8"))
|
|
13
31
|
if len(layout_file["layouts"]) == 0:
|
|
14
32
|
raise ValueError(f"No layouts found in {layouts_json_file}")
|
|
15
|
-
if
|
|
33
|
+
if selected_layouts_names is None: # choose all, or interactively
|
|
34
|
+
if not select_interactively:
|
|
35
|
+
return layout_file["layouts"]
|
|
16
36
|
options = [layout["layoutName"] for layout in layout_file["layouts"]]
|
|
17
37
|
from machineconfig.utils.options import choose_from_options
|
|
18
|
-
|
|
19
|
-
print(f"Selected layout(s): {
|
|
20
|
-
#
|
|
21
|
-
# if layout_chosen is None:
|
|
22
|
-
# layout_chosen = next((layout for layout in layout_file["layouts"] if layout["layoutName"].lower() == layouts_name.lower()), None)
|
|
23
|
-
# if layout_chosen is None:
|
|
24
|
-
# available_layouts = [layout["layoutName"] for layout in layout_file["layouts"]]
|
|
25
|
-
# raise ValueError(f"Layout '{layouts_name}' not found. Available layouts: {available_layouts}")
|
|
38
|
+
selected_layouts_names = choose_from_options(multi=True, options=options, prompt="Choose a layout configuration:", fzf=True, msg="Choose one option")
|
|
39
|
+
print(f"Selected layout(s): {selected_layouts_names}")
|
|
40
|
+
# Extract the configs from the names:
|
|
26
41
|
layouts_chosen: list[LayoutConfig] = []
|
|
27
|
-
for name in
|
|
42
|
+
for name in selected_layouts_names:
|
|
28
43
|
layout_chosen = next((layout for layout in layout_file["layouts"] if layout["layoutName"] == name), None)
|
|
29
44
|
if layout_chosen is None:
|
|
30
45
|
layout_chosen = next((layout for layout in layout_file["layouts"] if layout["layoutName"].lower() == name.lower()), None)
|
|
@@ -35,23 +50,11 @@ def select_layout(layouts_json_file: Path, layouts_name: Optional[list[str]]) ->
|
|
|
35
50
|
return layouts_chosen
|
|
36
51
|
|
|
37
52
|
|
|
38
|
-
def
|
|
39
|
-
import
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
run_zellij_layout(layout_config=layout_config)
|
|
44
|
-
elif platform.system() == "Windows":
|
|
45
|
-
print("🧑💻 Launching layout using Windows Terminal...")
|
|
46
|
-
from machineconfig.cluster.sessions_managers.wt_local import run_wt_layout
|
|
47
|
-
|
|
48
|
-
run_wt_layout(layout_config=layout_config)
|
|
49
|
-
else:
|
|
50
|
-
print(f"❌ Unsupported platform: {platform.system()}")
|
|
51
|
-
return None
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
def handle_layout_args(layout_path: str, layouts: Optional[str]) -> None:
|
|
53
|
+
def handle_layout_args(layout_path: str, select_layouts: Optional[str], select_interactively: bool) -> list["LayoutConfig"]:
|
|
54
|
+
from machineconfig.utils.path_extended import PathExtended
|
|
55
|
+
from machineconfig.scripts.python.helpers.helpers4 import search_for_files_of_interest
|
|
56
|
+
from machineconfig.utils.options import choose_from_options
|
|
57
|
+
from machineconfig.utils.path_helper import match_file_name, sanitize_path
|
|
55
58
|
path_obj = sanitize_path(layout_path)
|
|
56
59
|
if not path_obj.exists():
|
|
57
60
|
choice_file = match_file_name(sub_string=layout_path, search_root=PathExtended.cwd(), suffixes={".json"})
|
|
@@ -63,5 +66,66 @@ def handle_layout_args(layout_path: str, layouts: Optional[str]) -> None:
|
|
|
63
66
|
choice_file = PathExtended(choice_file)
|
|
64
67
|
else:
|
|
65
68
|
choice_file = path_obj
|
|
66
|
-
|
|
67
|
-
|
|
69
|
+
selected_layouts = select_layout(layouts_json_file=choice_file, selected_layouts_names=select_layouts.split(",") if select_layouts else None, select_interactively=select_interactively)
|
|
70
|
+
return selected_layouts
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
def launch(layout_path: str = typer.Argument(..., help="Path to the layout.json file"),
|
|
74
|
+
max_tabs: int = typer.Option(10, help="A Sanity checker that throws an error if any layout exceeds the maximum number of tabs to launch."),
|
|
75
|
+
max_layouts: int = typer.Option(10, help="A Sanity checker that throws an error if the total number of layouts exceeds this number."),
|
|
76
|
+
sleep_inbetween: float = typer.Option(1.0, help="Sleep time in seconds between launching layouts"),
|
|
77
|
+
monitor: bool = typer.Option(False, help="Monitor the layout sessions for completion"),
|
|
78
|
+
parallel: bool = typer.Option(False, help="Launch multiple layouts in parallel"),
|
|
79
|
+
kill_upon_completion: bool = typer.Option(False, help="Kill session(s) upon completion (only relevant if monitor flag is set)"),
|
|
80
|
+
select: Optional[str] = typer.Option(None, help="Comma separated names of layouts to be selected from the layout file passed"),
|
|
81
|
+
select_interactively: bool = typer.Option(False, help="Select layouts interactively")
|
|
82
|
+
):
|
|
83
|
+
"""
|
|
84
|
+
"""
|
|
85
|
+
layouts_selected = handle_layout_args(layout_path=layout_path, select_layouts=select, select_interactively=select_interactively)
|
|
86
|
+
|
|
87
|
+
# ============= Basic sanity checks =============
|
|
88
|
+
if len(layouts_selected) > max_layouts:
|
|
89
|
+
raise ValueError(f"Number of layouts {len(layouts_selected)} exceeds the maximum allowed {max_layouts}. Please adjust your layout file.")
|
|
90
|
+
for a_layout in layouts_selected:
|
|
91
|
+
if len(a_layout["layoutTabs"]) > max_tabs:
|
|
92
|
+
typer.echo(f"Layout '{a_layout.get('layoutName', 'Unnamed')}' has {len(a_layout['layoutTabs'])} tabs which exceeds the max of {max_tabs}.")
|
|
93
|
+
confirm = typer.confirm("Do you want to proceed with launching this layout?", default=False)
|
|
94
|
+
if not confirm:
|
|
95
|
+
typer.echo("Aborting launch.")
|
|
96
|
+
raise typer.Exit(0)
|
|
97
|
+
|
|
98
|
+
import time
|
|
99
|
+
import platform
|
|
100
|
+
if platform.system() == "Linux" or platform.system() == "Darwin":
|
|
101
|
+
from machineconfig.cluster.sessions_managers.zellij_local_manager import ZellijLocalManager
|
|
102
|
+
if not parallel: iterable = [[item] for item in layouts_selected]
|
|
103
|
+
else: iterable = [layouts_selected]
|
|
104
|
+
for i, a_layouts in enumerate(iterable):
|
|
105
|
+
manager = ZellijLocalManager(session_layouts=a_layouts)
|
|
106
|
+
manager.start_all_sessions(poll_interval=2, poll_seconds=2)
|
|
107
|
+
if monitor:
|
|
108
|
+
manager.run_monitoring_routine(wait_ms=2000)
|
|
109
|
+
if kill_upon_completion:
|
|
110
|
+
manager.kill_all_sessions()
|
|
111
|
+
if i < len(layouts_selected) - 1: # Don't sleep after the last layout
|
|
112
|
+
time.sleep(sleep_inbetween)
|
|
113
|
+
elif platform.system() == "Windows":
|
|
114
|
+
from machineconfig.cluster.sessions_managers.wt_local_manager import WTLocalManager
|
|
115
|
+
if not parallel: iterable = [[item] for item in layouts_selected]
|
|
116
|
+
else: iterable = [layouts_selected]
|
|
117
|
+
for i, a_layouts in enumerate(iterable):
|
|
118
|
+
manager = WTLocalManager(session_layouts=a_layouts)
|
|
119
|
+
manager.start_all_sessions()
|
|
120
|
+
if monitor:
|
|
121
|
+
manager.run_monitoring_routine(wait_ms=2000)
|
|
122
|
+
if kill_upon_completion:
|
|
123
|
+
manager.kill_all_sessions()
|
|
124
|
+
if i < len(layouts_selected) - 1: # Don't sleep after the last layout
|
|
125
|
+
time.sleep(sleep_inbetween)
|
|
126
|
+
else:
|
|
127
|
+
print(f"❌ Unsupported platform: {platform.system()}")
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
if __name__ == "__main__":
|
|
131
|
+
from machineconfig.utils.schemas.layouts.layout_types import LayoutConfig
|
|
@@ -5,12 +5,6 @@ in the event that username@github.com is not mentioned in the remote url.
|
|
|
5
5
|
|
|
6
6
|
"""
|
|
7
7
|
|
|
8
|
-
from machineconfig.utils.io import read_ini
|
|
9
|
-
from machineconfig.utils.source_of_truth import CONFIG_PATH, DEFAULTS_PATH
|
|
10
|
-
from machineconfig.utils.path_extended import PathExtended as PathExtended
|
|
11
|
-
from machineconfig.scripts.python.repos_helper_record import main as record_repos
|
|
12
|
-
from machineconfig.scripts.python.repos_helper_clone import clone_repos
|
|
13
|
-
from machineconfig.scripts.python.repos_helper_action import perform_git_operations
|
|
14
8
|
|
|
15
9
|
import typer
|
|
16
10
|
from typing import Annotated, Optional
|
|
@@ -34,6 +28,13 @@ def main(
|
|
|
34
28
|
print("📂 Welcome to the Repository Manager")
|
|
35
29
|
print("=" * 50 + "\n")
|
|
36
30
|
|
|
31
|
+
from machineconfig.utils.io import read_ini
|
|
32
|
+
from machineconfig.utils.source_of_truth import CONFIG_PATH, DEFAULTS_PATH
|
|
33
|
+
from machineconfig.utils.path_extended import PathExtended as PathExtended
|
|
34
|
+
from machineconfig.scripts.python.repos_helper_record import main as record_repos
|
|
35
|
+
from machineconfig.scripts.python.repos_helper_clone import clone_repos
|
|
36
|
+
from machineconfig.scripts.python.repos_helper_action import perform_git_operations
|
|
37
|
+
|
|
37
38
|
if directory == "":
|
|
38
39
|
repos_root = PathExtended.home().joinpath("code") # it is a positional argument, can never be empty.
|
|
39
40
|
else:
|
|
@@ -3,10 +3,7 @@
|
|
|
3
3
|
from pathlib import Path
|
|
4
4
|
from typing import Optional, Annotated
|
|
5
5
|
import typer
|
|
6
|
-
|
|
7
|
-
from rich.panel import Panel
|
|
8
|
-
from rich.text import Text
|
|
9
|
-
from rich.align import Align
|
|
6
|
+
|
|
10
7
|
|
|
11
8
|
|
|
12
9
|
"""
|
|
@@ -21,6 +18,11 @@ reference:
|
|
|
21
18
|
|
|
22
19
|
def display_terminal_url(local_ip_v4: str, port: int, protocol: str = "http") -> None:
|
|
23
20
|
"""Display a flashy, unmissable terminal URL announcement."""
|
|
21
|
+
|
|
22
|
+
from rich.console import Console
|
|
23
|
+
from rich.panel import Panel
|
|
24
|
+
from rich.text import Text
|
|
25
|
+
from rich.align import Align
|
|
24
26
|
console = Console()
|
|
25
27
|
|
|
26
28
|
# Create the main message with styling
|
|
@@ -6,4 +6,4 @@ echo """
|
|
|
6
6
|
======================================================================="""
|
|
7
7
|
|
|
8
8
|
curl https://raw.githubusercontent.com/thisismygitrepo/machineconfig/main/src/machineconfig/setup_linux/ve.sh | bash
|
|
9
|
-
$HOME/.local/bin/uv run --python 3.13 --with machineconfig devops
|
|
9
|
+
$HOME/.local/bin/uv run --python 3.13 --with machineconfig devops interactive
|
machineconfig/utils/procs.py
CHANGED
|
@@ -58,10 +58,8 @@ class ProcessManager:
|
|
|
58
58
|
title = "📊 INITIALIZING PROCESS MANAGER"
|
|
59
59
|
console.print(Panel(title, title="[bold blue]Process Info[/bold blue]", border_style="blue"))
|
|
60
60
|
process_info = []
|
|
61
|
-
|
|
62
61
|
with Progress(SpinnerColumn(), TextColumn("[progress.description]{task.description}")) as progress:
|
|
63
62
|
progress.add_task("🔍 Reading system processes...", total=None)
|
|
64
|
-
|
|
65
63
|
for proc in psutil.process_iter():
|
|
66
64
|
try:
|
|
67
65
|
mem_usage_mb = proc.memory_info().rss / (1024 * 1024)
|
|
@@ -162,7 +160,6 @@ class ProcessManager:
|
|
|
162
160
|
console.print(Panel("", title="[bold blue]Process Info[/bold blue]", border_style="blue"))
|
|
163
161
|
|
|
164
162
|
def kill(self, names: Optional[list[str]] = None, pids: Optional[list[int]] = None, commands: Optional[list[str]] = None):
|
|
165
|
-
# header for process termination
|
|
166
163
|
title = "💀 PROCESS TERMINATION"
|
|
167
164
|
console.print(Panel(title, title="[bold blue]Process Info[/bold blue]", border_style="blue"))
|
|
168
165
|
if names is None and pids is None and commands is None:
|
|
@@ -241,7 +238,6 @@ def get_age(create_time: Any) -> str:
|
|
|
241
238
|
|
|
242
239
|
def main():
|
|
243
240
|
from machineconfig.utils.procs import ProcessManager
|
|
244
|
-
|
|
245
241
|
ProcessManager().choose_and_kill()
|
|
246
242
|
|
|
247
243
|
|
|
@@ -12,7 +12,7 @@ machineconfig/cluster/remote/script_execution.py,sha256=4U70FDtjOh6A6C2Ei-Xh90S8
|
|
|
12
12
|
machineconfig/cluster/remote/script_notify_upon_completion.py,sha256=GRxnnbnOl1-hTovTN-zI_M9wdV7x293yA77_mou9I1o,2032
|
|
13
13
|
machineconfig/cluster/sessions_managers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
14
14
|
machineconfig/cluster/sessions_managers/wt_local.py,sha256=-e4yNxvu6ytI-u1Kihhtn_wd_qNKZMzN_WrZ9ab1qYA,18220
|
|
15
|
-
machineconfig/cluster/sessions_managers/wt_local_manager.py,sha256=
|
|
15
|
+
machineconfig/cluster/sessions_managers/wt_local_manager.py,sha256=BaJNOOY5rAfssreJm8Nmr4we_PCxMkmQqzUMdimNwaM,24565
|
|
16
16
|
machineconfig/cluster/sessions_managers/wt_remote.py,sha256=XmZV9rLubwxND5UYAS15mAcpzDdXvm4KyubVGYkVBmo,8743
|
|
17
17
|
machineconfig/cluster/sessions_managers/wt_remote_manager.py,sha256=CnnOtPiwLx0pIfs_KlcKnclLSqiDTNzfm8t8sW6nXf0,19764
|
|
18
18
|
machineconfig/cluster/sessions_managers/zellij_local.py,sha256=T2wXkW9ug1nzdnhlD-1G2HPlBpBaNw6rdM9rk4KKeHQ,26137
|
|
@@ -112,7 +112,6 @@ machineconfig/scripts/linux/cloud_sync,sha256=Tf5yr9D5Ca5tiIpbUBE3QDqZF22tsh32Xe
|
|
|
112
112
|
machineconfig/scripts/linux/croshell,sha256=UZWGufTwtzCllRXrQ14YwCuAEZs--a1lJBW_kuNLhYg,100
|
|
113
113
|
machineconfig/scripts/linux/devops,sha256=hQGs_cuu19dxeTB3CqZTJ6miZDwugfwh4NgrSlhWtOg,96
|
|
114
114
|
machineconfig/scripts/linux/fire,sha256=BXc8arF2ViX1YmY3DdqNGTh76tXfCuys2SrFLPO2GFg,94
|
|
115
|
-
machineconfig/scripts/linux/fire_agents,sha256=xB33C8weH0-l-3iuFyPR9wuGwDtSnBZIiAxuajAm5Os,102
|
|
116
115
|
machineconfig/scripts/linux/ftpx,sha256=wTZparnibEm3TTgc6gQyG6ZkngZm4cxOZVkYMDh5Zyg,95
|
|
117
116
|
machineconfig/scripts/linux/fzf2g,sha256=YK_YLmxCm6zms24ytylgoUHnvWqq8oTdRTiskzDClS0,831
|
|
118
117
|
machineconfig/scripts/linux/fzfag,sha256=x0rX7vM_YjKLZ822D2Xh0HdaTj5kR_gG3g_5_w6ring,679
|
|
@@ -126,7 +125,6 @@ machineconfig/scripts/linux/mount_drive,sha256=zemKofv7hOmRN_V3qK0q580GkfWw3Vdik
|
|
|
126
125
|
machineconfig/scripts/linux/mount_nfs,sha256=kpIbAse3igReEGgnXngez2ytWucLwmb_xo6e6KeO_rs,1870
|
|
127
126
|
machineconfig/scripts/linux/mount_nw_drive,sha256=pNzHc7yZn5YIzn2BkpKvd5530PqbestkzrdoXaChyqY,2338
|
|
128
127
|
machineconfig/scripts/linux/mount_smb,sha256=7UN5EP1kuxYL_-CnyaH4f9Wuu2CgALDZpJ0mPcdvCiY,94
|
|
129
|
-
machineconfig/scripts/linux/programs,sha256=KlKTLhreJ0CRHvtm61ilOtVm8VUia7gb0zWD1IP6rNY,472
|
|
130
128
|
machineconfig/scripts/linux/repos,sha256=1qbmIemZjkjcPmiL1Bp8pD46E83OXsR5EJ0XQt29Bhc,96
|
|
131
129
|
machineconfig/scripts/linux/scheduler,sha256=Z9Wu0N9vWRbi4FoRbpcc4ydq4bVaDjZOXESR35ZN0rI,100
|
|
132
130
|
machineconfig/scripts/linux/share_cloud.sh,sha256=75IzCm7Nob1wO-zlfaNyPPod1IjAsVCG5lcMFdXmiI4,3010
|
|
@@ -148,20 +146,21 @@ machineconfig/scripts/python/cloud_mount.py,sha256=RFMzRUep2D5HtVXANIi-pab3EkI-W
|
|
|
148
146
|
machineconfig/scripts/python/cloud_repo_sync.py,sha256=GBhdUu9BJwhLYmhxxtvqJGLy7xKdQcnH9kkL4jcbzEE,9502
|
|
149
147
|
machineconfig/scripts/python/cloud_sync.py,sha256=RWGpAfJ9fnN18yNBSgN44dzA38Hmd4879JL5r2pcyrM,3514
|
|
150
148
|
machineconfig/scripts/python/croshell.py,sha256=shv0FmFfD2Br0EVE-zvpt4i5Tl8kliLlIvxkx0umGiA,8954
|
|
151
|
-
machineconfig/scripts/python/devops.py,sha256=
|
|
149
|
+
machineconfig/scripts/python/devops.py,sha256=WMO5VLPkKZ38OAZCfhh_NvPv58HPh1TbhN7ZrQmN2Xs,4043
|
|
152
150
|
machineconfig/scripts/python/devops_add_identity.py,sha256=JfN3ZrYMCgmt4ks_VCfnV9BIIHAsOYO3E0W0wZ15FR8,3791
|
|
153
151
|
machineconfig/scripts/python/devops_add_ssh_key.py,sha256=KaoX83KltBsmutfKhSfZjd7nP_R1hJ2OLAWRhbswO7o,6889
|
|
154
152
|
machineconfig/scripts/python/devops_backup_retrieve.py,sha256=jZe5Vki7E2GCMG8hvqUZeOONFC4cNzISoGzq_dMG4GA,5601
|
|
155
153
|
machineconfig/scripts/python/devops_devapps_install.py,sha256=QbRQhNdDRLLtgJwaRl2pbLmWvajb1b_Xte2ql8N3JRs,9096
|
|
156
154
|
machineconfig/scripts/python/devops_update_repos.py,sha256=c5qBc9cuTGDEqDHufkjDT4d_vvJsswv3tlqk9MAulYk,8063
|
|
157
155
|
machineconfig/scripts/python/dotfile.py,sha256=SRcX-9Ak1jRvF-killBTTm2IWcsNxfiLucH6ZsytAFA,2202
|
|
158
|
-
machineconfig/scripts/python/fire_agents.py,sha256=
|
|
159
|
-
machineconfig/scripts/python/fire_agents_help_launch.py,sha256=
|
|
156
|
+
machineconfig/scripts/python/fire_agents.py,sha256=aLxwM8o3Tpe4nYpNdnEvG8WVdplE3_tfnDECIXONzAg,9579
|
|
157
|
+
machineconfig/scripts/python/fire_agents_help_launch.py,sha256=1ymWiszfjCyPv3ofinWzfOmbzLEt3d7ntac_afLh-V4,5017
|
|
160
158
|
machineconfig/scripts/python/fire_agents_help_search.py,sha256=qIfSS_su2YJ1Gb0_lu4cbjlJlYMBw0v52NTGiSrGjk8,2991
|
|
159
|
+
machineconfig/scripts/python/fire_agents_helper_types.py,sha256=zKu8Vr6iucaGSkCm_Tkt_WrYU7-6Nript3coYyzTXzY,295
|
|
161
160
|
machineconfig/scripts/python/fire_agents_load_balancer.py,sha256=mpqx3uaQdBXYieuvhdK-qsvLepf9oIMo3pwPj9mSEDI,1079
|
|
162
|
-
machineconfig/scripts/python/fire_jobs.py,sha256=
|
|
163
|
-
machineconfig/scripts/python/fire_jobs_args_helper.py,sha256=
|
|
164
|
-
machineconfig/scripts/python/fire_jobs_layout_helper.py,sha256=
|
|
161
|
+
machineconfig/scripts/python/fire_jobs.py,sha256=7R4CO7wGRkG6akPLK6SMHr82_RdIeXIJNicCAdgh1ok,20262
|
|
162
|
+
machineconfig/scripts/python/fire_jobs_args_helper.py,sha256=5zqnYvBjXSLFUqMHg5fgI62YnDu7CpVC4RLmXUKpI2I,2050
|
|
163
|
+
machineconfig/scripts/python/fire_jobs_layout_helper.py,sha256=u0VssrTXOzH7km89yaL1K8T5DF83LRyllj1E_30N9ZQ,8083
|
|
165
164
|
machineconfig/scripts/python/fire_jobs_streamlit_helper.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
166
165
|
machineconfig/scripts/python/ftpx.py,sha256=l_gdJS0QB2wVZErubtZvm4HJD9HZAJxSP68sbY73xwo,10278
|
|
167
166
|
machineconfig/scripts/python/get_zellij_cmd.py,sha256=e35-18hoXM9N3PFbvbizfkNY_-63iMicieWE3TbGcCQ,576
|
|
@@ -172,13 +171,13 @@ machineconfig/scripts/python/mount_nw_drive.py,sha256=iru6AtnTyvyuk6WxlK5R4lDkul
|
|
|
172
171
|
machineconfig/scripts/python/mount_ssh.py,sha256=rGY2pgtlnWMi0Rrge1aCdjtfbULrj2cyaStDoX-y2w4,2236
|
|
173
172
|
machineconfig/scripts/python/onetimeshare.py,sha256=bmGsNnskym5OWfIhpOfZG5jq3m89FS0a6dF5Sb8LaZM,2539
|
|
174
173
|
machineconfig/scripts/python/pomodoro.py,sha256=SPkfeoZGv8rylGiOyzQ7UK3aXZ3G2FIOuGkSuBUggOI,2019
|
|
175
|
-
machineconfig/scripts/python/repos.py,sha256=
|
|
174
|
+
machineconfig/scripts/python/repos.py,sha256=8NWNUCZKMjs_C36P2FpVhj3_11CsbdASqaAc-VCOYQo,4226
|
|
176
175
|
machineconfig/scripts/python/repos_helper_action.py,sha256=f0vFjPj9WEA361961ux3SIEg9riVGHtyuf6BnO6lnvU,13336
|
|
177
176
|
machineconfig/scripts/python/repos_helper_clone.py,sha256=xW5YZEoNt3k7h9NIULhUhOnh53-B63eiXF2FjOl1IKQ,5535
|
|
178
177
|
machineconfig/scripts/python/repos_helper_record.py,sha256=YEEQORfEiLddOIIgePo5eEkyQUFruFg3kc8npMvRL-o,10927
|
|
179
178
|
machineconfig/scripts/python/repos_helper_update.py,sha256=AYyKIB7eQ48yoYmFjydIhRI1lV39TBv_S4_LCa-oKuQ,11042
|
|
180
179
|
machineconfig/scripts/python/scheduler.py,sha256=rKhssuxkD697EY6qaV6CSdNhxpAQLDWO4fE8GMCQ9FA,3061
|
|
181
|
-
machineconfig/scripts/python/share_terminal.py,sha256=
|
|
180
|
+
machineconfig/scripts/python/share_terminal.py,sha256=biuG35YiknTMVr3Mzs4bBZwEq53JcuBRlzMTp6eY90M,5009
|
|
182
181
|
machineconfig/scripts/python/snapshot.py,sha256=aDvKeoniZaeTSNv9zWBUajaj2yagAxVdfuvO1_tgq5Y,1026
|
|
183
182
|
machineconfig/scripts/python/start_slidev.py,sha256=U5ujAL7R5Gd5CzFReTsnF2SThjY91aFBg0Qz_MMl6U4,4573
|
|
184
183
|
machineconfig/scripts/python/start_terminals.py,sha256=DRWbMZumhPmL0DvvsCsbRNFL5AVQn1SgaziafTio3YQ,6149
|
|
@@ -364,7 +363,7 @@ machineconfig/setup_linux/others/openssh-server_add_pub_key.sh,sha256=UiJcD1o4Ue
|
|
|
364
363
|
machineconfig/setup_linux/web_shortcuts/android.sh,sha256=gzep6bBhK7FCBvGcXK0fdJCtkSfBOftt0aFyDZq_eMs,68
|
|
365
364
|
machineconfig/setup_linux/web_shortcuts/ascii_art.sh,sha256=RWcxH_Db7WHH37PclYmc92o6zAS557wGZxcYTuyTUZ0,3550
|
|
366
365
|
machineconfig/setup_linux/web_shortcuts/croshell.sh,sha256=X9-B1cVptbaFWaWTA-2ELNQx_2ktxu7ZVe48RvpCmkU,316
|
|
367
|
-
machineconfig/setup_linux/web_shortcuts/interactive.sh,sha256=
|
|
366
|
+
machineconfig/setup_linux/web_shortcuts/interactive.sh,sha256=3bQr-0Gtly7lx6LPXtCUCs49jiCCozv3T1idHK678EY,463
|
|
368
367
|
machineconfig/setup_linux/web_shortcuts/ssh.sh,sha256=k6BAY-zAWsi1beOMiZODxw4VOjZCTABZu__gxSET1eU,1924
|
|
369
368
|
machineconfig/setup_windows/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
370
369
|
machineconfig/setup_windows/others/docker.ps1,sha256=M8NfsSxH8YlmY92J4rSe1xWOwTW8IFrdgb8cI8Riu2E,311
|
|
@@ -372,7 +371,7 @@ machineconfig/setup_windows/others/obs.ps1,sha256=2andchcXpxS3rqZjGaMpY5VShxTAKW
|
|
|
372
371
|
machineconfig/setup_windows/web_shortcuts/all.ps1,sha256=L03JJ4Jua_bzgtF3kuDOkuQ-Nqaj_ZcV3CFEkCHD1WI,908
|
|
373
372
|
machineconfig/setup_windows/web_shortcuts/ascii_art.ps1,sha256=pUVTtgKHOdgaK3hxz7JoMZzTyQ7vm2RfE_OJgB7e4cw,1270
|
|
374
373
|
machineconfig/setup_windows/web_shortcuts/croshell.ps1,sha256=cTQnegGLGYhuFY3YuuAj2ortN__adA2dznk2E737h4A,644
|
|
375
|
-
machineconfig/setup_windows/web_shortcuts/interactive.ps1,sha256
|
|
374
|
+
machineconfig/setup_windows/web_shortcuts/interactive.ps1,sha256=-76toOluRnxtgo6NuAHgHWMnZQT3zroeCBBLkMTd13g,522
|
|
376
375
|
machineconfig/setup_windows/web_shortcuts/ssh.ps1,sha256=Tj9axEugJE7I3AQ0w1eUGLPb8ufME5jvU5S7VUjlLJE,424
|
|
377
376
|
machineconfig/setup_windows/wt_and_pwsh/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
378
377
|
machineconfig/setup_windows/wt_and_pwsh/set_wt_settings.py,sha256=rZZJamy3YxAeJhdMIFR6IWtjgn1u1HUdbk1J24NtryE,6116
|
|
@@ -386,7 +385,7 @@ machineconfig/utils/notifications.py,sha256=vvdsY5IX6XEiILTnt5lNyHxhCi0ljdGX2T_6
|
|
|
386
385
|
machineconfig/utils/options.py,sha256=8pG-apcc28xxJ5BQiACsGNTKwWtkQyH3hCtzBEhokK8,8366
|
|
387
386
|
machineconfig/utils/path_extended.py,sha256=nTETtTxzNaxdrapIH3WzkR__b-1k6Lx7SpRAXqmIJN4,51793
|
|
388
387
|
machineconfig/utils/path_helper.py,sha256=jqOf3TAlw5cqSp4HBAlOqjAR_bzC8_fvjA-_-CooI6Y,8030
|
|
389
|
-
machineconfig/utils/procs.py,sha256=
|
|
388
|
+
machineconfig/utils/procs.py,sha256=Bm-yopmj19yiBO9tywJHEcs9rZmeRyJqbgTSe216LTU,11349
|
|
390
389
|
machineconfig/utils/scheduler.py,sha256=bUHDviS_HE9_6LaA1k9Nnfz5rr2FJIfrk5qO2FJ-oUs,15119
|
|
391
390
|
machineconfig/utils/scheduling.py,sha256=RF1iXJpqf4Dg18jdZWtBixz97KAHC6VKYqTFSpdLWuc,11188
|
|
392
391
|
machineconfig/utils/source_of_truth.py,sha256=GnjcVkKm11RyZFHGnPbne5YDEBYoZ5yryBNkpfGC7O4,854
|
|
@@ -406,8 +405,8 @@ machineconfig/utils/schemas/fire_agents/fire_agents_input.py,sha256=pTxvLzIpD5RF
|
|
|
406
405
|
machineconfig/utils/schemas/installer/installer_types.py,sha256=DLagmIe0G5-xg7HZ9VrlFCDk1gIbwvX7O4gZjwq0wh0,1326
|
|
407
406
|
machineconfig/utils/schemas/layouts/layout_types.py,sha256=TcqlZdGVoH8htG5fHn1KWXhRdPueAcoyApppZsPAPto,2020
|
|
408
407
|
machineconfig/utils/schemas/repos/repos_types.py,sha256=ECVr-3IVIo8yjmYmVXX2mnDDN1SLSwvQIhx4KDDQHBQ,405
|
|
409
|
-
machineconfig-4.
|
|
410
|
-
machineconfig-4.
|
|
411
|
-
machineconfig-4.
|
|
412
|
-
machineconfig-4.
|
|
413
|
-
machineconfig-4.
|
|
408
|
+
machineconfig-4.8.dist-info/METADATA,sha256=U8vakfUTP6B1G5zxfxbaOXsqmyxo43_pNfhlnUscClM,7060
|
|
409
|
+
machineconfig-4.8.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
410
|
+
machineconfig-4.8.dist-info/entry_points.txt,sha256=BhKeN0HFu7k3izf4f-Xp95tU3wGAr-TJrCuxDnfUwWo,1006
|
|
411
|
+
machineconfig-4.8.dist-info/top_level.txt,sha256=porRtB8qms8fOIUJgK-tO83_FeH6Bpe12oUVC670teA,14
|
|
412
|
+
machineconfig-4.8.dist-info/RECORD,,
|
|
@@ -7,7 +7,6 @@ cloud_sync = machineconfig.scripts.python.cloud_sync:arg_parser
|
|
|
7
7
|
croshell = machineconfig.scripts.python.croshell:arg_parser
|
|
8
8
|
devops = machineconfig.scripts.python.devops:app
|
|
9
9
|
fire = machineconfig.scripts.python.fire_jobs:main_from_parser
|
|
10
|
-
fire_agents = machineconfig.scripts.python.fire_agents:app
|
|
11
10
|
ftpx = machineconfig.scripts.python.ftpx:main_from_parser
|
|
12
11
|
initai = machineconfig.scripts.python.ai.initai:main
|
|
13
12
|
kill_process = machineconfig.utils.procs:main
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
|
|
3
|
-
# Save the current directory
|
|
4
|
-
original_dir=$(pwd)
|
|
5
|
-
|
|
6
|
-
# Navigate to the directory
|
|
7
|
-
cd ~/code/machineconfig/src/machineconfig/scripts/linux/others
|
|
8
|
-
|
|
9
|
-
# List all files and pipe the output to fzf for user selection
|
|
10
|
-
selected_file=$(ls | fzf)
|
|
11
|
-
|
|
12
|
-
# Check if a file was selected
|
|
13
|
-
if [ -n "$selected_file" ]; then
|
|
14
|
-
# Source the selected file
|
|
15
|
-
source "$selected_file"
|
|
16
|
-
else
|
|
17
|
-
echo "No file selected."
|
|
18
|
-
fi
|
|
19
|
-
|
|
20
|
-
# Change back to the original directory
|
|
21
|
-
cd "$original_dir"
|
|
File without changes
|
|
File without changes
|