Beta Space StudioBeta Space Studio logo
Dev Tools·1 June 2025·Said Sürücü·15

UDF CLI

Convert between UYAP UDF file format and HTML/Markdown. Make Turkey's judiciary document format readable for AI agents.

Author: Said SürücüCategory: Dev ToolsLast update: 1 June 2025
15GitHub stars

Overview

UDF is the document format used by UYAP (Turkey's National Judiciary Informatics System — the unified IT system connecting all Turkish courts). It's a ZIP archive containing content.xml with text, formatting, images, and tables in a custom XML schema.

This CLI tool converts UDF files to HTML and Markdown — and vice versa. The udf2md command is particularly useful for AI agents that need to read court documents.

Commands

  • udf-cli html2udf — Convert HTML to UDF
  • udf-cli udf2html — Convert UDF to HTML
  • udf-cli md2udf — Convert Markdown to UDF
  • udf-cli udf2md — Convert UDF to Markdown (ideal for AI agents)

Installation

npm install -g udf-cli
# or
npx udf-cli

Usage

# Convert UDF to Markdown
udf-cli udf2md document.udf -o output.md

# Convert HTML to UDF
udf-cli html2udf document.html -o output.udf

# Read from stdin
cat document.html | udf-cli html2udf -o output.udf

Library Usage

import { htmlToUdf, udfToHtml, udfToMarkdown, markdownToUdf } from 'udf-cli'

Supported HTML Elements

Paragraphs, headings (h1-h6), bold, italic, underline, span styles, images (base64), tables (nested supported), lists, and div elements. Full roundtrip support.

Tools that connect to your own data.

UDF CLI is open source. If your organization needs something similar for its own data sources, let's talk.

UDF CLI - Resources | Beta Space Studio | Beta Space Studio