file-drill 1.1.2

dotnet tool install --global file-drill --version 1.1.2
                    
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
                    
if you are setting up this repo
dotnet tool install --local file-drill --version 1.1.2
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=file-drill&version=1.1.2
                    
nuke :add-package file-drill --version 1.1.2
                    

file-drill

NuGet NuGet downloads License

file-drill is a powerful tool designed for processing file content using both local code and AI-based services.

Features

  • Read file content efficiently
  • Classify content using AI
  • Extract specific fields using AI

Installation

Install the tool using the command:

dotnet tool install --global file-drill

Getting started

  1. Configure AI Service Provider - Obtain an API key from an AI provider (e.g., Google Gemini) and set it up.

    file-drill config set key AIServices:Gemini '{ "Type": "Gemini", "Key": "<secret>", "ModelName": "<model-name>" }'
    file-drill config set key FallbackAIService '"Gemini"'
    
  2. Configure schemas - for quick setup, seed sample configurations.

    file-drill config seed
    
  3. Verify configuration

    file-drill config show
    
  4. Extract data from file.

    file-drill read classify extract c:\invoice.pdf
    

Diagram of commands

mindmap
  root((file-drill))
    config
      show
      export
      set
        key
        wizard
      merge
        key
        wizard
      clear
      seed
    read
      classify
        extract
      extract
    classify
      extract

Configuration

{
  "FallbackAIService": "<ai-service-name>",
  "ContentReader": {
    "AIService": "<ai-service-name>"
  },
  "ContentClassifier": {
    "AIService": "<ai-service-name>"
  },
  "FieldExtractor": {
    "AIService": "<ai-service-name>"
  },
  "AIServices": {
    "<ai-service-name>": {
      "Type": "<Ollama|OpenAI|Azure|Gemini>",
      "Url": "<endpoint-url>",
      "Key": "<secret>",
      "ModelName": "<model-name>"
    }
  },
  "Schemas": {
    "<schema-name>": {
      "Description": "<schema-description>",
      "Fields": {
        "field-name": {
          "Description": "<field-description>",
          "Type": "<String|DateTime|Bool|Int16|UInt16|Int32|UInt32|Int64|UInt64|Float|Double|Decimal>"
          "Enums": [ "optional", "array" , "with", "expected", "values" ]
        }
      }
    }
  }
}

Supported file extensions

Extensions Library
.txt, .md built-in
.pdf PdfPig
.docx, .dotx, .docm, .dotm DocumentFormat.OpenXml
.png, .jpeg OCR using AI service
.rtf RtfPipe
.eml, .msg MsgReader

Supported AI services

Service type Library Sample configuration
Ollama Microsoft.Extensions.AI.Ollama { "Type": "Ollama", "Url": "http://localhost:11434", "ModelName": "<model-name>" }
Azure Microsoft.Extensions.AI.AzureAIInference { "Type": "Azure", "Url": "<endpoint-url>", "ModelName": "<deployment-name>", "Key": "<secret>" }
OpenAI Microsoft.Extensions.AI.OpenAI { "Type": "OpenAI", "Url": "<endpoint-url>", "ModelName": "<model-name>", "Key": "<secret>" }
Gemini Mscc.GenerativeAI.Microsoft { "Type": "Gemini", "Key": "<secret>", "ModelName": "<model-name>" }

License

file-drill is provided as-is under the MIT license.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last updated
1.1.2 154 3/28/2025
1.1.1 154 3/27/2025
1.1.0 78 3/14/2025
1.0.1 134 3/13/2025
1.0.0 142 3/13/2025