llm-ide-rules 0.2.1__tar.gz → 0.3.0__tar.gz
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-0.2.1 → llm_ide_rules-0.3.0}/PKG-INFO +2 -2
- {llm_ide_rules-0.2.1 → llm_ide_rules-0.3.0}/README.md +1 -1
- {llm_ide_rules-0.2.1 → llm_ide_rules-0.3.0}/pyproject.toml +1 -1
- {llm_ide_rules-0.2.1 → llm_ide_rules-0.3.0}/src/llm_ide_rules/__init__.py +1 -1
- {llm_ide_rules-0.2.1 → llm_ide_rules-0.3.0}/src/llm_ide_rules/commands/download.py +56 -1
- {llm_ide_rules-0.2.1 → llm_ide_rules-0.3.0}/src/llm_ide_rules/__main__.py +0 -0
- {llm_ide_rules-0.2.1 → llm_ide_rules-0.3.0}/src/llm_ide_rules/commands/explode.py +0 -0
- {llm_ide_rules-0.2.1 → llm_ide_rules-0.3.0}/src/llm_ide_rules/commands/implode.py +0 -0
- {llm_ide_rules-0.2.1 → llm_ide_rules-0.3.0}/src/llm_ide_rules/constants.py +0 -0
- {llm_ide_rules-0.2.1 → llm_ide_rules-0.3.0}/src/llm_ide_rules/sections.json +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: llm-ide-rules
|
|
3
|
-
Version: 0.
|
|
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
|
|
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
|
|
|
@@ -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.
|
|
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[
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|