machineconfig 5.26__py3-none-any.whl → 5.28__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 (61) hide show
  1. machineconfig/cluster/sessions_managers/zellij_local_manager.py +1 -0
  2. machineconfig/jobs/installer/installer_data.json +17 -0
  3. machineconfig/jobs/installer/linux_scripts/brave.sh +4 -14
  4. machineconfig/jobs/installer/linux_scripts/docker.sh +5 -17
  5. machineconfig/jobs/installer/linux_scripts/docker_start.sh +6 -14
  6. machineconfig/jobs/installer/linux_scripts/edge.sh +3 -11
  7. machineconfig/jobs/installer/linux_scripts/nerdfont.sh +5 -17
  8. machineconfig/jobs/installer/linux_scripts/pgsql.sh +3 -11
  9. machineconfig/jobs/installer/linux_scripts/redis.sh +5 -17
  10. machineconfig/jobs/installer/linux_scripts/timescaledb.sh +6 -20
  11. machineconfig/jobs/installer/linux_scripts/vscode.sh +5 -17
  12. machineconfig/jobs/installer/linux_scripts/warp-cli.sh +5 -17
  13. machineconfig/jobs/installer/linux_scripts/wezterm.sh +3 -11
  14. machineconfig/jobs/installer/package_groups.py +70 -111
  15. machineconfig/jobs/linux/msc/lid.sh +2 -8
  16. machineconfig/jobs/linux/msc/network.sh +2 -8
  17. machineconfig/scripts/cloud/init.sh +6 -20
  18. machineconfig/scripts/linux/share_cloud.sh +11 -25
  19. machineconfig/scripts/python/agents.py +22 -31
  20. machineconfig/scripts/python/cloud_repo_sync.py +14 -29
  21. machineconfig/scripts/python/devops.py +7 -10
  22. machineconfig/scripts/python/helpers/repo_sync_helpers.py +1 -1
  23. machineconfig/scripts/python/helpers_fire/fire_agents_help_launch.py +30 -48
  24. machineconfig/scripts/python/helpers_fire/fire_agents_helper_types.py +24 -6
  25. machineconfig/scripts/python/helpers_fire/fire_crush.json +14 -0
  26. machineconfig/scripts/python/helpers_fire/fire_crush.py +37 -0
  27. machineconfig/scripts/python/helpers_fire/fire_cursor_agents.py +23 -0
  28. machineconfig/scripts/python/helpers_fire/fire_gemini.py +41 -0
  29. machineconfig/scripts/python/helpers_fire/fire_q.py +19 -0
  30. machineconfig/scripts/python/helpers_fire/prompt.txt +2 -0
  31. machineconfig/scripts/python/helpers_fire/template.ps1 +0 -0
  32. machineconfig/scripts/python/helpers_fire/template.sh +31 -0
  33. machineconfig/scripts/python/interactive.py +21 -19
  34. machineconfig/scripts/python/repos.py +4 -1
  35. machineconfig/scripts/python/secure_repo.py +15 -0
  36. machineconfig/settings/broot/br.sh +0 -4
  37. machineconfig/setup_linux/__init__.py +2 -2
  38. machineconfig/setup_linux/apps.sh +7 -9
  39. machineconfig/setup_linux/apps_desktop.sh +11 -35
  40. machineconfig/setup_linux/apps_gui.sh +4 -14
  41. machineconfig/setup_linux/nix/cli_installation.sh +9 -29
  42. machineconfig/setup_linux/web_shortcuts/interactive.sh +1 -1
  43. machineconfig/setup_windows/__init__.py +2 -2
  44. machineconfig/utils/code.py +3 -3
  45. machineconfig/utils/files/read.py +1 -1
  46. machineconfig/utils/installer.py +15 -21
  47. machineconfig/utils/installer_utils/installer.py +3 -4
  48. machineconfig/utils/installer_utils/installer_abc.py +4 -4
  49. machineconfig/utils/installer_utils/installer_class.py +11 -46
  50. machineconfig/utils/io.py +0 -1
  51. {machineconfig-5.26.dist-info → machineconfig-5.28.dist-info}/METADATA +3 -3
  52. {machineconfig-5.26.dist-info → machineconfig-5.28.dist-info}/RECORD +59 -52
  53. {machineconfig-5.26.dist-info → machineconfig-5.28.dist-info}/entry_points.txt +0 -1
  54. machineconfig/scripts/linux/cloud_repo_sync +0 -2
  55. machineconfig/scripts/windows/cloud_repo_sync.ps1 +0 -1
  56. /machineconfig/setup_linux/{repos.sh → machineconfig.sh} +0 -0
  57. /machineconfig/setup_linux/{ve.sh → uv.sh} +0 -0
  58. /machineconfig/setup_windows/{repos.ps1 → machineconfig.ps1} +0 -0
  59. /machineconfig/setup_windows/{ve.ps1 → uv.ps1} +0 -0
  60. {machineconfig-5.26.dist-info → machineconfig-5.28.dist-info}/WHEEL +0 -0
  61. {machineconfig-5.26.dist-info → machineconfig-5.28.dist-info}/top_level.txt +0 -0
