Skip to main content

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:

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:

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


Download files

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

Source Distribution

context_curse-0.0.1.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

context_curse-0.0.1-py3-none-any.whl (6.6 kB view details)

Uploaded Python 3

File details

Details for the file context_curse-0.0.1.tar.gz.

File metadata

  • Download URL: context_curse-0.0.1.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.0 CPython/3.12.5

File hashes

Hashes for context_curse-0.0.1.tar.gz
Algorithm Hash digest
SHA256 340bb65d8232e489347d4e09821b3ec1cee698c120a459f408707dc9ec89fd25
MD5 10ccf42c13a76d2206d4661bf220707c
BLAKE2b-256 d09c71bd0f89d8c62bb3e944f2b0ba16d5e9e8c136ddd5ddd88f0dd058765183

See more details on using hashes here.

File details

Details for the file context_curse-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for context_curse-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d10b98dd4497f78ef4939879b4ff17acaa6a0bddfdeaf0bac830cb38ed7f9d32
MD5 cbc11f0aac43a4e5bef10a066dfaab91
BLAKE2b-256 3824c108d4987febc2c749b7347840ef94d8e8472f73d2e4daa1610d9d97f6ce

See more details on using hashes here.

Supported by

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