machineconfig 5.65__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.

@@ -0,0 +1,262 @@
1
+ """
2
+ Main TUI application for navigating machineconfig commands.
3
+ """
4
+
5
+ import subprocess
6
+ from textual.app import App, ComposeResult
7
+ from textual.widgets import Header, Footer, Input, Tree
8
+ from textual.binding import Binding
9
+ from machineconfig.scripts.python.helper_navigator.command_builder import CommandBuilderScreen
10
+ from machineconfig.scripts.python.helper_navigator.command_tree import CommandTree
11
+ from machineconfig.scripts.python.helper_navigator.command_detail import CommandDetail
12
+ from machineconfig.scripts.python.helper_navigator.search_bar import SearchBar
13
+ from machineconfig.scripts.python.helper_navigator.data_models import CommandInfo
14
+
15
+
16
+ class CommandNavigatorApp(App[None]):
17
+ """TUI application for navigating machineconfig commands."""
18
+
19
+ CSS = """
20
+ Screen {
21
+ layout: grid;
22
+ grid-size: 2 3;
23
+ grid-rows: auto 1fr auto;
24
+ }
25
+
26
+ Header {
27
+ column-span: 2;
28
+ background: $boost;
29
+ color: $text;
30
+ }
31
+
32
+ #search-bar {
33
+ column-span: 2;
34
+ padding: 1;
35
+ background: $surface;
36
+ height: auto;
37
+ }
38
+
39
+ .search-label {
40
+ width: auto;
41
+ padding-right: 1;
42
+ }
43
+
44
+ #search-input {
45
+ width: 1fr;
46
+ }
47
+
48
+ #command-tree {
49
+ row-span: 1;
50
+ border: solid $primary;
51
+ padding: 1;
52
+ }
53
+
54
+ #command-detail {
55
+ row-span: 1;
56
+ border: solid $primary;
57
+ padding: 1;
58
+ }
59
+
60
+ Footer {
61
+ column-span: 2;
62
+ background: $boost;
63
+ }
64
+
65
+ Button {
66
+ margin: 1;
67
+ }
68
+
69
+ CommandBuilderScreen {
70
+ align: center middle;
71
+ }
72
+
73
+ CommandBuilderScreen > VerticalScroll {
74
+ width: 80;
75
+ height: auto;
76
+ max-height: 90%;
77
+ background: $surface;
78
+ border: thick $primary;
79
+ padding: 2;
80
+ }
81
+
82
+ CommandBuilderScreen .title {
83
+ margin-bottom: 1;
84
+ }
85
+
86
+ CommandBuilderScreen Label {
87
+ margin-top: 1;
88
+ margin-bottom: 0;
89
+ }
90
+
91
+ CommandBuilderScreen Input {
92
+ margin-bottom: 1;
93
+ }
94
+
95
+ CommandBuilderScreen .buttons {
96
+ margin-top: 2;
97
+ height: auto;
98
+ align: center middle;
99
+ }
100
+ """
101
+
102
+ BINDINGS = [
103
+ Binding("q", "quit", "Quit", priority=True),
104
+ Binding("c", "copy_command", "Copy Command"),
105
+ Binding("/", "focus_search", "Search"),
106
+ Binding("?", "help", "Help"),
107
+ Binding("r", "run_command", "Run Command"),
108
+ Binding("b", "build_command", "Build Command"),
109
+ ]
110
+
111
+ def compose(self) -> ComposeResult:
112
+ """Create child widgets for the app."""
113
+ yield Header(show_clock=True)
114
+ yield SearchBar(id="search-bar")
115
+ yield CommandTree("📚 machineconfig Commands", id="command-tree")
116
+ yield CommandDetail(id="command-detail")
117
+ yield Footer()
118
+
119
+ def on_mount(self) -> None:
120
+ """Actions when app is mounted."""
121
+ self.title = "machineconfig Command Navigator"
122
+ self.sub_title = "Navigate and explore all available commands"
123
+ tree = self.query_one(CommandTree)
124
+ tree.focus()
125
+
126
+ def on_tree_node_selected(self, event: Tree.NodeSelected[CommandInfo]) -> None:
127
+ """Handle tree node selection."""
128
+ command_info = event.node.data
129
+ detail_widget = self.query_one("#command-detail", CommandDetail)
130
+ detail_widget.update_command(command_info)
131
+
132
+ def on_input_changed(self, event: Input.Changed) -> None:
133
+ """Handle search input changes."""
134
+ if event.input.id != "search-input":
135
+ return
136
+
137
+ search_term = event.value.lower()
138
+ tree = self.query_one(CommandTree)
139
+
140
+ if not search_term:
141
+ # Show all nodes - expand all root children
142
+ for node in tree.root.children:
143
+ node.expand()
144
+ return
145
+
146
+ # Filter nodes based on search term
147
+ def filter_tree(node): # type: ignore
148
+ if node.data and not node.data.is_group:
149
+ match = (search_term in node.data.name.lower() or
150
+ search_term in node.data.description.lower() or
151
+ search_term in node.data.command.lower())
152
+ return match
153
+ return False
154
+
155
+ # Expand parents of matching nodes by walking through all nodes
156
+ def walk_nodes(node): # type: ignore
157
+ """Recursively walk through tree nodes."""
158
+ yield node
159
+ for child in node.children:
160
+ yield from walk_nodes(child)
161
+
162
+ for node in walk_nodes(tree.root):
163
+ if filter_tree(node):
164
+ parent = node.parent
165
+ while parent and parent != tree.root:
166
+ parent.expand()
167
+ parent = parent.parent # type: ignore
168
+
169
+ def action_copy_command(self) -> None:
170
+ """Copy the selected command to clipboard."""
171
+ tree = self.query_one(CommandTree)
172
+ if tree.cursor_node and tree.cursor_node.data:
173
+ command = tree.cursor_node.data.command
174
+ try:
175
+ import pyperclip # type: ignore
176
+ pyperclip.copy(command)
177
+ self.notify(f"Copied: {command}", severity="information")
178
+ except ImportError:
179
+ self.notify("Install pyperclip to enable clipboard support", severity="warning")
180
+
181
+ def action_run_command(self) -> None:
182
+ """Run the selected command without arguments."""
183
+ tree = self.query_one(CommandTree)
184
+ if tree.cursor_node and tree.cursor_node.data:
185
+ command_info = tree.cursor_node.data
186
+ if command_info.is_group:
187
+ self.notify("Cannot run command groups directly", severity="warning")
188
+ return
189
+
190
+ self._execute_command(command_info.command)
191
+
192
+ def action_build_command(self) -> None:
193
+ """Open command builder for selected command."""
194
+ tree = self.query_one(CommandTree)
195
+ if tree.cursor_node and tree.cursor_node.data:
196
+ command_info = tree.cursor_node.data
197
+ if command_info.is_group:
198
+ self.notify("Cannot build command for groups", severity="warning")
199
+ return
200
+
201
+ self.push_screen(CommandBuilderScreen(command_info), self._handle_builder_result)
202
+
203
+ def _handle_builder_result(self, result: str | None) -> None:
204
+ """Handle result from command builder."""
205
+ if not result:
206
+ return
207
+
208
+ if result.startswith("EXECUTE:"):
209
+ command = result[8:]
210
+ self._execute_command(command)
211
+ elif result.startswith("COPY:"):
212
+ command = result[5:]
213
+ self._copy_to_clipboard(command)
214
+
215
+ def _execute_command(self, command: str) -> None:
216
+ """Execute a shell command."""
217
+ try:
218
+ self.notify(f"Executing: {command}", severity="information")
219
+ result = subprocess.run(command, shell=True, capture_output=True, text=True, timeout=30)
220
+
221
+ if result.returncode == 0:
222
+ output = result.stdout.strip()
223
+ if output:
224
+ self.notify(f"Success: {output[:100]}...", severity="information", timeout=5)
225
+ else:
226
+ self.notify("Command executed successfully", severity="information")
227
+ else:
228
+ error = result.stderr.strip() or "Unknown error"
229
+ self.notify(f"Error: {error[:100]}...", severity="error", timeout=10)
230
+ except subprocess.TimeoutExpired:
231
+ self.notify("Command timed out after 30 seconds", severity="warning")
232
+ except Exception as e:
233
+ self.notify(f"Failed to execute: {str(e)}", severity="error")
234
+
235
+ def _copy_to_clipboard(self, command: str) -> None:
236
+ """Copy command to clipboard."""
237
+ try:
238
+ import pyperclip # type: ignore
239
+ pyperclip.copy(command)
240
+ self.notify(f"Copied: {command}", severity="information")
241
+ except ImportError:
242
+ self.notify("Install pyperclip to enable clipboard support", severity="warning")
243
+
244
+ def action_focus_search(self) -> None:
245
+ """Focus the search input."""
246
+ search_input = self.query_one("#search-input", Input)
247
+ search_input.focus()
248
+
249
+ def action_help(self) -> None:
250
+ """Show help information."""
251
+ help_text = """
252
+ Navigation:
253
+ - ↑↓: Navigate tree
254
+ - Enter: Expand/collapse node
255
+ - /: Focus search
256
+ - c: Copy command to clipboard
257
+ - r: Run command directly (no args)
258
+ - b: Build command with arguments
259
+ - q: Quit
260
+ - ?: Show this help
261
+ """
262
+ self.notify(help_text, severity="information", timeout=10)
@@ -0,0 +1,15 @@
1
+ """
2
+ Search bar widget for filtering commands.
3
+ """
4
+
5
+ from textual.app import ComposeResult
6
+ from textual.containers import Horizontal
7
+ from textual.widgets import Label, Input
8
+
9
+
10
+ class SearchBar(Horizontal):
11
+ """Search bar widget."""
12
+
13
+ def compose(self) -> ComposeResult:
14
+ yield Label("🔍 Search: ", classes="search-label")
15
+ yield Input(placeholder="Type to search commands...", id="search-input")
@@ -10,6 +10,7 @@ PROMPT_PATH="$REPO_ROOT/src/machineconfig/scripts/python/helpers_fire/prompt.txt
10
10
  AGENTS_DIR="$REPO_ROOT/.ai/agents/$JOB_NAME"
11
11
  LAYOUT_PATH_UNBALANCED="$REPO_ROOT/.ai/agents/$JOB_NAME/layout_unbalanced.json"
12
12
 
13
+ # agents make-todo --output-path $CONTEXT_PATH
13
14
  agents create \
14
15
  --context-path "$CONTEXT_PATH" \
15
16
  --tasks-per-prompt 1 \
@@ -130,9 +130,9 @@ def execute_installations(selected_options: list[str]) -> None:
130
130
  console.print(Panel("🐍 [bold green]PYTHON ENVIRONMENT[/bold green]\n[italic]Virtual environment setup[/italic]", border_style="green"))
131
131
  import platform
132
132
  if platform.system() == "Windows":
133
- run_shell_script(r"""$HOME\.local\bin\uv.exe tool install machineconfig""")
133
+ run_shell_script(r"""$HOME\.local\bin\uv.exe tool install machineconfig>=5.65""")
134
134
  else:
135
- run_shell_script("""$HOME/.local/bin/uv tool install machineconfig""")
135
+ run_shell_script("""$HOME/.local/bin/uv tool install machineconfig>=5.65""")
136
136
  if "install_ssh_server" in selected_options:
137
137
  console.print(Panel("🔒 [bold red]SSH SERVER[/bold red]\n[italic]Remote access setup[/italic]", border_style="red"))