@@ -16,13 +16,6 @@ PACKAGES_AI_TOOLS = [
16
16
  "auggie",
17
17
  ]
18
18
 
19
- # Tunneling/Port Forwarding - Tools for exposing local services
20
- PACKAGES_TUNNELING = [
21
- "ngrok",
22
- "devtunnel",
23
- "cloudflared",
24
- "forward-cli",
25
- ]
26
19
 
27
20
  # Terminal Emulators & Shells - Terminal applications, emulators, and shell environments
28
21
  PACKAGES_TERMINAL_EMULATORS = [
@@ -41,6 +34,8 @@ PACKAGES_BROWSERS = [
41
34
  "bypass-paywalls-chrome",
42
35
  "browsh",
43
36
  "carbonyl",
37
+ "m365",
38
+ "zoomit",
44
39
  ]
45
40
 
46
41
  # Code Editors & IDEs - Code editing tools
@@ -51,16 +46,7 @@ PACKAGES_CODE_EDITORS = [
51
46
  "lvim",
52
47
  ]
53
48
 
54
- # Presentation & Text UI Tools - Markdown viewers, presentations, prompts, and text decoration
55
- PACKAGES_PRESENTATION = [
56
- "patat",
57
- "marp",
58
- "presenterm",
59
- "glow",
60
- "gum",
61
- "boxes",
62
- "hx",
63
- ]
49
+
64
50
 
65
51
  # Database Tools - Database clients and visualizers
66
52
  PACKAGES_DATABASE = [
@@ -70,12 +56,6 @@ PACKAGES_DATABASE = [
70
56
  "duckdb",
71
57
  ]
72
58
 
73
- # Documentation & Conversion - Document conversion, diagram tools, and fast file operations
74
- PACKAGES_DOC_CONVERSION = [
75
- "mermaid-cli",
76
- "html2markdown",
77
- "pandoc",
78
- ]
79
59
 
80
60
  # Media & Entertainment - Music players and media tools
81
61
  PACKAGES_MEDIA = [
@@ -88,8 +68,10 @@ PACKAGES_MEDIA = [
88
68
 
89
69
  # File Sharing & Cloud - File sharing, transfer, backup, sync, and QR tools
90
70
  PACKAGES_FILE_SHARING = [
91
- "cpz",
92
- "rmz",
71
+ "ngrok",
72
+ "devtunnel",
73
+ "cloudflared",
74
+ "forward-cli",
93
75
  "ffsend",
94
76
  "portal",
95
77
  "qrcp",
@@ -108,14 +90,6 @@ PACKAGES_FILE_SHARING = [
108
90
  ]
109
91
 
110
92
 
111
- # Git & Docker Tools - Version control and container utilities
112
- PACKAGES_GIT_DOCKER_TOOLS = [
113
- "lazygit",
114
- "onefetch",
115
- "gitcs",
116
- "lazydocker",
117
- ]
118
-
119
93
  # Development Tools - Various development utilities
120
94
  PACKAGES_DEV_UTILS = [
121
95
  "devcontainer",
@@ -126,6 +100,10 @@ PACKAGES_DEV_UTILS = [
126
100
 
127
101
  # Code Analysis, Git & Docs - Code analysis, statistics, documentation, and Git tools
128
102
  PACKAGES_CODE_ANALYSIS = [
103
+ "lazygit",
104
+ "onefetch",
105
+ "gitcs",
106
+ "lazydocker",
129
107
  "hyperfine",
130
108
  "kondo",
131
109
  "tokei",
@@ -134,6 +112,8 @@ PACKAGES_CODE_ANALYSIS = [
134
112
  "gitui",
135
113
  "delta",
136
114
  "gh",
115
+ "watchexec",
116
+ "jq",
137
117
  ]
138
118
 
139
119
  # Productivity & Utilities - Productivity tools, security, remote access, and terminal enhancements
@@ -141,16 +121,25 @@ PACKAGES_PRODUCTIVITY = [
141
121
  "espanso",
142
122
  "bitwarden",
143
123
  "openpomodoro-cli",
144
- "just",
145
124
  "rustdesk",
125
+ "mermaid-cli",
126
+ "html2markdown",
127
+ "pandoc",
128
+ "patat",
129
+ "marp",
130
+ "presenterm",
131
+ "glow",
132
+ "gum",
133
+ "hx",
146
134
  ]
147
135
 
148
136
  # Miscellaneous Tools - Other tools
149
137
  PACKAGES_MISC_DEV = [
138
+ "lolcatjs",
139
+ "figlet-cli",
140
+ "boxes",
150
141
  "Gorilla",
151
- "nerdfont",
152
142
  "Redis",
153
- "winget",
154
143
  "transmission",
155
144
  "exa",
156
145
  "bytehound",
@@ -162,24 +151,6 @@ PACKAGES_MISC_DEV = [
162
151
  "nnn",
163
152
  ]
164
153
 
165
- # Main DEV package list - combines all subgroups
166
- PACKAGES_NAMES_DEV = [
167
- *PACKAGES_AI_TOOLS,
168
- *PACKAGES_TUNNELING,
169
- *PACKAGES_TERMINAL_EMULATORS,
170
- *PACKAGES_BROWSERS,
171
- *PACKAGES_CODE_EDITORS,
172
- *PACKAGES_PRESENTATION,
173
- *PACKAGES_DATABASE,
174
- *PACKAGES_DOC_CONVERSION,
175
- *PACKAGES_MEDIA,
176
- *PACKAGES_FILE_SHARING,
177
- *PACKAGES_GIT_DOCKER_TOOLS,
178
- *PACKAGES_DEV_UTILS,
179
- *PACKAGES_CODE_ANALYSIS,
180
- *PACKAGES_PRODUCTIVITY,
181
- *PACKAGES_MISC_DEV,
182
- ]
183
154
 
184
155
  # System & Network Monitoring - System resource monitors, process viewers, network analysis, and system info tools
185
156
  PACKAGES_SYSTEM_MONITORS = [
@@ -193,33 +164,16 @@ PACKAGES_SYSTEM_MONITORS = [
193
164
  "cpufetch",
194
165
  "fastfetch",
195
166
  "topgrade",
167
+ "speedtest",
196
168
  ]
197
169
 
198
170
 
199
- # File Tools - File browsing, navigation, listing, directory jumping, and disk usage analysis
200
- PACKAGES_FILE_TOOLS = [
201
- "xplr",
202
- "joshuto",
203
- "lf",
204
- "tere",
205
- "yazi",
206
- "lsd",
207
- "zoxide",
208
- "diskonaut",
209
- "dua",
210
- "dust",
211
- ]
212
-
213
- # File Viewers - File preview and viewing tools
214
- PACKAGES_FILE_VIEWERS = [
215
- "pistol",
216
- "bat",
217
- "viu",
218
- ]
219
171
 
220
172
 
221
173
  # Search & Archive Tools - File and content search utilities, archive management
222
- PACKAGES_SEARCH = [
174
+ PACKAGES_FILE = [
175
+ "nerdfont",
176
+ "winget",
223
177
  "fd",
224
178
  "fzf",
225
179
  "broot",
@@ -227,6 +181,21 @@ PACKAGES_SEARCH = [
227
181
  "rga",
228
182
  "ugrep",
229
183
  "ouch",
184
+ "pistol",
185
+ "bat",
186
+ "viu",
187
+ "xplr",
188
+ "joshuto",
189
+ "lf",
190
+ "tere",
191
+ "yazi",
192
+ "lsd",
193
+ "zoxide",
194
+ "diskonaut",
195
+ "dua",
196
+ "dust",
197
+ "cpz",
198
+ "rmz",
230
199
  ]
231
200
 
232
201
  # Terminal & Shell Enhancements - Terminal multiplexers, shell history, and prompts
@@ -235,41 +204,14 @@ PACKAGES_TERMINAL_SHELL = [
235
204
  "mprocs",
236
205
  "mcfly",
237
206
  "starship",
238
- "lolcatjs",
239
- "figlet-cli",
240
- ]
241
- # Web Sharing - Share terminal over web
242
- PACKAGES_WEB_TERMINAL = [
243
207
  "gotty",
244
208
  "ttyd",
245
- ]
246
-
247
-
248
- # Cloud & Utilities - Cloud storage, file watching, web terminal, and presentation tools
249
- PACKAGES_CLOUD_UTILS = [
250
209
  "rclone",
251
- "watchexec",
252
- "m365",
253
- "zoomit",
254
- "speedtest",
255
210
  ]
256
211
 
257
212
 
258
213
 
259
214
 
260
- # Main ESSENTIAL package list - combines all subgroups
261
- PACKAGES_NAMES_ESSENTIAL = [
262
- *PACKAGES_CODE_ANALYSIS,
263
- *PACKAGES_PRESENTATION,
264
- *PACKAGES_FILE_VIEWERS,
265
- *PACKAGES_FILE_TOOLS,
266
- *PACKAGES_SYSTEM_MONITORS,
267
- *PACKAGES_WEB_TERMINAL,
268
- *PACKAGES_TERMINAL_SHELL,
269
- *PACKAGES_SEARCH,
270
- *PACKAGES_AI_TOOLS,
271
- *PACKAGES_CLOUD_UTILS,
272
- ]
273
215
 
274
216
  PACKAGE_GROUPS: TypeAlias = Literal[
275
217
  "ESSENTIAL",
@@ -297,31 +239,48 @@ PACKAGE_GROUPS: TypeAlias = Literal[
297
239
  "CLOUD_UTILS",
298
240
  "WEB_TERMINAL",
299
241
  ]
242
+
243
+
244
+
245
+ # Main ESSENTIAL package list - combines all subgroups
246
+ PACKAGES_NAMES_ESSENTIAL = [
247
+ *PACKAGES_CODE_ANALYSIS,
248
+ *PACKAGES_SYSTEM_MONITORS,
249
+ *PACKAGES_TERMINAL_SHELL,
250
+ *PACKAGES_FILE,
251
+ *PACKAGES_AI_TOOLS,
252
+ ]
253
+ PACKAGES_NAMES_DEV = [
254
+ *PACKAGES_AI_TOOLS,
255
+ *PACKAGES_TERMINAL_EMULATORS,
256
+ *PACKAGES_BROWSERS,
257
+ *PACKAGES_CODE_EDITORS,
258
+ *PACKAGES_DATABASE,
259
+ *PACKAGES_MEDIA,
260
+ *PACKAGES_FILE_SHARING,
261
+ *PACKAGES_DEV_UTILS,
262
+ *PACKAGES_CODE_ANALYSIS,
263
+ *PACKAGES_PRODUCTIVITY,
264
+ *PACKAGES_MISC_DEV,
265
+ ]
266
+
300
267
  PACKAGE_GROUP2NAMES: dict[PACKAGE_GROUPS, list[str]] = {
301
268
  "ESSENTIAL": PACKAGES_NAMES_ESSENTIAL,
302
269
  "DEV": PACKAGES_NAMES_DEV,
303
270
  "AI_TOOLS": PACKAGES_AI_TOOLS,
304
- "TUNNELING": PACKAGES_TUNNELING,
305
271
  "TERMINAL_EMULATORS": PACKAGES_TERMINAL_EMULATORS,
306
272
  "BROWSERS": PACKAGES_BROWSERS,
307
273
  "CODE_EDITORS": PACKAGES_CODE_EDITORS,
308
- "PRESENTATION": PACKAGES_PRESENTATION,
309
274
  "DATABASE": PACKAGES_DATABASE,
310
- "DOC_CONVERSION": PACKAGES_DOC_CONVERSION,
311
275
  "MEDIA": PACKAGES_MEDIA,
312
276
  "FILE_SHARING": PACKAGES_FILE_SHARING,
313
- "GIT_DOCKER_TOOLS": PACKAGES_GIT_DOCKER_TOOLS,
314
277
  "DEV_UTILS": PACKAGES_DEV_UTILS,
315
278
  "CODE_ANALYSIS": PACKAGES_CODE_ANALYSIS,
316
279
  "PRODUCTIVITY": PACKAGES_PRODUCTIVITY,
317
280
  "MISC_DEV": PACKAGES_MISC_DEV,
318
281
  "SYSTEM_MONITORS": PACKAGES_SYSTEM_MONITORS,
319
- "FILE_TOOLS": PACKAGES_FILE_TOOLS,
320
- "FILE_VIEWERS": PACKAGES_FILE_VIEWERS,
321
- "SEARCH": PACKAGES_SEARCH,
282
+ "SEARCH": PACKAGES_FILE,
322
283
  "TERMINAL_SHELL": PACKAGES_TERMINAL_SHELL,
323
- "CLOUD_UTILS": PACKAGES_CLOUD_UTILS,
324
- "WEB_TERMINAL": PACKAGES_WEB_TERMINAL,
325
284
  }
326
285
 
327
286
  _ = Union, Literal
@@ -1,13 +1,9 @@
1
1
  #!/bin/bash
2
- #=======================================================================
3
2
  # 💻 LAPTOP LID CONFIGURATION 🔌
4
- #=======================================================================
5
3
  # This script disables suspension when laptop lid is closed
6
4
  # Reference: https://askubuntu.com/questions/141866/keep-ubuntu-server-running-on-a-laptop-with-the-lid-closed/1426611#1426611
7
5
 
8
- echo """#=======================================================================
9
- 🔧 CONFIGURING | Modifying lid close behavior
10
- #=======================================================================
6
+ echo """🔧 CONFIGURING | Modifying lid close behavior
11
7
  """
12
8
 
13
9
  # Edit file: /etc/systemd/logind.conf and adjust lid handling parameters
@@ -17,8 +13,6 @@ sudo sed -i 's/#HandleLidSwitch=suspend/HandleLidSwitch=ignore/g' /etc/systemd/l
17
13
  echo "📝 Updating HandleLidSwitchExternalPower parameter..."
18
14
  sudo sed -i 's/#HandleLidSwitchExternalPower=suspend/HandleLidSwitchExternalPower=ignore/g' /etc/systemd/logind.conf
19
15
 
20
- echo """#=======================================================================
21
- ✅ COMPLETE | Lid close configuration has been updated
22
- #=======================================================================
16
+ echo """✅ COMPLETE | Lid close configuration has been updated
23
17
  """
24
18
  echo "ℹ️ You may need to restart the systemd-logind service or reboot for changes to take effect"
@@ -1,13 +1,9 @@
1
1
  #!/bin/bash
2
- #=======================================================================
3
2
  # 🌐 NETWORK CONFIGURATION SCRIPT 🌐
4
- #=======================================================================
5
3
  # This script fixes the "A start job is running for wait for network to be configured" issue
6
4
  # Reference: https://askubuntu.com/questions/972215/a-start-job-is-running-for-wait-for-network-to-be-configured-ubuntu-server-17-1
7
5
 
8
- echo """#=======================================================================
9
- 🔧 CONFIGURING NETWORK | Making network interfaces optional
10
- #=======================================================================
6
+ echo """🔧 CONFIGURING NETWORK | Making network interfaces optional
11
7
  """
12
8
 
13
9
  echo "📋 Original network config format from 'subiquity':"
@@ -22,9 +18,7 @@ echo """# network:
22
18
  echo "🔄 Modifying netplan configuration..."
23
19
  sudo sed -i 's/dhcp4: true/dhcp4: true\n optional: true/g' /etc/netplan/00-installer-config.yaml
24
20
 
25
- echo """#=======================================================================
26
- ✅ COMPLETE | Network configuration has been updated
27
- #=======================================================================
21
+ echo """✅ COMPLETE | Network configuration has been updated
28
22
  """
29
23
  echo "ℹ️ You may need to run 'sudo netplan apply' for changes to take effect"
30
24
 
@@ -1,12 +1,8 @@
1
1
  #!/bin/bash
2
- #=======================================================================
3
2
  # ☁️ CLOUD CONFIGURATION INITIALIZATION SCRIPT ☁️
4
- #=======================================================================
5
3
  # This script initializes cloud configuration settings and sets up the environment
6
4
 
7
- echo """#=======================================================================
8
- 🔑 COLLECTING CONFIGURATION PARAMETERS | Setting up cloud environment
9
- #=======================================================================
5
+ echo """🔑 COLLECTING CONFIGURATION PARAMETERS | Setting up cloud environment
10
6
  """
11
7
 
12
8
  # Check for required environment variables and prompt if not set
@@ -41,9 +37,7 @@ if [ -z "$DECRYPTION_PASSWORD" ]; then
41
37
  echo ""
42
38
  fi
43
39
 
44
- echo """#=======================================================================
45
- 📦 INSTALLING ESSENTIALS | Setting up core dependencies
46
- #=======================================================================
40
+ echo """📦 INSTALLING ESSENTIALS | Setting up core dependencies
47
41
  """
48
42
 
49
43
  # Set up package manager
@@ -65,9 +59,7 @@ echo "🚀 Activating Python virtual environment..."
65
59
  echo "📋 Setting up code repositories..."
66
60
  curl bit.ly/cfgreposlinux -L | bash
67
61
 
68
- echo """#=======================================================================
69
- ⚙️ CONFIGURING ENVIRONMENT | Setting up dotfiles
70
- #=======================================================================
62
+ echo """⚙️ CONFIGURING ENVIRONMENT | Setting up dotfiles
71
63
  """
72
64
 
73
65
  # Link configuration files
@@ -87,9 +79,7 @@ source ~/code/machineconfig/src/machineconfig/setup_linux/symlinks.sh
87
79
  echo "🔄 Reloading shell configuration..."
88
80
  . ~/.bashrc
89
81
 
90
- echo """#=======================================================================
91
- 📦 INSTALLING DEVELOPMENT TOOLS | Setting up development environment
92
- #=======================================================================
82
+ echo """📦 INSTALLING DEVELOPMENT TOOLS | Setting up development environment
93
83
  """
94
84
 
95
85
  # Activate virtual environment
@@ -104,16 +94,12 @@ python -m fire machineconfig.scripts.python.devops_devapps_install main --which=
104
94
  echo "🔄 Reloading shell configuration..."
105
95
  . ~/.bashrc
106
96
 
107
- echo """#=======================================================================
108
- ✅ FINALIZING CONFIGURATION | Running cloud-specific initialization
109
- #=======================================================================
97
+ echo """✅ FINALIZING CONFIGURATION | Running cloud-specific initialization
110
98
  """
111
99
 
112
100
  # Run cloud-specific initialization script
113
101
  echo "⚙️ Running cloud-specific configuration: $CLOUD_CONFIG_NAME"
114
102
  . $HOME/dotfiles/config/cloud/$CLOUD_CONFIG_NAME/init.sh
115
103
 
116
- echo """#=======================================================================
117
- ✅ INITIALIZATION COMPLETE | Cloud environment has been set up successfully
118
- #=======================================================================
104
+ echo """✅ INITIALIZATION COMPLETE | Cloud environment has been set up successfully
119
105
  """
@@ -1,16 +1,12 @@
1
1
  #!/bin/bash
2
- #=======================================================================
3
2
  # 📤 CLOUD FILE SHARING SCRIPT 📤
4
- #=======================================================================
5
3
  # This script uploads files or directories to transfer.sh for easy sharing
6
4
  # Usage: share_cloud <file|directory> or command | share_cloud <file_name>
7
5
 
8
6
  # Check if arguments are provided
9
7
  if [ $# -eq 0 ]; then
10
- echo """ #=======================================================================
11
- ❌ ERROR | No arguments specified
12
- #=======================================================================
13
-
8
+ echo """ ❌ ERROR | No arguments specified
9
+
14
10
  📋 USAGE:
15
11
  share_cloud <file|directory>
16
12
  command | share_cloud <file_name>
@@ -26,19 +22,15 @@ if tty -s; then
26
22
 
27
23
  # Check if the file exists
28
24
  if [ ! -e "$file" ]; then
29
- echo """ #=======================================================================
30
- ❌ ERROR | File not found
31
- #=======================================================================
32
-
25
+ echo """ ❌ ERROR | File not found
26
+
33
27
  🔍 File \"$file\" does not exist
34
28
  """>&2
35
29
  return 1
36
30
  fi
37
31
 
38
- echo """ #=======================================================================
39
- 📤 UPLOADING | Sharing file to transfer.sh
40
- #=======================================================================
41
- """
32
+ echo """ 📤 UPLOADING | Sharing file to transfer.sh
33
+ """
42
34
 
43
35
  # Handle directories by creating a zip archive
44
36
  if [ -d "$file" ]; then
@@ -53,23 +45,17 @@ if tty -s; then
53
45
  else
54
46
  # Pipe mode - reading from stdin
55
47
  file_name=$1
56
- echo """ #=======================================================================
57
- 📤 UPLOADING | Sharing from stdin to transfer.sh
58
- #=======================================================================
59
- """
48
+ echo """ 📤 UPLOADING | Sharing from stdin to transfer.sh
49
+ """
60
50
  echo "📋 Creating file \"$file_name\" from piped input..."
61
51
  curl --progress-bar --upload-file "-" "https://transfer.sh/$file_name" | tee /dev/null
62
52
 
63
53
  # Display QR code for the URL
64
- echo """ #=======================================================================
65
- 📱 QR CODE | Scan with mobile device to access file
66
- #=======================================================================
67
- """
54
+ echo """ 📱 QR CODE | Scan with mobile device to access file
55
+ """
68
56
  qr "https://transfer.sh/$file_name"
69
57
  fi
70
58
 
71
- echo """#=======================================================================
72
- ✅ UPLOAD COMPLETE | File is available at the URL above
73
- #=======================================================================
59
+ echo """✅ UPLOAD COMPLETE | File is available at the URL above
74
60
  """
75
61
  echo "⚠️ NOTE: Files are automatically deleted after 14 days"
@@ -5,7 +5,7 @@
5
5
  from pathlib import Path
6
6
  from typing import cast, Iterable, Optional, get_args
7
7
  import typer
8
- from machineconfig.scripts.python.helpers_fire.fire_agents_helper_types import AGENTS
8
+ from machineconfig.scripts.python.helpers_fire.fire_agents_helper_types import AGENTS, MATCHINE, MODEL, PROVIDER
9
9
 
10
10
 
11
11
  def _write_list_file(target: Path, files: Iterable[Path]) -> None:
@@ -19,11 +19,16 @@ def create(
19
19
  filename_pattern: Optional[str] = typer.Option(None, help="Filename pattern to match"),
20
20
  separator: str = typer.Option("\n", help="Separator for context"),
21
21
  tasks_per_prompt: int = typer.Option(13, help="Number of tasks per prompt"),
22
+
22
23
  agent: AGENTS = typer.Option(..., help=f"Agent type. One of {', '.join(get_args(AGENTS))}"),
24
+ machine: MATCHINE = typer.Option(..., help=f"Machine to run agents on. One of {', '.join(get_args(MATCHINE))}"),
25
+ model: MODEL = typer.Option(..., help=f"Model to use (for crush agent). One of {', '.join(get_args(MODEL))}"),
26
+ provider: PROVIDER = typer.Option(..., help=f"Provider to use (for crush agent). One of {', '.join(get_args(PROVIDER))}"),
27
+
23
28
  prompt: Optional[str] = typer.Option(None, help="Prompt prefix as string"),
24
29
  prompt_path: Optional[Path] = typer.Option(None, help="Path to prompt file"),
25
30
  job_name: str = typer.Option("AI_Agents", help="Job name"),
26
- keep_separate: bool = typer.Option(True, help="Keep prompt material in separate file to the context."),
31
+ separate_prompt_from_context: bool = typer.Option(True, help="Keep prompt material in separate file to the context."),
27
32
  output_path: Optional[Path] = typer.Option(None, help="Path to write the layout.json file"),
28
33
  agents_dir: Optional[Path] = typer.Option(None, help="Directory to store agent files. If not provided, will be constructed automatically."),
29
34
  ):
@@ -84,14 +89,17 @@ def create(
84
89
  else:
85
90
  prompt_prefix = cast(str, prompt)
86
91
  agent_selected = agent
87
- keep_material_in_separate_file_input = keep_separate
92
+ keep_material_in_separate_file_input = separate_prompt_from_context
88
93
  prompt_material_re_splitted = chunk_prompts(prompt_material_path, tasks_per_prompt=tasks_per_prompt, joiner=separator)
89
94
  if agents_dir is None: agents_dir = repo_root / ".ai" / f"tmp_prompts/{job_name}_{randstr()}"
90
95
  else:
91
96
  import shutil
92
97
  if agents_dir.exists():
93
98
  shutil.rmtree(agents_dir)
94
- prep_agent_launch(agents_dir=agents_dir, prompts_material=prompt_material_re_splitted, keep_material_in_separate_file=keep_material_in_separate_file_input, prompt_prefix=prompt_prefix, agent=agent_selected, job_name=job_name)
99
+ prep_agent_launch(repo_root=repo_root, agents_dir=agents_dir, prompts_material=prompt_material_re_splitted,
100
+ keep_material_in_separate_file=keep_material_in_separate_file_input,
101
+ prompt_prefix=prompt_prefix, machine=machine, agent=agent_selected, model=model, provider=provider,
102
+ job_name=job_name)
95
103
  layoutfile = get_agents_launch_layout(session_root=agents_dir)
96
104
  regenerate_py_code = f"""
97
105
  #!/usr/bin/env uv run --python 3.13 --with machineconfig
@@ -100,10 +108,11 @@ fire_agents create --context-path "{prompt_material_path}" \\
100
108
  --{search_strategy} "{context_path or keyword_search or filename_pattern}" \\
101
109
  --prompt-path "{prompt_path or ''}" \\
102
110
  --agent "{agent_selected}" \\
111
+ --machine "{machine}" \\
103
112
  --job-name "{job_name}" \\
104
113
  --tasks-per-prompt {tasks_per_prompt} \\
105
114
  --separator "{separator}" \\
106
- {"--keep-separate" if keep_material_in_separate_file_input else ""}
115
+ {"--separate-prompt-from-context" if keep_material_in_separate_file_input else ""}
107
116
  """
108
117
  (agents_dir / "aa_agents_relaunch.py").write_text(data=regenerate_py_code, encoding="utf-8")
109
118
  layout_output_path = output_path if output_path is not None else agents_dir / "layout.json"
@@ -155,30 +164,12 @@ def collect(
155
164
 
156
165
 
157
166
  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
- 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
- sessions balance-load $LAYOUT_PATH --max-thresh 6 --breaking-method moreLayouts --thresh-type number --output-path $LAYOUT_BALANCED_PATH
170
-
171
- sessions run $LAYOUT_BALANCED_PATH --kill-upon-completion
172
- agents collect $AGENTS_DIR "$REPO_ROOT/.ai/agents/$JOB_NAME/collected.txt"
173
- """
174
- template_powershell = """
175
-
176
- """
177
167
  from platform import system
178
- if system() == "Linux":
179
- template = template_bash
168
+ import machineconfig.scripts.python.helpers_fire as module
169
+ if system() == "Linux" or system() == "Darwin":
170
+ template_path = Path(module.__file__).parent / "template.sh"
180
171
  elif system() == "Windows":
181
- template = template_powershell
172
+ template_path = Path(module.__file__).parent / "template.ps1"
182
173
  else:
183
174
  raise typer.BadParameter(f"Unsupported OS: {system()}")
184
175
 
@@ -189,16 +180,16 @@ agents collect $AGENTS_DIR "$REPO_ROOT/.ai/agents/$JOB_NAME/collected.txt"
189
180
  raise typer.Exit(1)
190
181
  save_path = repo_root / ".ai" / "agents" / "template_fire_agents.sh"
191
182
  save_path.parent.mkdir(parents=True, exist_ok=True)
192
- save_path.write_text(template, encoding="utf-8")
183
+ save_path.write_text(template_path.read_text(encoding="utf-8"), encoding="utf-8")
193
184
  typer.echo(f"Template bash script written to {save_path}")
194
185
 
195
186
 
196
187
  def main_from_parser():
197
188
  import sys
198
189
  agents_app = typer.Typer(help="🤖 AI Agents management subcommands")
199
- agents_app.command("create")(create)
200
- agents_app.command("collect")(collect)
201
- agents_app.command("template")(template)
190
+ agents_app.command("create", no_args_is_help=True)(create)
191
+ agents_app.command("collect", no_args_is_help=True)(collect)
192
+ agents_app.command("create-template", no_args_is_help=False, help="Create a template for fire agents")(template)
202
193
  if len(sys.argv) == 1:
203
194
  agents_app(["--help"])
204
195
  else: