🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

file-drill

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

file-drill

file-drill is a powerful command-line tool for reading, classifying, and extracting structured data from various file formats using both local processing and AI-powered services. It supports text documents, PDFs, images, and emails, allowing seamless automation of content analysis and data extraction.

1.1.2
Source
NuGet
Version published
Maintainers
1
Created
Source

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

  • 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"'
    
  • Configure schemas - for quick setup, seed sample configurations.

    file-drill config seed
    
  • Verify configuration

    file-drill config show
    
  • 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

ExtensionsLibrary
.txt, .mdbuilt-in
.pdfPdfPig
.docx, .dotx, .docm, .dotmDocumentFormat.OpenXml
.png, .jpegOCR using AI service
.rtfRtfPipe
.eml, .msgMsgReader

Supported AI services

Service typeLibrarySample configuration
OllamaMicrosoft.Extensions.AI.Ollama{ "Type": "Ollama", "Url": "http://localhost:11434", "ModelName": "<model-name>" }
AzureMicrosoft.Extensions.AI.AzureAIInference{ "Type": "Azure", "Url": "<endpoint-url>", "ModelName": "<deployment-name>", "Key": "<secret>" }
OpenAIMicrosoft.Extensions.AI.OpenAI{ "Type": "OpenAI", "Url": "<endpoint-url>", "ModelName": "<model-name>", "Key": "<secret>" }
GeminiMscc.GenerativeAI.Microsoft{ "Type": "Gemini", "Key": "<secret>", "ModelName": "<model-name>" }

License

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

Keywords

FAQs

Package last updated on 28 Mar 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts