Metadata-Version: 2.4
Name: dragiter
Version: 2026.7.20rc2
Summary: dragiter – Deterministic RAG Iterator. A modular CLI for structured, reproducible LLM workflows.
Project-URL: Homepage, https://gitlab.com/bucosys/dragiter
Project-URL: Repository, https://gitlab.com/bucosys/dragiter.git
Project-URL: Issues, https://gitlab.com/bucosys/dragiter/-/issues
Project-URL: Documentation, https://gitlab.com/bucosys/dragiter/-/blob/main/docs/manual.md
Author-email: Michael Buchold <michael.buchold@dragiter.app>
Maintainer-email: Michael Buchold <michael.buchold@dragiter.app>
License: AGPL-3.0-or-later OR Proprietary
License-File: LICENSE
License-File: LICENSE.AGPL-3.0
Keywords: ai-workflow,automation,cli,llm,prompt-engineering,rag
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: GNU Affero General Public License v3 or later (AGPLv3+)
Classifier: License :: Other/Proprietary License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Utilities
Requires-Python: >=3.11
Requires-Dist: openai>=1.0.0
Provides-Extra: dev
Requires-Dist: build; extra == 'dev'
Requires-Dist: mypy; extra == 'dev'
Requires-Dist: pytest>=8.0; extra == 'dev'
Requires-Dist: ruff; extra == 'dev'
Requires-Dist: twine; extra == 'dev'
Description-Content-Type: text/markdown

[![License: AGPL v3](https://img.shields.io/badge/License-AGPLv3-blue.svg)](https://www.gnu.org/licenses/agpl-3.0)
[![PyPI](https://img.shields.io/pypi/v/dragiter)](https://pypi.org/project/dragiter/)
[![Python](https://img.shields.io/pypi/pyversions/dragiter)](https://pypi.org/project/dragiter/)

## dragiter – Deterministic RAG Iterator. A modular CLI for structured, reproducible LLM workflows.

> Status: Beta
> 
> dragiter has now moved beyond the Alpha stage and is in Beta. The core functionality is largely
> stable and is already being used in smaller production setups. However, breaking changes may 
> still occur. We currently advise against using dragiter in critical production environments, 
> automated CI/CD pipelines, or with untrusted or sensitive data without thorough testing.

dragiter is a modular command-line interface (CLI) designed to integrate Large Language Models (LLMs) directly into your
automated terminal workflows. It acts as a bridge between your local file system and AI APIs, eliminating "copy-paste
fatigue" by allowing you to chain AI agents exactly like standard Unix pipes.

## Why dragiter?

If you want an AI to review an entire project, manually gathering files, stripping out noise, and pasting them into a
web chat is tedious. dragiter solves this through "Prompt as Code."

* Automated Context Assembly: Use wildcards (like src/\*\*/\*.py) and regex patterns to surgically extract exactly what
  the AI needs to see.
* Version-Controllable Prompts: Define your AI instructions and data context in standard .toml files so your workflows
  are repeatable and shareable.
* Advanced Batch Processing: Feed dragiter a .jsonl loop file to automatically iterate through translation tasks, report
  summaries, or data extraction without writing custom Python scripts.
* Vendor Independence: Switch from cloud providers like OpenAI, Grok, or Google to a completely local, private model
  like Ollama just by changing a single CLI flag.

## Installation

You can install dragiter easily via pip:

    pip install dragiter

The project logo is available in `assets/logo/dragiter-logo.png`.

## Quick Start

The core philosophy of dragiter is to keep your resources (material, context) and your 
prompts (instructions) separate.

The easiest way to explore dragiter is by using the included examples 

### 1. Extract the Examples

First, extract them into your current directory by running:

    dragiter-gen-examples .

You will find the examples in the `examples/` subdirectory. 
To follow along with the first example, navigate into it:

    cd examples/01_md_sample

### 2. Test Safely with Simulation Mode

It is highly recommended to always run a simulation first. 
This allows you to safely verify your workflow and file routing without making actual API calls
or spending your API credits. You can do this by adding the `-s` flag to your command.

Run the simulation by typing:

    dragiter -s -p 01_prompt_md.toml -r 01_resource_md.toml -l 01_loop_md.txt

### 3. Run with Ollama
The file `config-ollama.toml` is ready to use out of the box, provided that Ollama is 
installed and running locally with its default settings. When using Ollama it is recommended 
to run the command with the `-v` (verbose) flag:

    dragiter -v -c config-ollama.toml -p 01_prompt_md.toml -r 01_resource_md.toml -l 01_loop_md.txt


## Documentation
dragiter comes with a very detailed and well-written manual. 
It is strongly recommended to read it:
    
    # Extract the full documentation
    dragiter-gen-docs .

    # Then read the manual
    less docs/manual.md
    # or open it in your editor / browser

The manual contains many practical examples (code review, batch report analysis, 
marketing copy generation, tool chaining, etc.) and explains advanced features such 
as context window management and JSONL processing in depth.

## E2E Tests

dragiter includes a set of end-to-end tests to verify core CLI behaviour.
You can extract them into your current directory by running:

    dragiter-gen-tests .

The tests will be created in the `tests/` subdirectory.  
You can then execute them with:

    cd tests
    pytest -q

These tests run safely in simulation mode (`-s`) and serve as a minimal template for writing your own workflow validations.

## Tool Chaining (The Unix Way)

dragiter is built to play nicely with other CLI tools. You can fetch live data and pipe it straight to your AI workflow:

## Acknowledgements

The development of dragiter has been a journey of continuous learning. Bringing this project to life would not have been
possible without the support of some extraordinary tools and communities.

A massive thank you to the AI models Grok and Gemini. As tireless pair-programming partners, your guidance, code
reviews, and structural suggestions were invaluable in adapting the Python code for this project.

Equally important is the global Python community. The rich ecosystem, extensive documentation, and open-source spirit
provide the foundation for tools like dragiter. Thank you to all the developers who make Python such a powerful language
to work with.