llm-ide-rules 0.2.1__py3-none-any.whl → 0.3.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
llm_ide_rules/__init__.py CHANGED
@@ -7,7 +7,7 @@ from llm_ide_rules.commands.explode import explode_main
7
7
  from llm_ide_rules.commands.implode import cursor, github
8
8
  from llm_ide_rules.commands.download import download_main
9
9
 
10
- __version__ = "0.2.1"
10
+ __version__ = "0.3.0"
11
11
 
12
12
  app = typer.Typer(
13
13
  name="llm_ide_rules",
@@ -50,6 +50,7 @@ INSTRUCTION_TYPES = {
50
50
  "gemini": {"directories": [], "files": ["GEMINI.md"]},
51
51
  "claude": {"directories": [], "files": ["CLAUDE.md"]},
52
52
  "agent": {"directories": [], "files": ["AGENT.md"]},
53
+ "agents": {"directories": [], "files": [], "recursive_files": ["AGENTS.md"]},
53
54
  }
54
55
 
55
56
  # Default types to download when no specific types are specified
@@ -147,6 +148,60 @@ def copy_instruction_files(
147
148
  target_file.write_bytes(source_file.read_bytes())
148
149
  copied_items.append(file_name)
149
150
 
151
+ # Copy recursive files (search throughout repository)
152
+ for file_pattern in config.get("recursive_files", []):
153
+ copied_recursive = copy_recursive_files(repo_dir, target_dir, file_pattern)
154
+ copied_items.extend(copied_recursive)
155
+
156
+ return copied_items
157
+
158
+
159
+ def copy_recursive_files(
160
+ repo_dir: Path, target_dir: Path, file_pattern: str
161
+ ) -> List[str]:
162
+ """Recursively copy files matching pattern, preserving directory structure.
163
+
164
+ Only copies files to locations where the target directory already exists.
165
+ Warns and skips files where target directories don't exist.
166
+
167
+ Args:
168
+ repo_dir: Source repository directory
169
+ target_dir: Target directory to copy to
170
+ file_pattern: File pattern to search for (e.g., "AGENTS.md")
171
+
172
+ Returns:
173
+ List of copied file paths relative to target_dir
174
+ """
175
+ copied_items = []
176
+
177
+ # Find all matching files recursively
178
+ matching_files = list(repo_dir.rglob(file_pattern))
179
+
180
+ for source_file in matching_files:
181
+ # Calculate relative path from repo root
182
+ relative_path = source_file.relative_to(repo_dir)
183
+ target_file = target_dir / relative_path
184
+
185
+ # Check if target directory already exists
186
+ target_parent = target_file.parent
187
+ if not target_parent.exists():
188
+ logger.warning(
189
+ "Target directory does not exist, skipping file copy",
190
+ target_directory=str(target_parent),
191
+ file=str(relative_path)
192
+ )
193
+ continue
194
+
195
+ logger.info(
196
+ "Copying recursive file",
197
+ source=str(source_file),
198
+ target=str(target_file)
199
+ )
200
+
201
+ # Copy file (parent directory already exists)
202
+ target_file.write_bytes(source_file.read_bytes())
203
+ copied_items.append(str(relative_path))
204
+
150
205
  return copied_items
151
206
 
152
207
 
@@ -185,7 +240,7 @@ def download_main(
185
240
  instruction_types: Annotated[
186
241
  List[str],
187
242
  typer.Argument(
188
- help="Types of instructions to download (cursor, github, gemini, claude, agent). Downloads everything by default."
243
+ help="Types of instructions to download (cursor, github, gemini, claude, agent, agents). Downloads everything by default."
189
244
  ),
190
245
  ] = None,
191
246
  repo: Annotated[
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: llm-ide-rules
3
- Version: 0.2.1
3
+ Version: 0.3.0
4
4
  Summary: CLI tool for managing LLM IDE prompts and rules
5
5
  Keywords: llm,ide,prompts,cursor,copilot
6
6
  Author: Michael Bianco
@@ -12,7 +12,7 @@ Requires-Python: >=3.9
12
12
  Project-URL: Repository, https://github.com/iloveitaly/llm-ide-rules
13
13
  Description-Content-Type: text/markdown
14
14
 
15
- # Copilot & Cursor LLM Instructions
15
+ # Copilot, Cursor, Claude, Gemini, etc LLM Instructions
16
16
 
17
17
  Going to try to centralize all my prompts in a single place and create some scripts to help convert from copilot to cursor, etc.
18
18
 
@@ -1,11 +1,11 @@
1
- llm_ide_rules/__init__.py,sha256=9f68d519624fd0727e5a90476799b634cc85f9630b484ee4d7502ec6903d4a12,1109
1
+ llm_ide_rules/__init__.py,sha256=408427436c4396405fb60da182501acab7a13a981c046d053355e45bcf6c8469,1109
2
2
  llm_ide_rules/__main__.py,sha256=881447dbad0fe837590fa8224f1d0dd70416fd5344779978d07744ff8e0cf868,144
3
- llm_ide_rules/commands/download.py,sha256=b2f311dda452722e2f26988c681de874b4b6d4724282877c28b1ed3c39c0a95f,9033
3
+ llm_ide_rules/commands/download.py,sha256=06c2a841db5fe0b0f7f3e8c99ad198c8e07e53d8801fb4d95e802ecee60cda31,11022
4
4
  llm_ide_rules/commands/explode.py,sha256=a8ace601155055a0061e47da7e99a672334796f1ebb91b24c3adf905f65e1645,11196
5
5
  llm_ide_rules/commands/implode.py,sha256=35282bfc83be808f12e9e9ce7af1bae4069e53bd8f441948e3551339b2e9418d,8847
6
6
  llm_ide_rules/constants.py,sha256=1182b9757ca58d038a4878d1b55570aac4f0287f1a5ab5af8d68331b799b0686,1118
7
7
  llm_ide_rules/sections.json,sha256=9ed1725e44d8a29364e5ac3f01e0e6e03ff17cd45c280846659b7f73940b668b,549
8
- llm_ide_rules-0.2.1.dist-info/WHEEL,sha256=0f7d664a881437bddec71c703c3c2f01fd13581519f95130abcc96e296ef0426,79
9
- llm_ide_rules-0.2.1.dist-info/entry_points.txt,sha256=c6c00b5d607048489fcfed8c8a47bbb364b0a8dbb5b5a2ecffe11c986ace35e3,54
10
- llm_ide_rules-0.2.1.dist-info/METADATA,sha256=5a7df6883922e7010ea93322e14a2a1bc7324ab6be30e94241bd608ba48059c6,3777
11
- llm_ide_rules-0.2.1.dist-info/RECORD,,
8
+ llm_ide_rules-0.3.0.dist-info/WHEEL,sha256=0f7d664a881437bddec71c703c3c2f01fd13581519f95130abcc96e296ef0426,79
9
+ llm_ide_rules-0.3.0.dist-info/entry_points.txt,sha256=c6c00b5d607048489fcfed8c8a47bbb364b0a8dbb5b5a2ecffe11c986ace35e3,54
10
+ llm_ide_rules-0.3.0.dist-info/METADATA,sha256=26488fca69a37f46f9d790575fde7f89de29244e01a8c7ec1a5112c9fa8f6cf7,3797
11
+ llm_ide_rules-0.3.0.dist-info/RECORD,,