Skip to main content

CLI tool for managing LLM IDE prompts and rules

Project description

Release Notes Downloads GitHub CI Status License: MIT

Copilot, Cursor, Claude, Gemini, etc LLM Instructions

This project makes it easy to download prompts and implode/explode them so they can be used by various providers. It's completely vibe coded, but it works.

I don't want to be tied to a specific IDE and it's a pain to have to edit instructions for various languages across a ton of different files.

Additionally, it becomes challenging to copy these prompts into various projects and contribute them back to a single location.

Some of the glob assumptions in this repo are specific to how I've chosen to organize python and typescript in the python starter template and what tooling (fastapi, etc) that I've chosen to use.

IDE Format Comparison

Different AI coding assistants use different formats for instructions and commands:

IDE type folder Notes
Cursor instructions .cursor/rules/*.mdc Multiple plain markdown files
Cursor commands .cursor/commands/*.md Plain markdown, no frontmatter
Claude Code instructions .claude/rules/**/*.md Markdown rules, optional paths: frontmatter
Claude Code commands .claude/commands/*.md Plain markdown, no frontmatter
GitHub Copilot instructions .github/copilot-instructions.md Single markdown file
GitHub Copilot instructions .github/instructions/*.instructions.md Multiple instruction files
GitHub Copilot prompts .github/prompts/*.prompt.md YAML frontmatter with mode: 'agent'
Gemini CLI instructions AGENTS.md Single markdown file at root
Gemini CLI commands .gemini/commands/*.toml TOML format, supports {{args}} and shell commands
OpenCode commands .opencode/commands/*.md Plain markdown, no frontmatter

Installation

uvx llm-ide-rules@latest --help

Usage

CLI Commands

The llm-ide-rules CLI provides commands to manage LLM IDE prompts and rules:

# Convert instruction file to separate rule files
uvx llm-ide-rules explode [input_file]

# Bundle rule files back into a single instruction file
uvx llm-ide-rules implode cursor [output_file]     # Bundle Cursor rules
uvx llm-ide-rules implode github [output_file]     # Bundle GitHub/Copilot instructions
uvx llm-ide-rules implode claude [output_file]     # Bundle Claude Code rules + commands
uvx llm-ide-rules implode gemini [output_file]     # Bundle Gemini CLI commands
uvx llm-ide-rules implode opencode [output_file]   # Bundle OpenCode commands

# Download instruction files from repositories
uvx llm-ide-rules download [instruction_types]    # Download everything by default
uvx llm-ide-rules download cursor github          # Download specific types
uvx llm-ide-rules download --repo other/repo      # Download from different repo

# Delete downloaded instruction files
uvx llm-ide-rules delete [instruction_types]      # Delete everything by default
uvx llm-ide-rules delete cursor gemini            # Delete specific types
uvx llm-ide-rules delete --yes                    # Skip confirmation prompt

Authentication

To avoid GitHub API rate limits or to access private repositories, you can set the GITHUB_TOKEN environment variable. The download command will automatically use this token for authentication.

export GITHUB_TOKEN=your_token_here
uvx llm-ide-rules download

Customizing Instructions

If you have repository-specific instructions that you want to maintain locally while still being able to download upstream updates, you can use the <!-- END CLONED INSTRUCTIONS --> marker.

  1. Add the marker at the end of your local instructions.md.
  2. Add your custom instructions below it.

When you run llm_ide_rules download again, the tool will:

  • Extract everything after the marker in your local file.
  • Download the latest upstream instructions.md.
  • Append your local custom instructions back to the end.
# Upstream Instructions
...

<!-- END CLONED INSTRUCTIONS -->

# My Custom Local Rules
- Use tabs for indentation in this project.

Examples

# Explode instructions.md into all supported formats (cursor, github, claude, gemini, opencode)
uvx llm-ide-rules explode instructions.md

# Explode for a specific agent only
uvx llm-ide-rules explode instructions.md --agent opencode

# Bundle Cursor rules back into a single file
uvx llm-ide-rules implode cursor bundled-instructions.md

# Bundle GitHub instructions with verbose logging
uvx llm-ide-rules implode github --verbose instructions.md

# Bundle OpenCode commands into commands.md
uvx llm-ide-rules implode opencode

# Download everything from default repository
uvx llm-ide-rules download

# Download only specific instruction types
uvx llm-ide-rules download cursor github

# Download from a different repository
uvx llm-ide-rules download --repo other-user/other-repo --target ./my-project

# Delete all downloaded files (with confirmation)
uvx llm-ide-rules delete

# Delete specific instruction types
uvx llm-ide-rules delete cursor gemini --target ./my-project

# Delete without confirmation prompt
uvx llm-ide-rules delete --yes

Extracting Changes

The idea of this repo is you'll copy prompts into your various projects. Then, if you improve a prompt in a project, you can pull that change into this upstream repo.

Here's how to do it:

git diff .github/instructions | pbcopy
pbpaste | gpatch -p1

gpatch is an updated version of patch on macOS that seems to work much better for me.

Related Links


This project was created from iloveitaly/python-package-template

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

llm_ide_rules-0.13.0.tar.gz (26.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

llm_ide_rules-0.13.0-py3-none-any.whl (39.4 kB view details)

Uploaded Python 3

File details

Details for the file llm_ide_rules-0.13.0.tar.gz.

File metadata

  • Download URL: llm_ide_rules-0.13.0.tar.gz
  • Upload date:
  • Size: 26.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.11 {"installer":{"name":"uv","version":"0.10.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for llm_ide_rules-0.13.0.tar.gz
Algorithm Hash digest
SHA256 89b86b8a275360fd9faa0c8351c3fc9d7f325c6bc2035ca2ee80d10396b8a65f
MD5 d36b163d93b93bc854fab087da153e47
BLAKE2b-256 f9ab0f731126588e8a342fb3940b03d95104f74f34fe1fb9d744e72a192827d3

See more details on using hashes here.

File details

Details for the file llm_ide_rules-0.13.0-py3-none-any.whl.

File metadata

  • Download URL: llm_ide_rules-0.13.0-py3-none-any.whl
  • Upload date:
  • Size: 39.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.10.11 {"installer":{"name":"uv","version":"0.10.11","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for llm_ide_rules-0.13.0-py3-none-any.whl
Algorithm Hash digest
SHA256 db1fd02b0b21e1e14a52d4e8ca161a7d4a7ffda15c720dcfcdeb207fbc72b530
MD5 0ab77196a45809a675f6233ebbb4a905
BLAKE2b-256 62cfe140a72afb891a125ba38354856e10059cccac8fad6343c9a5922197dcd6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page