dragiter(1)                      July 2026                          dragiter(1)

NAME
       dragiter - deterministic RAG iterator – command line tool for structured
       LLM-based processing of materials with prompts and looping

SYNOPSIS
       dragiter [OPTIONS]
       dragiter-gen-docs [PATH]
       dragiter-gen-examples [PATH]

DESCRIPTION
       dragiter is a command-line tool that allows controlled, reproducible
       calls to LLM services (OpenAI compatible APIs and others) while
       combining:

       * input material (documents, chunks, JSONL, ...)
       * prompt templates
       * optional looping / iteration logic
       * configurable output routing (file, directory, append/overwrite)

       Configuration values are read in the following order of precedence:

           1. Command-line arguments
           2. TOML configuration file (specified via -c / --config-file)
           3. Environment variables (dragiter_...)
           4. Default user config (~/.config/dragiter/config.toml)
           5. Hard-coded program defaults

OPTIONS
       General Flags
           -d, --debug                Enable debug logging
           -s, --simulate             Simulation mode (no real API calls)
           -v, --verbose              Verbose mode for detailed message output
           -c, --config-file PATH     Read configuration from a specific file
           -b, --base-directory PATH  Base directory for all relative file
                                      operations
           -L, --log-file PATH        Write application log output to the given
                                      file (simple append mode, no rotation).
                                      Only active when explicitly provided.
           --sequential-processing    Process each material chunk individually
                                      instead of sending all chunks in a single
                                      request.

       API & Connection Configuration
           --api-key KEY              API key for the LLM service
           --base-url URL             Base URL to the AI service endpoint
           --model-name MODEL         Model identifier (e.g. gpt-4o, qwen3:8b)
           --chars-per-token FLT      Estimated characters per token for
                                      chunking
           --max-context-tokens INT   Maximum context window limit of the model (input + output combined)
           --max-output-tokens INT    Maximum output tokens (part of context window limit)
           --temperature FLT          LLM temperature
           --max-retry INT            Maximum number of retries on failure (LLM)
           --retry-delay INT          Delay in seconds between retries


       Task & Prompt Control
           -p, --prompt-file PATH     Read instruction and task template file
           -t, --task TEXT            Ask a specific explicit task

       Input Files (Materials & Loops)
           -l, --loop-file PATH       Read JSONL file for iteration items
           -r, --resource-file PATH   Read resource definition file

       Output Control & Logging
           -m, --output-mode CHAR     Output mode:
                                      w=overwrite, a=append, x=exclusive
           -o, --output-file PATH     Write output to a single file
           -O, --output-directory DIR Write outputs to a specified directory
           -a, --activity-file PATH   Write detailed activity trace (JSONL) to
                                      file
           --output-delimiter TEXT    Delimiter inserted between multiple
                                      results (default: newline)
           --output-filename-schema   Filename template used with
                                      -O/--output-directory
                                      (supports {CHUNK_*}, {LOOP_*})

       Help & Utilities
           -h, --help                 Show this help message and exit
           dragiter-gen-docs [PATH]       Extract documentation to folder
           dragiter-gen-examples [PATH]   Extract examples to folder

EXIT STATUS
       0      Success
       1      Configuration or critical error
       130    Process interrupted by user (KeyboardInterrupt)

ENVIRONMENT
       DRAGITER_DEBUG, DRAGITER_SIMULATE, DRAGITER_VERBOSE (TRUE / FALSE)
       DRAGITER_SEQUENTIAL_PROCESSING (TRUE / FALSE)
       DRAGITER_API_KEY, DRAGITER_BASE_URL, DRAGITER_MODEL_NAME
       DRAGITER_TEMPERATURE, DRAGITER_CHARS_PER_TOKEN
       DRAGITER_MAX_CONTEXT_TOKENS, DRAGITER_MAX_OUTPUT_TOKENS
       DRAGITER_RETRY_DELAY, DRAGITER_MAX_RETRY
       DRAGITER_OUTPUT_MODE (w / a / x)
       DRAGITER_OUTPUT_DELIMITER, DRAGITER_OUTPUT_FILENAME_SCHEMA
       DRAGITER_BASE_DIRECTORY, DRAGITER_CONFIG_FILE, DRAGITER_LOG_FILE
       DRAGITER_PROMPT_FILE, DRAGITER_LOOP_FILE, DRAGITER_RESOURCE_FILE
       DRAGITER_OUTPUT_FILE, DRAGITER_OUTPUT_DIRECTORY, DRAGITER_ACTIVITY_FILE
       DRAGITER_CONFIG (Overrides default config search path)

REPORTING BUGS
       dragiter is a community-driven tool. If you encounter a bug, you are
       cordially invited to fix it yourself—after all, you have the ultimate
       AI toolkit at your fingertips! Feel free to let your favorite LLM
       analyze the code and suggest a patch.

       For major issues that even the AI cannot solve, contact:
       Michael Buchold <michael.buchold@dragiter.app>

AUTHOR
       Michael Buchold <michael.buchold@dragiter.app>

dragiter(1)                      July 2026                          dragiter(1)