138
138
  import platform
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: machineconfig
3
- Version: 5.65
3
+ Version: 5.66
4
4
  Summary: Dotfiles management package
5
5
  Author-email: Alex Al-Saffar <programmer@usa.com>
6
6
  License: Apache 2.0
@@ -120,18 +120,18 @@ machineconfig/scripts/linux/other/share_smb,sha256=HZX8BKgMlS9JzkGIYnxTsPvoxEBBu
120
120
  machineconfig/scripts/linux/other/start_docker,sha256=_yDN_PPqgzSUnPT7dmniMTpL4IfeeaGy1a2OL3IJlDU,525
121
121
  machineconfig/scripts/linux/other/switch_ip,sha256=NQfeKMBSbFY3eP6M-BadD-TQo5qMP96DTp77KHk2tU8,613
122
122
  machineconfig/scripts/python/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
123
- machineconfig/scripts/python/agents.py,sha256=WmMbj7MNLgELNuy5fKmgoF6BklSGwQ7xx8o63FnXLlo,10531
123
+ machineconfig/scripts/python/agents.py,sha256=hWft2sX7ruBU7nmvBfdrjtqNE4Stpu29W12KI-qhPRQ,8721
124
124
  machineconfig/scripts/python/cloud.py,sha256=_05zIiBzG4fKhFytg9mjvMBv4qMUtQJL0RtpYUJFZ3Y,920
