llmcxt


Namellmcxt JSON
Version 0.1.3 PyPI version JSON
download
home_pagehttps://github.com/cabeywic/llmcxt.git
SummaryA tool to manage and generate context for Large Language Models from project files
upload_time2024-08-03 08:15:34
maintainerNone
docs_urlNone
authorCharaka Abeywickrama
requires_python>=3.6
licenseNone
keywords llm context cli
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # llmcxt (LLM Context Tool)

llmcxt is a command-line tool designed to manage and generate context for Large Language Models (LLMs) from your project files. It allows you to easily add, remove, and list files in your project, and generate a comprehensive context that includes both the project structure and the contents of selected files.

## Features

- Add single or multiple files to the context
- Remove single or multiple files from the context
- List the project structure
- Generate a comprehensive context for LLMs
- Ignore files based on .cxtignore or .gitignore patterns
- Colorized output for better readability
- Easy cleanup with a delete command
- Automatically copy generated context to clipboard (optional)
- View list of files in the current context

## Installation

You can install llmcxt directly from PyPI:

```
pip install llmcxt
```

## Usage

After installation, you can use the `llmcxt` command from anywhere in your project directory. The tool will look for a `.cxtignore` file (or `.gitignore` if `.cxtignore` is not found) in the parent directories to determine the project root.

### Basic Commands

- Add file(s) to context:
  ```
  llmcxt add <file1> [<file2> ...]
  ```

- Remove file(s) from context:
  ```
  llmcxt remove <file1> [<file2> ...]
  ```

- List project structure:
  ```
  llmcxt ls
  ```

- Generate context:
  ```
  llmcxt generate
  ```

- Generate context and copy to clipboard:
  ```
  llmcxt generate --clipboard
  ```

- View current context (file paths):
  ```
  llmcxt context
  ```

- Drop all context:
  ```
  llmcxt drop
  ```

- Delete llmcxt and all related files:
  ```
  llmcxt delete
  ```

### Examples

1. Add multiple files to the context:
   ```
   llmcxt add src/main.py tests/test_main.py
   ```

2. Remove a file from the context:
   ```
   llmcxt remove src/deprecated.py
   ```

3. Generate context for LLM:
   ```
   llmcxt generate > llm_context.txt
   ```

## Configuration

### Ignore File

Create a `.cxtignore` file in your project root to specify patterns for files and directories that should be ignored. If `.cxtignore` is not found, the tool will fall back to using `.gitignore`.

Example `.cxtignore`:
```
# Ignore Python cache files
__pycache__/
*.pyc

# Ignore virtual environment
venv/

# Ignore .git directory
.git/

# Ignore the configuration file itself
.llmcxt_config.json
```

## Uninstallation

To remove llmcxt and all related files, run:
```
llmcxt delete
```

This will prompt for confirmation before removing the tool and its dependencies.

## Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/cabeywic/llmcxt.git",
    "name": "llmcxt",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": null,
    "keywords": "llm, context, cli",
    "author": "Charaka Abeywickrama",
    "author_email": "Charaka Abeywickrama <charaka.abeywickrama@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/8f/7c/229e92ddf2f420526f15bd0c13111747f8c6e2f76414303f2e96a4c7bd65/llmcxt-0.1.3.tar.gz",
    "platform": null,
    "description": "# llmcxt (LLM Context Tool)\n\nllmcxt is a command-line tool designed to manage and generate context for Large Language Models (LLMs) from your project files. It allows you to easily add, remove, and list files in your project, and generate a comprehensive context that includes both the project structure and the contents of selected files.\n\n## Features\n\n- Add single or multiple files to the context\n- Remove single or multiple files from the context\n- List the project structure\n- Generate a comprehensive context for LLMs\n- Ignore files based on .cxtignore or .gitignore patterns\n- Colorized output for better readability\n- Easy cleanup with a delete command\n- Automatically copy generated context to clipboard (optional)\n- View list of files in the current context\n\n## Installation\n\nYou can install llmcxt directly from PyPI:\n\n```\npip install llmcxt\n```\n\n## Usage\n\nAfter installation, you can use the `llmcxt` command from anywhere in your project directory. The tool will look for a `.cxtignore` file (or `.gitignore` if `.cxtignore` is not found) in the parent directories to determine the project root.\n\n### Basic Commands\n\n- Add file(s) to context:\n  ```\n  llmcxt add <file1> [<file2> ...]\n  ```\n\n- Remove file(s) from context:\n  ```\n  llmcxt remove <file1> [<file2> ...]\n  ```\n\n- List project structure:\n  ```\n  llmcxt ls\n  ```\n\n- Generate context:\n  ```\n  llmcxt generate\n  ```\n\n- Generate context and copy to clipboard:\n  ```\n  llmcxt generate --clipboard\n  ```\n\n- View current context (file paths):\n  ```\n  llmcxt context\n  ```\n\n- Drop all context:\n  ```\n  llmcxt drop\n  ```\n\n- Delete llmcxt and all related files:\n  ```\n  llmcxt delete\n  ```\n\n### Examples\n\n1. Add multiple files to the context:\n   ```\n   llmcxt add src/main.py tests/test_main.py\n   ```\n\n2. Remove a file from the context:\n   ```\n   llmcxt remove src/deprecated.py\n   ```\n\n3. Generate context for LLM:\n   ```\n   llmcxt generate > llm_context.txt\n   ```\n\n## Configuration\n\n### Ignore File\n\nCreate a `.cxtignore` file in your project root to specify patterns for files and directories that should be ignored. If `.cxtignore` is not found, the tool will fall back to using `.gitignore`.\n\nExample `.cxtignore`:\n```\n# Ignore Python cache files\n__pycache__/\n*.pyc\n\n# Ignore virtual environment\nvenv/\n\n# Ignore .git directory\n.git/\n\n# Ignore the configuration file itself\n.llmcxt_config.json\n```\n\n## Uninstallation\n\nTo remove llmcxt and all related files, run:\n```\nllmcxt delete\n```\n\nThis will prompt for confirmation before removing the tool and its dependencies.\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "A tool to manage and generate context for Large Language Models from project files",
    "version": "0.1.3",
    "project_urls": {
        "Homepage": "https://github.com/cabeywic/llmcxt.git"
    },
    "split_keywords": [
        "llm",
        " context",
        " cli"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e09eaf74f8de4079f3179ff4e152732fb12f2dd8c1dfb0e7c9c6377518fe0fdf",
                "md5": "2a65ce17ead4d30b31b18ad694ca5d16",
                "sha256": "55ac1193d79c2b1828b9e852a6aaa446f7b240d1be9552edbaf3155a9f08f59b"
            },
            "downloads": -1,
            "filename": "llmcxt-0.1.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "2a65ce17ead4d30b31b18ad694ca5d16",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 7800,
            "upload_time": "2024-08-03T08:15:33",
            "upload_time_iso_8601": "2024-08-03T08:15:33.217397Z",
            "url": "https://files.pythonhosted.org/packages/e0/9e/af74f8de4079f3179ff4e152732fb12f2dd8c1dfb0e7c9c6377518fe0fdf/llmcxt-0.1.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8f7c229e92ddf2f420526f15bd0c13111747f8c6e2f76414303f2e96a4c7bd65",
                "md5": "76bfe7b4ef51b57ee1863a0e46b89874",
                "sha256": "d53c4f9592699182d23b98dbfa32be600493a30427128ce1b8456e0203d5dffa"
            },
            "downloads": -1,
            "filename": "llmcxt-0.1.3.tar.gz",
            "has_sig": false,
            "md5_digest": "76bfe7b4ef51b57ee1863a0e46b89874",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 7983,
            "upload_time": "2024-08-03T08:15:34",
            "upload_time_iso_8601": "2024-08-03T08:15:34.663009Z",
            "url": "https://files.pythonhosted.org/packages/8f/7c/229e92ddf2f420526f15bd0c13111747f8c6e2f76414303f2e96a4c7bd65/llmcxt-0.1.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-08-03 08:15:34",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "cabeywic",
    "github_project": "llmcxt",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "llmcxt"
}
        
Elapsed time: 4.60364s