Skip to main content

lc-dir

Instantly copy all relevant Python files from any folder in your project to your clipboard—perfect for use with AI code assistants and LLMs.


Why use lc-dir?

When working with LLMs (like ChatGPT, Claude, or Copilot), you often need to share only part of your codebase—a single directory, a feature, or a component, not the whole repo.

lc-dir lets you do exactly that.

  • No more zipping folders or hand-pasting dozens of files.
  • No more sending the entire project when only one area matters.
  • Get context for refactoring, debugging, or reviewing code fast.

Key Features

  • Easy: Instantly copies all .py files under any directory (recursively) to your clipboard, ready for LLMs.
  • Flexible: Works from any subfolder, or specify any target directory.
  • Search: Give it a folder name; it’ll find the match for you.
  • Integrated: Uses your llm-context workflow for formatting and clipboard.

Installation

first install llm-context CLI if you haven't already:

pipx install llm-context

Then, install lc-dir:

pipx install lc-dir

(or use pip install --user lc-dir if you prefer)

Requirements:

  • Python 3.10+
  • The llm-context CLI, initialized in your project (run lc-init once per repo).

How to Use

Example: Copy all .py files from the current directory and below:

lc-dir

Example: Copy all .py files from a specific subdirectory (recursively):

lc-dir path/to/subdir

Example: Search for a folder by name, even if you’re not sure where it is:

lc-dir common

If more than one match is found, you’ll be prompted to choose.


Typical Workflow

  1. Navigate anywhere in your project directory tree.

  2. Run lc-dir [optional-subfolder]

  3. Paste in your LLM interface.

    • The clipboard will contain all relevant code, formatted for LLMs, just as if you ran llm-context but limited to your chosen scope.

Use Cases

  • LLM-powered code review: Share just the area you want help with.
  • Refactoring: Provide only the module or feature you’re working on.
  • Bug fixing: Send just the files around the problem.
  • Onboarding: Give teammates or LLMs a focused view of part of the repo.

Troubleshooting

  • If the clipboard isn’t updated, ensure you’ve initialized your repo with lc-init.
  • If you see “ModuleNotFoundError”, re-install with pipx install lc-dir and check your Python version.
  • You must have llm-context CLI installed in the project for this to work.

License

MIT


Contributions and issues welcome!

Metadata

Release files for lc-dir 0.1.16

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lc-dir 0.1.16
File Size Uploaded
lc_dir-0.1.16.tar.gz 5.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for lc-dir 0.1.16
File Interpreter ABI Platform
lc_dir-0.1.16-py3-none-any.whl Python 3 none any Details

Total release size: 11.1 kB

Release files / lc_dir-0.1.16.tar.gz

Download URL lc_dir-0.1.16.tar.gz
Size 5.2 kB
Tags Source
SHA-256 checksum
How to use checksums
b48d19cda3f853bd04f9e112bc98d1cb213b8f4aee58f5fb04a2321fd9e460c2
BLAKE2b-256 checksum
How to use checksums
69eba48e10f4864456bf099d9304e01c2f18228f414c5a8bac9e0d766620fa1c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.1.2 CPython/3.12.8 Windows/11

Release files / lc_dir-0.1.16-py3-none-any.whl

Download URL lc_dir-0.1.16-py3-none-any.whl
Size 5.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e8ef1145dc303bd8f3b53c6fe57f63bf973d8c3b3ff301ebea4992e0d525394b
BLAKE2b-256 checksum
How to use checksums
f5646c1a94416a9195f25b9cc5f3bac662cef5011890ae0e8f66026c6b795200
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.1.2 CPython/3.12.8 Windows/11

Release history Release notifications | RSS feed

This release

0.1.16 This release

2 release files

0.1.13

2 release files

0.1.12

2 release files

0.1.11

2 release files

0.1.10

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page