125
125
  machineconfig/scripts/python/croshell.py,sha256=WGTsrk-ywJgotsZoWeFjUlY52r3YfmQa1gZHTBmZOA4,7186
126
126
  machineconfig/scripts/python/devops.py,sha256=U0_6h9R-1b9PBQraTVoYAzrhGdtjbwyVjlJl4iyeF2E,1583
127
- machineconfig/scripts/python/devops_navigator.py,sha256=_PlZrFrxbNHC1tRTx2n57pteUFdkszH9GtKq2JxEm4E,34940
127
+ machineconfig/scripts/python/devops_navigator.py,sha256=4O9_-ACeP748NcMjWQXZF7mBQpMPxqCGhLvPG3DMi4Q,236
128
128
  machineconfig/scripts/python/entry.py,sha256=hBqrwVDgUH-tISrscELh_FwVN576W1sb-RBO4ZVWRqU,1371
129
129
  machineconfig/scripts/python/fire_jobs.py,sha256=O5DrckUGLxGblOcLf_iXU31pmCSpTg-c0hQZxQKD1os,13591
130
130
  machineconfig/scripts/python/ftpx.py,sha256=Kgp0dKX_ULqLV2SP7-G9S_3yjpCqmNUu86X9fsYi4Rg,9399
131
- machineconfig/scripts/python/interactive.py,sha256=IRveYja_9omEEhRyM1M6_SlljPY2Eo_GGoK9tTi1nsk,11778
131
+ machineconfig/scripts/python/interactive.py,sha256=Ulxi1Abku8-FtIU7fVtB9PK2cYM3QdH8WuOb9seSCTw,11790
132
132
  machineconfig/scripts/python/sessions.py,sha256=PaMqJvlTbBdz_q5KxLiPwmpDGZvieg0ZTwqOxaoFfrA,9080
133
133
  machineconfig/scripts/python/ai/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
134
- machineconfig/scripts/python/ai/generate_files.py,sha256=Vfjgd0skJu-WTgqUxmOVFzaNMfSFBaFmY5oGGVY7MZY,2860
134
+ machineconfig/scripts/python/ai/generate_files.py,sha256=5nFiXc__J_8jy77y2B6jWMleCso2zP4Z3YQpZENqH5s,9829
135
135
  machineconfig/scripts/python/ai/initai.py,sha256=53MuUgk92avRPM-U3dy6o_pnEj2thlurC8U6dz41_W0,2089
136
136
  machineconfig/scripts/python/ai/scripts/lint_and_type_check.ps1,sha256=m_z4vzLrvi6bgTZumN8twcbIWb9i8ZHfVJPE8jPdxyc,5074
137
137
  machineconfig/scripts/python/ai/scripts/lint_and_type_check.sh,sha256=Mt9D0LSEwbvVaq_wxTAch4NLyFUuDGHjn6rtEt_9alU,4615
@@ -171,12 +171,12 @@ machineconfig/scripts/python/croshell_helpers/start_slidev.py,sha256=HfJReOusTPh
171
171
  machineconfig/scripts/python/croshell_helpers/viewer.py,sha256=heQNjB9fwn3xxbPgMofhv1Lp6Vtkl76YjjexWWBM0pM,2041
172
172
  machineconfig/scripts/python/croshell_helpers/viewer_template.py,sha256=ve3Q1-iKhCLc0VJijKvAeOYp2xaFOeIOC_XW956GWCc,3944
173
173
  machineconfig/scripts/python/devops_helpers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
174
- machineconfig/scripts/python/devops_helpers/cli_config.py,sha256=zAvEn5faletvuZupQfve0BYwbOOGp3nKI6BD7k3qH5g,3962
174
+ machineconfig/scripts/python/devops_helpers/cli_config.py,sha256=9-dfbtZEZc_NOeP7KxruP-OavIGBzJJJAI0cRx36p_g,3953
175
175
  machineconfig/scripts/python/devops_helpers/cli_config_dotfile.py,sha256=rjTys4FNf9_feP9flWM7Zvq17dxWmetSiGaHPxp25nk,2737
