A CLI tool for managing files and directories before feeding them into an LLM.
Project description
Context Curse
Context Curse is a command-line tool designed to manage files and directories, specifically for preparing data before feeding it into a language model (LLM) with a limited context window. It provides a terminal-based interface for selecting and managing files and directories.
Features
Navigation: Navigate through directories and files. Selection: Select or deselect files and directories. Expansion/Collapse: Expand or collapse directories to view or hide their contents. Save Selections: Save selected files and directories to a specified output file. Massive File Generation: Generate a comprehensive file combining the contents of selected files and directories.
Installation
You can install Context Curse using pip:
pip install context-curse
Usage
After installation, you can run the context_curse command from your terminal. The available options are:
python -m context_curse -h
Options
-
-e, --extensions Comma-separated list of file extensions to keep (e.g., py,txt).
-
-i, --input Path to a text file containing a list of paths to keep, one per line.
-
-o, --output Path to the output text file where selected paths will be saved.
Example
To run Context Curse with a specific configuration, use the following command:
python -m context_curse -e "py,txt" -i "preferences.txt" -o "preferences.txt"
the code above takes in the 'preferences.txt' file, which contains a list of paths to keep, and saves the selected paths to the same file. the code also creates a 'preferences_massive.txt' file that contains the combined contents of the selected files and directories.
Commands
While running Context Curse, use the following commands in the terminal interface:
- ↑/↓ : Navigate through items.
- Enter : Select or deselect the current item.
- Space : Expand or collapse directories.
- s : Save the current selections.
- q : Quit the application.
Colors
- Green: Kept files or directories.
- Yellow: Mixed state (partially kept).
- White: Not kept files or directories.
Contributing
Contributions to Context Curse are welcome. Please submit issues and pull requests on the GitHub repository.
Acknowledgements
Context Curse utilizes the curses library for terminal-based UI and argparse for command-line argument parsing.
Feel free to adjust any sections or add additional details relevant to your project!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file context_curse-0.0.3.tar.gz
.
File metadata
- Download URL: context_curse-0.0.3.tar.gz
- Upload date:
- Size: 6.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7a1a6f71b7aa1adddaa72ca4f7f4dfc641024ba1f984e75e3a88c904050971bf |
|
MD5 | 2797deb2a1b3ab42a526a93ead615f39 |
|
BLAKE2b-256 | 66963dc81f1841a7890a106a7ca2f2c08484876486e364fb2739f663060ad00b |
Provenance
The following attestation bundles were made for context_curse-0.0.3.tar.gz
:
Publisher:
publish.yml
on bin2ai/context_curse
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
context_curse-0.0.3.tar.gz
- Subject digest:
7a1a6f71b7aa1adddaa72ca4f7f4dfc641024ba1f984e75e3a88c904050971bf
- Sigstore transparency entry: 146282561
- Sigstore integration time:
- Predicate type:
File details
Details for the file context_curse-0.0.3-py3-none-any.whl
.
File metadata
- Download URL: context_curse-0.0.3-py3-none-any.whl
- Upload date:
- Size: 7.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 96094b4953a3fbdf37b2c46ccf68617c09ab87dbda34a17e1302606cff157aa9 |
|
MD5 | 9bec97e3fe696d50f06178ba73064bc6 |
|
BLAKE2b-256 | 6c6800b38143b432fef56de6335da39f541543d896338059d21108aae0d226fb |
Provenance
The following attestation bundles were made for context_curse-0.0.3-py3-none-any.whl
:
Publisher:
publish.yml
on bin2ai/context_curse
-
Statement type:
https://in-toto.io/Statement/v1
- Predicate type:
https://docs.pypi.org/attestations/publish/v1
- Subject name:
context_curse-0.0.3-py3-none-any.whl
- Subject digest:
96094b4953a3fbdf37b2c46ccf68617c09ab87dbda34a17e1302606cff157aa9
- Sigstore transparency entry: 146282572
- Sigstore integration time:
- Predicate type: