machineconfig 5.64__py3-none-any.whl → 5.66__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.

Files changed (32) hide show
  1. machineconfig/scripts/python/agents.py +12 -48
  2. machineconfig/scripts/python/ai/generate_files.py +197 -42
  3. machineconfig/scripts/python/croshell.py +5 -5
  4. machineconfig/scripts/python/devops_helpers/cli_config.py +1 -1
  5. machineconfig/scripts/python/devops_helpers/cli_self.py +3 -3
  6. machineconfig/scripts/python/devops_navigator.py +1 -890
  7. machineconfig/scripts/python/entry.py +17 -12
  8. machineconfig/scripts/python/fire_jobs.py +4 -4
  9. machineconfig/scripts/python/ftpx.py +4 -4
  10. machineconfig/scripts/python/helper_navigator/__init__.py +20 -0
  11. machineconfig/scripts/python/helper_navigator/command_builder.py +111 -0
  12. machineconfig/scripts/python/helper_navigator/command_detail.py +44 -0
  13. machineconfig/scripts/python/helper_navigator/command_tree.py +470 -0
  14. machineconfig/scripts/python/helper_navigator/data_models.py +28 -0
  15. machineconfig/scripts/python/helper_navigator/main_app.py +262 -0
  16. machineconfig/scripts/python/helper_navigator/search_bar.py +15 -0
  17. machineconfig/scripts/python/helpers_fire/template.sh +1 -0
  18. machineconfig/scripts/python/interactive.py +2 -2
  19. machineconfig/scripts/python/nw/mount_nfs +1 -1
  20. machineconfig/scripts/python/repos_helpers/count_lines_frontend.py +1 -1
  21. machineconfig/scripts/python/sessions.py +1 -1
  22. machineconfig/scripts/windows/mounts/mount_ssh.ps1 +1 -1
  23. machineconfig/setup_linux/web_shortcuts/interactive.sh +7 -7
  24. machineconfig/setup_windows/web_shortcuts/interactive.ps1 +7 -7
  25. machineconfig/utils/ssh.py +2 -2
  26. {machineconfig-5.64.dist-info → machineconfig-5.66.dist-info}/METADATA +1 -2
  27. {machineconfig-5.64.dist-info → machineconfig-5.66.dist-info}/RECORD +30 -24
  28. machineconfig-5.66.dist-info/entry_points.txt +9 -0
  29. machineconfig/utils/ai/generate_file_checklist.py +0 -68
  30. machineconfig-5.64.dist-info/entry_points.txt +0 -9
  31. {machineconfig-5.64.dist-info → machineconfig-5.66.dist-info}/WHEEL +0 -0
  32. {machineconfig-5.64.dist-info → machineconfig-5.66.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,470 @@
1
+ """
2
+ Command tree widget for displaying command hierarchy.
3
+ """
4
+
5
+ from textual.widgets import Tree
6
+ from machineconfig.scripts.python.helper_navigator.data_models import CommandInfo
7
+
8
+
9
+ class CommandTree(Tree[CommandInfo]):
10
+ """Tree widget for displaying command hierarchy."""
11
+
12
+ def on_mount(self) -> None:
13
+ """Build the command tree when mounted."""
14
+ self.show_root = False
15
+ self.guide_depth = 2
16
+ self._build_command_tree()
17
+
18
+ def _build_command_tree(self) -> None:
19
+ """Build the hierarchical command structure."""
20
+
21
+ # Main entry points
22
+ devops_node = self.root.add("🛠️ devops - DevOps operations", data=CommandInfo(
23
+ name="devops",
24
+ description="DevOps operations",
25
+ command="devops",
26
+ is_group=True,
27
+ module_path="machineconfig.scripts.python.devops"
28
+ ))
29
+
30
+ # devops subcommands
31
+ devops_node.add("📦 install - Install essential packages", data=CommandInfo(
32
+ name="install",
33
+ description="Install essential packages",
34
+ command="devops install",
35
+ parent="devops",
36
+ help_text="devops install --which <packages> --group <group> --interactive"
37
+ ))
38
+
39
+ repos_node = devops_node.add("📁 repos - Manage git repositories", data=CommandInfo(
40
+ name="repos",
41
+ description="Manage git repositories",
42
+ command="devops repos",
43
+ parent="devops",
44
+ is_group=True,
45
+ module_path="machineconfig.scripts.python.devops_helpers.cli_repos"
46
+ ))
47
+
48
+ # repos subcommands
49
+ repos_node.add("🚀 push - Push changes across repositories", data=CommandInfo(
50
+ name="push",
51
+ description="Push changes across repositories",
52
+ command="devops repos push",
53
+ parent="repos",
54
+ help_text="devops repos push --directory <dir> --recursive --no-sync"
55
+ ))
56
+
57
+ repos_node.add("⬇️ pull - Pull changes across repositories", data=CommandInfo(
58
+ name="pull",
59
+ description="Pull changes across repositories",
60
+ command="devops repos pull",
61
+ parent="repos",
62
+ help_text="devops repos pull --directory <dir> --recursive --no-sync"
63
+ ))
64
+
65
+ repos_node.add("💾 commit - Commit changes across repositories", data=CommandInfo(
66
+ name="commit",
67
+ description="Commit changes across repositories",
68
+ command="devops repos commit",
69
+ parent="repos",
70
+ help_text="devops repos commit --directory <dir> --recursive --no-sync"
71
+ ))
72
+
73
+ repos_node.add("🔄 sync - Sync changes across repositories", data=CommandInfo(
74
+ name="sync",
75
+ description="Pull, commit, and push changes across repositories",
76
+ command="devops repos sync",
77
+ parent="repos",
78
+ help_text="devops repos sync --directory <dir> --recursive --no-sync"
79
+ ))
80
+
81
+ mirror_node = repos_node.add("🔄 mirror - Manage repository specifications", data=CommandInfo(
82
+ name="mirror",
83
+ description="Manage repository specifications and syncing",
84
+ command="devops repos mirror",
85
+ parent="repos",
86
+ is_group=True
87
+ ))
88
+
89
+ mirror_node.add("📝 capture - Record repositories into repos.json", data=CommandInfo(
90
+ name="capture",
91
+ description="Record repositories into a repos.json specification",
92
+ command="devops repos mirror capture",
93
+ parent="mirror",
94
+ help_text="devops repos mirror capture --directory <dir> --cloud <cloud>"
95
+ ))
96
+
97
+ mirror_node.add("📥 clone - Clone repositories from repos.json", data=CommandInfo(
98
+ name="clone",
99
+ description="Clone repositories described by repos.json",
100
+ command="devops repos mirror clone",
101
+ parent="mirror",
102
+ help_text="devops repos mirror clone --directory <dir> --cloud <cloud>"
103
+ ))
104
+
105
+ mirror_node.add("🔀 checkout-to-commit - Check out specific commits", data=CommandInfo(
106
+ name="checkout-to-commit",
107
+ description="Check out specific commits listed in specification",
108
+ command="devops repos mirror checkout-to-commit",
109
+ parent="mirror",
110
+ help_text="devops repos mirror checkout-to-commit --directory <dir> --cloud <cloud>"
111
+ ))
112
+
113
+ mirror_node.add("🔀 checkout-to-branch - Check out to main branch", data=CommandInfo(
114
+ name="checkout-to-branch",
115
+ description="Check out to the main branch defined in specification",
116
+ command="devops repos mirror checkout-to-branch",
117
+ parent="mirror",
118
+ help_text="devops repos mirror checkout-to-branch --directory <dir> --cloud <cloud>"
119
+ ))
120
+
121
+ repos_node.add("🔍 analyze - Analyze repositories", data=CommandInfo(
122
+ name="analyze",
123
+ description="Analyze repositories in directory",
124
+ command="devops repos analyze",
125
+ parent="repos",
126
+ help_text="devops repos analyze --directory <dir>"
127
+ ))
128
+
129
+ repos_node.add("🔐 secure - Securely sync git repository", data=CommandInfo(
130
+ name="secure",
131
+ description="Securely sync git repository to/from cloud with encryption",
132
+ command="devops repos secure",
133
+ parent="repos",
134
+ help_text="devops repos secure <path> --cloud <cloud> --encrypt --decrypt"
135
+ ))
136
+
137
+ repos_node.add("🎬 viz - Visualize repository activity", data=CommandInfo(
138
+ name="viz",
139
+ description="Visualize repository activity using Gource",
140
+ command="devops repos viz",
141
+ parent="repos",
142
+ help_text="devops repos viz --repo <path> --output <file> --resolution <res> --seconds-per-day <spd>"
143
+ ))
144
+
145
+ repos_node.add("🧹 cleanup - Clean repository directories", data=CommandInfo(
146
+ name="cleanup",
147
+ description="Clean repository directories from cache files",
148
+ command="devops repos cleanup",
149
+ parent="repos",
150
+ help_text="devops repos cleanup --repo <path> --recursive"
151
+ ))
152
+
153
+ # config subcommands
154
+ config_node = devops_node.add("⚙️ config - Configuration management", data=CommandInfo(
155
+ name="config",
156
+ description="Configuration subcommands",
157
+ command="devops config",
158
+ parent="devops",
159
+ is_group=True
160
+ ))
161
+
162
+ config_node.add("🔗 private - Manage private configuration files", data=CommandInfo(
163
+ name="private",
164
+ description="Manage private configuration files",
165
+ command="devops config private",
166
+ parent="config",
167
+ help_text="devops config private --method <symlink|copy> --on-conflict <action> --which <items> --interactive"
168
+ ))
169
+
170
+ config_node.add("🔗 public - Manage public configuration files", data=CommandInfo(
171
+ name="public",
172
+ description="Manage public configuration files",
173
+ command="devops config public",
174
+ parent="config",
175
+ help_text="devops config public --method <symlink|copy> --on-conflict <action> --which <items> --interactive"
176
+ ))
177
+
178
+ config_node.add("🔗 dotfile - Manage dotfiles", data=CommandInfo(
179
+ name="dotfile",
180
+ description="Manage dotfiles",
181
+ command="devops config dotfile",
182
+ parent="config",
183
+ help_text="devops config dotfile <file> --overwrite --dest <destination>"
184
+ ))
185
+
186
+ config_node.add("🔗 shell - Configure shell profile", data=CommandInfo(
187
+ name="shell",
188
+ description="Configure your shell profile",
189
+ command="devops config shell",
190
+ parent="config",
191
+ help_text="devops config shell <copy|reference>"
192
+ ))
193
+
194
+ config_node.add("🔗 pwsh_theme - Configure PowerShell theme", data=CommandInfo(
195
+ name="pwsh_theme",
196
+ description="Configure your PowerShell theme",
197
+ command="devops config pwsh_theme",
198
+ parent="config",
199
+ help_text="devops config pwsh_theme"
200
+ ))
201
+
202
+ # data subcommands
203
+ data_node = devops_node.add("💾 data - Data operations", data=CommandInfo(
204
+ name="data",
205
+ description="Data subcommands",
206
+ command="devops data",
207
+ parent="devops",
208
+ is_group=True
209
+ ))
210
+
211
+ data_node.add("💾 backup - Backup data", data=CommandInfo(
212
+ name="backup",
213
+ description="Backup data",
214
+ command="devops data backup",
215
+ parent="data",
216
+ help_text="devops data backup"
217
+ ))
218
+
219
+ data_node.add("📥 retrieve - Retrieve data", data=CommandInfo(
220
+ name="retrieve",
221
+ description="Retrieve data from backup",
222
+ command="devops data retrieve",
223
+ parent="data",
224
+ help_text="devops data retrieve"
225
+ ))
226
+
227
+ # network subcommands
228
+ network_node = devops_node.add("🔐 network - Network operations", data=CommandInfo(
229
+ name="network",
230
+ description="Network subcommands",
231
+ command="devops network",
232
+ parent="devops",
233
+ is_group=True
234
+ ))
235
+
236
+ network_node.add("📡 share-terminal - Share terminal via web", data=CommandInfo(
237
+ name="share-terminal",
238
+ description="Share terminal via web browser",
239
+ command="devops network share-terminal",
240
+ parent="network",
241
+ help_text="devops network share-terminal"
242
+ ))
243
+
244
+ network_node.add("� install_ssh_server - Install SSH server", data=CommandInfo(
245
+ name="install_ssh_server",
246
+ description="Install SSH server",
247
+ command="devops network install_ssh_server",
248
+ parent="network",
249
+ help_text="devops network install_ssh_server"
250
+ ))
251
+
252
+ network_node.add("� add_ssh_key - Add SSH public key", data=CommandInfo(
253
+ name="add_ssh_key",
254
+ description="Add SSH public key to this machine",
255
+ command="devops network add_ssh_key",
256
+ parent="network",
257
+ help_text="devops network add_ssh_key --path <file> --choose --value --github <username>"
258
+ ))
259
+
260
+ network_node.add("�️ add_ssh_identity - Add SSH identity", data=CommandInfo(
261
+ name="add_ssh_identity",
262
+ description="Add SSH identity (private key) to this machine",
263
+ command="devops network add_ssh_identity",
264
+ parent="network",
265
+ help_text="devops network add_ssh_identity"
266
+ ))
267
+
268
+ # self subcommands
269
+ self_node = devops_node.add("🔄 self - SELF operations", data=CommandInfo(
270
+ name="self",
271
+ description="SELF operations subcommands",
272
+ command="devops self",
273
+ parent="devops",
274
+ is_group=True
275
+ ))
276
+
277
+ self_node.add("🔄 update - Update essential repos", data=CommandInfo(
278
+ name="update",
279
+ description="Update essential repos",
280
+ command="devops self update",
281
+ parent="self",
282
+ help_text="devops self update"
283
+ ))
284
+
285
+ self_node.add("🤖 interactive - Interactive configuration", data=CommandInfo(
286
+ name="interactive",
287
+ description="Interactive configuration of machine",
288
+ command="devops self interactive",
289
+ parent="self",
290
+ help_text="devops self interactive"
291
+ ))
292
+
293
+ self_node.add("📊 status - Machine status", data=CommandInfo(
294
+ name="status",
295
+ description="Status of machine, shell profile, apps, symlinks, dotfiles, etc.",
296
+ command="devops self status",
297
+ parent="self",
298
+ help_text="devops self status"
299
+ ))
300
+
301
+ self_node.add("📋 clone - Clone machineconfig", data=CommandInfo(
302
+ name="clone",
303
+ description="Clone machineconfig locally and incorporate to shell profile",
304
+ command="devops self clone",
305
+ parent="self",
306
+ help_text="devops self clone"
307
+ ))
308
+
309
+ self_node.add("📚 navigate - Navigate command structure", data=CommandInfo(
310
+ name="navigate",
311
+ description="Navigate command structure with TUI",
312
+ command="devops self navigate",
313
+ parent="self",
314
+ help_text="devops self navigate"
315
+ ))
316
+
317
+ # fire command
318
+ self.root.add("🔥 fire - Fire jobs execution", data=CommandInfo(
319
+ name="fire",
320
+ description="Execute Python scripts with Fire",
321
+ command="fire",
322
+ is_group=False,
323
+ module_path="machineconfig.scripts.python.fire_jobs",
324
+ help_text="fire <path> [function] --ve <env> --interactive --jupyter --streamlit --debug --loop --remote --zellij_tab <name>"
325
+ ))
326
+
327
+ # agents command
328
+ agents_node = self.root.add("🤖 agents - AI Agents management", data=CommandInfo(
329
+ name="agents",
330
+ description="AI Agents management subcommands",
331
+ command="agents",
332
+ is_group=True,
333
+ module_path="machineconfig.scripts.python.agents"
334
+ ))
335
+
336
+ agents_node.add("✨ create - Create AI agent", data=CommandInfo(
337
+ name="create",
338
+ description="Create a new AI agent",
339
+ command="agents create",
340
+ parent="agents",
341
+ help_text="agents create --context-path <file> --keyword-search <term> --filename-pattern <pattern> --agent <type> --machine <target> --model <model> --provider <provider> --prompt <text> --prompt-path <file> --job-name <name> --tasks-per-prompt <num> --separate-prompt-from-context --output-path <file> --agents-dir <dir>"
342
+ ))
343
+
344
+ agents_node.add("📦 collect - Collect agent data", data=CommandInfo(
345
+ name="collect",
346
+ description="Collect agent data",
347
+ command="agents collect",
348
+ parent="agents",
349
+ help_text="agents collect --agent-dir <dir> --output-path <file> --separator <sep>"
350
+ ))
351
+
352
+ agents_node.add("📝 make-template - Create agent template", data=CommandInfo(
353
+ name="make-template",
354
+ description="Create a template for fire agents",
355
+ command="agents make-template",
356
+ parent="agents",
357
+ help_text="agents make-template"
358
+ ))
359
+
360
+ agents_node.add("⚙️ make-config - Initialize AI configurations", data=CommandInfo(
361
+ name="make-config",
362
+ description="Initialize AI configurations in the current repository",
363
+ command="agents make-config",
364
+ parent="agents",
365
+ help_text="agents make-config"
366
+ ))
367
+
368
+ agents_node.add("📝 make-todo - Generate todo markdown", data=CommandInfo(
369
+ name="make-todo",
370
+ description="Generate a markdown file listing all Python files in the repo",
371
+ command="agents make-todo",
372
+ parent="agents",
373
+ help_text="agents make-todo"
374
+ ))
375
+
376
+ # sessions command
377
+ sessions_node = self.root.add("🖥️ sessions - Session layouts management", data=CommandInfo(
378
+ name="sessions",
379
+ description="Layouts management subcommands",
380
+ command="sessions",
381
+ is_group=True,
382
+ module_path="machineconfig.scripts.python.sessions"
383
+ ))
384
+
385
+ sessions_node.add("✨ create-from-function - Create layout from function", data=CommandInfo(
386
+ name="create-from-function",
387
+ description="Create layout from function",
388
+ command="sessions create-from-function",
389
+ parent="sessions",
390
+ help_text="sessions create-from-function"
391
+ ))
392
+
393
+ sessions_node.add("▶️ run - Run session layout", data=CommandInfo(
394
+ name="run",
395
+ description="Run session layout",
396
+ command="sessions run",
397
+ parent="sessions",
398
+ help_text="sessions run --layout-path <file> --max-tabs <num> --max-layouts <num> --sleep-inbetween <sec> --monitor --parallel --kill-upon-completion --choose <names> --choose-interactively"
399
+ ))
400
+
401
+ sessions_node.add("⚖️ balance-load - Balance load", data=CommandInfo(
402
+ name="balance-load",
403
+ description="Balance load across sessions",
404
+ command="sessions balance-load",
405
+ parent="sessions",
406
+ help_text="sessions balance-load --layout-path <file> --max-thresh <num> --thresh-type <number|weight> --breaking-method <moreLayouts|combineTabs> --output-path <file>"
407
+ ))
408
+
409
+ # cloud command
410
+ cloud_node = self.root.add("☁️ cloud - Cloud storage operations", data=CommandInfo(
411
+ name="cloud",
412
+ description="Cloud storage operations",
413
+ command="cloud",
414
+ is_group=True,
415
+ module_path="machineconfig.scripts.python.cloud"
416
+ ))
417
+
418
+ cloud_node.add("🔄 sync - Synchronize with cloud", data=CommandInfo(
419
+ name="sync",
420
+ description="Synchronize files/folders between local and cloud storage",
421
+ command="cloud sync",
422
+ parent="cloud",
423
+ help_text="cloud sync <source> <target> --cloud <provider> --recursive --exclude <patterns>"
424
+ ))
425
+
426
+ cloud_node.add("📤 copy - Copy to/from cloud", data=CommandInfo(
427
+ name="copy",
428
+ description="Copy files/folders to/from cloud storage",
429
+ command="cloud copy",
430
+ parent="cloud",
431
+ help_text="cloud copy <source> <target> --cloud <provider> --recursive --exclude <patterns>"
432
+ ))
433
+
434
+ cloud_node.add("🔗 mount - Mount cloud storage", data=CommandInfo(
435
+ name="mount",
436
+ description="Mount cloud storage as local drive",
437
+ command="cloud mount",
438
+ parent="cloud",
439
+ help_text="cloud mount <remote> <mount_point> --cloud <provider> --daemon --allow-other"
440
+ ))
441
+
442
+ # croshell command
443
+ self.root.add("� croshell - Interactive shell", data=CommandInfo(
444
+ name="croshell",
445
+ description="Interactive shell with various options",
446
+ command="croshell",
447
+ is_group=False,
448
+ module_path="machineconfig.scripts.python.croshell",
449
+ help_text="croshell --python --fzf --ve <env> --profile <profile> --read <file> --jupyter --streamlit --visidata"
450
+ ))
451
+
452
+ # ftpx command
453
+ self.root.add("📡 ftpx - File transfer", data=CommandInfo(
454
+ name="ftpx",
455
+ description="File transfer between machines",
456
+ command="ftpx",
457
+ is_group=False,
458
+ module_path="machineconfig.scripts.python.ftpx",
459
+ help_text="ftpx <source> <target> --recursive --zipFirst --cloud"
460
+ ))
461
+
462
+ # kill_process command
463
+ self.root.add("💀 kill_process - Kill processes", data=CommandInfo(
464
+ name="kill_process",
465
+ description="Kill running processes",
466
+ command="kill_process",
467
+ is_group=False,
468
+ module_path="machineconfig.utils.procs",
469
+ help_text="kill_process"
470
+ ))
@@ -0,0 +1,28 @@
1
+ """
2
+ Data models for the command navigator.
3
+ """
4
+
5
+ from typing import Optional
6
+ from dataclasses import dataclass
7
+
8
+
9
+ @dataclass
10
+ class CommandInfo:
11
+ """Information about a CLI command."""
12
+ name: str
13
+ description: str
14
+ command: str
15
+ parent: Optional[str] = None
16
+ is_group: bool = False
17
+ help_text: str = ""
18
+ module_path: str = ""
19
+
20
+
21
+ @dataclass
22
+ class ArgumentInfo:
23
+ """Information about a command argument."""
24
+ name: str
25
+ is_required: bool
26
+ is_flag: bool
27
+ placeholder: str = ""
28
+ description: str = ""