176
176
  machineconfig/scripts/python/devops_helpers/cli_data.py,sha256=f_2espL92n6SoNb5sFVMvrK7LA29HzfrFAKhxKaud1M,510
177
177
  machineconfig/scripts/python/devops_helpers/cli_nw.py,sha256=4Ko4dA8YXqiRJvuOuwZv3YOvnSJQ7-A11ezJ8EztDis,2068
178
178
  machineconfig/scripts/python/devops_helpers/cli_repos.py,sha256=GQJaCSnvNbIo_CmpYBDZOUyi0kPgn8VCr3a5Dnfy0_w,9681
179
- machineconfig/scripts/python/devops_helpers/cli_self.py,sha256=SIqqvrgQYNGFcJnRb7kwMaIcoJuKSDaCHCASR7g2IK0,2285
179
+ machineconfig/scripts/python/devops_helpers/cli_self.py,sha256=c0-DTkImxDPQyraxCTGO4z0pHAt-brC1pQw5nKLLVoI,2288
180
180
  machineconfig/scripts/python/devops_helpers/cli_share_server.py,sha256=285OzxttCx7YsrpOkaapMKP1eVGHmG5TkkaSQnY7i3c,3976
181
181
  machineconfig/scripts/python/devops_helpers/cli_terminal.py,sha256=k_PzXaiGyE0vXr0Ii1XcJz2A7UvyPJrR31TRWt4RKRI,6019
182
182
  machineconfig/scripts/python/devops_helpers/devops_add_identity.py,sha256=wvjNgqsLmqD2SxbNCW_usqfp0LI-TDvcJJKGOWt2oFw,3775
@@ -190,6 +190,13 @@ machineconfig/scripts/python/devops_helpers/themes/choose_wezterm_theme.py,sha25
190
190
  machineconfig/scripts/python/env_manager/__init__.py,sha256=E4LAHbU1wo2dLjE36ntv8U7QNTe8TasujUAYK9SLvWk,6
191
191
  machineconfig/scripts/python/env_manager/path_manager_backend.py,sha256=ZVGlGJALhg7zNABDdwXxL7MFbL2BXPebObipXSLGbic,1552
192
192
  machineconfig/scripts/python/env_manager/path_manager_tui.py,sha256=YAZb1KOVpkfTzwApk-KYPplwvDELeU62OIDdg82m-eQ,6748
193
+ machineconfig/scripts/python/helper_navigator/__init__.py,sha256=6YBy1l9ISjHE0LctVwSRMV_OFq29FOInwXFN0Ff7owM,758
194
+ machineconfig/scripts/python/helper_navigator/command_builder.py,sha256=tMIonhYPWpdPGaiGPRg8JDCvyW0h2uxL15uL_JyWsnk,4617
195
+ machineconfig/scripts/python/helper_navigator/command_detail.py,sha256=i4MdiCOVaXdRmLqr4K-F1Mk1u93bl5heIN97cRPCnzg,1692
196
+ machineconfig/scripts/python/helper_navigator/command_tree.py,sha256=EcyQmQJNW5HA1Zq_wwl6-uWwyrP1vd0hOWyDQny79Tc,19501
197
+ machineconfig/scripts/python/helper_navigator/data_models.py,sha256=62CIZ01rfCD2mKX_ihEVuhNzZ8FDnRSEIIQuyKOtmOg,533
198
+ machineconfig/scripts/python/helper_navigator/main_app.py,sha256=SCH2o7B-7clIMf9wTDs7yHtayPDqxP9atOQ0v6uaQr8,8621
199
+ machineconfig/scripts/python/helper_navigator/search_bar.py,sha256=kDi8Jhxap8wdm7YpDBtfhwcPnSqDPFrV2LqbcSBWMT4,414
193
200
  machineconfig/scripts/python/helpers_fire/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
194
201
  machineconfig/scripts/python/helpers_fire/fire_agents_help_launch.py,sha256=vgJMzSyLRTik2lnKYZsNzwoAF-z8Tp1aVi4wMvIJzPs,5627
195
202
  machineconfig/scripts/python/helpers_fire/fire_agents_help_search.py,sha256=qIfSS_su2YJ1Gb0_lu4cbjlJlYMBw0v52NTGiSrGjk8,2991
