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.2.tar.gz (6.1 kB view details)

Uploaded Source

Built Distribution

context_curse-0.0.2-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: context_curse-0.0.2.tar.gz
  • Upload date:
  • Size: 6.1 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.2.tar.gz
Algorithm Hash digest
SHA256 8a8a836a015487bebaa9d745497a9833b5ee974e2dd3bc2a879bde4e4e0bde9e
MD5 63984ab770552fe6377f765f71f26a71
BLAKE2b-256 ff4bf15ba4e65338cabea96d6c3b7b4731e7c67f5bed6d4aa6c2c17a2235fd0d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for context_curse-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ce5eb599d3406261129472eea3bf64b31a8778075c6c22ecb1f917b500dd02f6
MD5 3921189a919bd1a683ee2472f418eb84
BLAKE2b-256 8c61f39c3cdcbb21883f6b6fecd2cae2f679fd971d6188857d0c193ad5bbcb39

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