@@ -198,7 +205,7 @@ machineconfig/scripts/python/helpers_fire/fire_agents_load_balancer.py,sha256=mp
198
205
  machineconfig/scripts/python/helpers_fire/helpers4.py,sha256=iKR5vVJygaDIpFXhcdma9jOpyxKtUhmqcmalFxJmY0w,4749
199
206
  machineconfig/scripts/python/helpers_fire/prompt.txt,sha256=Ni6r-Dh0Ez2XwfOZl3MOMDhfn6BJ2z4IdK3wFvA3c_o,116
200
207
  machineconfig/scripts/python/helpers_fire/template.ps1,sha256=NWkYlM4_l9eT52lS9NdOxmEn548gyy-bl1Q3AU3YKxY,1085
201
- machineconfig/scripts/python/helpers_fire/template.sh,sha256=anCu6c5TwV6rdgn8t-ffWIWQ8SomjQg8kDkhcgNB87A,1125
208
+ machineconfig/scripts/python/helpers_fire/template.sh,sha256=ohK-hlH4IdUl827CacLmMLB8i5OgmY6q00ETd7bN9GQ,1172
202
209
  machineconfig/scripts/python/helpers_fire/agentic_frameworks/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
203
210
  machineconfig/scripts/python/helpers_fire/agentic_frameworks/fire_crush.json,sha256=YGuJF-qlMjhICPf0QnNfQlGNPsYrJJDlNcgmes0TFhM,252
204
211
  machineconfig/scripts/python/helpers_fire/agentic_frameworks/fire_crush.py,sha256=-yRdVcKX_1XTUzWKNoNW9rjmn_NsJuk1pB5EKC4TKpU,1622
@@ -389,7 +396,6 @@ machineconfig/utils/terminal.py,sha256=IlmOByfQG-vjhaFFxxzU5rWzP5_qUzmalRfuey3PA
389
396
  machineconfig/utils/upgrade_packages.py,sha256=H96zVJEWXJW07nh5vhjuSCrPtXGqoUb7xeJsFYYdmCI,3330
390
397
  machineconfig/utils/ve.py,sha256=L-6PBXnQGXThiwWgheJMQoisAZOZA6SVCbGw2J-GFnI,2414
391
398
  machineconfig/utils/ai/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
392
- machineconfig/utils/ai/generate_file_checklist.py,sha256=ajbmhcBToRugl75c_KZRq2XJumxKgIqQhyf7_YtF5q4,2729
393
399
  machineconfig/utils/cloud/onedrive/README.md,sha256=i20oRG110AN0yLF3DARHfWXDJjPBiSgWI8CP2HQAqrk,3774
394
400
  machineconfig/utils/cloud/onedrive/setup_oauth.py,sha256=ZTVkqgrwbV_EoPvyT8dyOTUE0ur3BW4sa9o6QYtt5Bo,2341
395
401
  machineconfig/utils/cloud/onedrive/transaction.py,sha256=m-aNcnWj_gfZVvJOSpkdIqjZxU_3nXx2CA-qKbQgP3I,26232
@@ -408,8 +414,8 @@ machineconfig/utils/schemas/fire_agents/fire_agents_input.py,sha256=Xbi59rU35AzR
408
414
  machineconfig/utils/schemas/installer/installer_types.py,sha256=QClRY61QaduBPJoSpdmTIdgS9LS-RvE-QZ-D260tD3o,1214
409
415
  machineconfig/utils/schemas/layouts/layout_types.py,sha256=TcqlZdGVoH8htG5fHn1KWXhRdPueAcoyApppZsPAPto,2020
410
416
  machineconfig/utils/schemas/repos/repos_types.py,sha256=ECVr-3IVIo8yjmYmVXX2mnDDN1SLSwvQIhx4KDDQHBQ,405
411
- machineconfig-5.65.dist-info/METADATA,sha256=01MoV1Z9D9xY_qsMQISvMoGoNvNOXlJvNLgNW6e38l8,3103
412
- machineconfig-5.65.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
413
- machineconfig-5.65.dist-info/entry_points.txt,sha256=M0jwN_brZdXWhmNVeXLvdKxfkv8WhhXFZYcuKBA9qnk,418
414
- machineconfig-5.65.dist-info/top_level.txt,sha256=porRtB8qms8fOIUJgK-tO83_FeH6Bpe12oUVC670teA,14
415
- machineconfig-5.65.dist-info/RECORD,,
417
+ machineconfig-5.66.dist-info/METADATA,sha256=BdV63xX7hcbFUOPR31m0wbyRF5oK3fnC2edq8ux033w,3103
418
+ machineconfig-5.66.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
419
+ machineconfig-5.66.dist-info/entry_points.txt,sha256=M0jwN_brZdXWhmNVeXLvdKxfkv8WhhXFZYcuKBA9qnk,418
420
+ machineconfig-5.66.dist-info/top_level.txt,sha256=porRtB8qms8fOIUJgK-tO83_FeH6Bpe12oUVC670teA,14
421
+ machineconfig-5.66.dist-info/RECORD,,
@@ -1,68 +0,0 @@
1
- #!/usr/bin/env python
2
-
3
- from pathlib import Path
4
- from typing import List, Optional, Union, Annotated
5
- from rich.console import Console
6
- from rich.panel import Panel
7
-
8
- import typer
9
-
10
- def generate_file_checklist(repo_root: Union[str, Path], exclude_dirs: Optional[List[str]] = None) -> Path:
11
- actual_exclude_dirs: List[str] = [".venv", ".git", "__pycache__", "build", "dist", "*.egg-info"]
12
- if exclude_dirs is not None:
13
- actual_exclude_dirs = exclude_dirs
14
- repo_root = Path(repo_root).expanduser().absolute()
15
- output_path: Path = repo_root / ".ai" / "repo_task" / "file_checklist.md"
16
- py_files: List[Path] = []
17
- for filepath in repo_root.glob("**/*.py"):
18
- if any(excl in filepath.parts for excl in actual_exclude_dirs) or any(filepath.match(f"**/{excl}/**") for excl in actual_exclude_dirs) or filepath.name == "__init__.py":
19
- continue
20
- py_files.append(filepath.relative_to(repo_root))
21
-
22
- sh_files: List[Path] = []
23
- for filepath in repo_root.glob("**/*.sh"):
24
- if any(excl in filepath.parts for excl in actual_exclude_dirs) or any(filepath.match(f"**/{excl}/**") for excl in actual_exclude_dirs):
25
- continue
26
- sh_files.append(filepath.relative_to(repo_root))
27
-
28
- py_files.sort()
29
- sh_files.sort()
30
-
31
- markdown_content: str = "# File Checklist\n\n"
32
-
33
- markdown_content += "## Python Files\n\n"
34
- for py_file in py_files:
35
- markdown_content += f"- [ ] {py_file}\n"
36
-
37
- markdown_content += "\n## Shell Script Files\n\n"
38
- for sh_file in sh_files:
39
- markdown_content += f"- [ ] {sh_file}\n"
40
- Path(output_path).parent.mkdir(parents=True, exist_ok=True)
41
- Path(output_path).write_text(markdown_content, encoding="utf-8")
42
-
43
- print(f"📋 Checklist generated at: {output_path}")
44
- return output_path
45
- def main(
46
- repo: Annotated[str, typer.Argument(help="Repository root path. Defaults to current working directory.")] = str(Path.cwd()),
47
- exclude: Annotated[Optional[List[str]], typer.Option("--exclude", "-e", help="Additional directories to exclude (by default excludes .venv, .git, __pycache__, build, dist, *.egg-info)")] = None,
48
- ) -> None:
49
- exclude_dirs: List[str] = [".venv", ".git", "__pycache__", "build", "dist", "*.egg-info"]
50
- if exclude:
51
- exclude_dirs.extend(exclude)
52
- if repo == "":
53
- print("Error: Repository path cannot be empty.")
54
- return
55
-
56
- output_path = generate_file_checklist(repo, exclude_dirs)
57
- console = Console()
58
- console.print(Panel(f"✅ SUCCESS | Markdown checklist generated successfully!\n📄 File Location: {output_path}", border_style="bold blue", expand=False))
59
-
60
-
61
- def main_from_parser():
62
- typer.run(main)
63
-
64
-
65
-
66
-
67
- if __name__ == "__main__":
68
- main_from_parser()