Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

stirling-pdf

БесплатноБез исполняемых скриптовНе проверен

Stirling PDF is a self-hosted web application with an HTTP API that merges, splits, compresses, converts, OCRs, watermarks and password-protects PDF files on…

TerminalSkillsот TerminalSkills★ 221 звезда на GitHub

Об этом скилле

Stirling PDF — Self-hosted PDF processing with an HTTP API

Overview

Stirling PDF packages more than 50 PDF tools behind a web UI and a REST API. It runs as one container, keeps documents on the host, and lets scripts call the same operations the UI offers. This skill covers deployment with Docker, configuration, and API calls from the shell and from Python.

Instructions

Installation

Create compose.yaml in an empty directory such as /opt/stirling-pdf:

services:
  stirling-pdf:
    image: docker.stirlingpdf.com/stirlingtools/stirling-pdf:latest
    container_name: stirling-pdf
    ports:
      - "127.0.0.1:8080:8080"          # remove 127.0.0.1 to serve the local network
    volumes:
      - ./stirling-data/configs:/configs               # settings and database
      - ./stirling-data/tessdata:/usr/share/tessdata   # OCR language files
      - ./stirling-data/logs:/logs
      - ./stirling-data/pipeline:/pipeline             # automation configs
    environment:
      SECURITY_ENABLELOGIN: "true"
      SECURITY_INITIALLOGIN_USERNAME: admin
      SECURITY_INITIALLOGIN_PASSWORD: ${STIRLING_ADMIN_PASSWORD}
      SECURITY_CUSTOMGLOBALAPIKEY: ${STIRLING_API_KEY}
      SYSTEM_DEFAULTLOCALE: en-GB
      SYSTEM_FILEUPLOADLIMIT: 500MB
      JAVA_TOOL_OPTIONS: "-Xms512m -Xmx4g"
    restart: unless-stopped
cd /opt/stirling-pdf
read -rs STIRLING_ADMIN_PASSWORD && export STIRLING_ADMIN_PASSWORD   # typed by the user; not echoed
export STIRLING_API_KEY="$(openssl rand -hex 32)"                    # store it in a password manager
docker compose up -d
curl -s http://localhost:8080/api/v1/info/status | jq -S .

The status call needs no key and returns {"status": "UP", "version": "3.0.1"}.

Image tag Contents
latest All PDF features; the default choice
latest-fat Same, plus extra fonts and conversion dependencies
latest-ultra-lite Core tools only: no OCR, compression, repair or Office conversion

Update with docker compose pull && docker compose up -d. Data in the mounted folders survives the update.

Configuration

Settings can be given in three places. Environment variables win over /configs/custom_settings.yml, which wins over /configs/settings.yml and the in-app settings. A YAML path becomes a variable name by writing it in upper case and replacing dots with underscores:

# ./stirling-data/configs/settings.yml
security:
  enableLogin: true          # same as SECURITY_ENABLELOGIN=true
system:
  defaultLocale: en-GB       # same as SYSTEM_DEFAULTLOCALE=en-GB
  fileUploadLimit: "500MB"   # same as SYSTEM_FILEUPLOADLIMIT=500MB

Restart the container after changing environment variables. For more OCR languages, download the .traineddata files from the Tesseract tessdata or tessdata_fast repository into ./stirling-data/tessdata and keep eng.traineddata in place.

Authentication

Login is enabled by default. Every API call then needs the header X-API-KEY. Two kinds of key exist:

  • A personal key, which the user copies from Settings → Preferences → API Keys in the web UI.
  • The global key set with SECURITY_CUSTOMGLOBALAPIKEY, as in the Compose file above.

Scripts read the key from $STIRLING_API_KEY. A missing key gives HTTP 401 with a JSON error; a wrong key gives 401 with the text Invalid API Key.

Calling the API

Every operation is a POST with multipart/form-data under /api/v1/ followed by a category and an operation name. The uploaded file is always the field fileInput. The response body is the resulting file.

Operation Path Main fields
Merge /api/v1/general/merge-pdfs fileInput (repeat per file), sortType, generateToc
Split /api/v1/general/split-pages pageNumbers (split points such as 2,5); returns a ZIP
Rotate /api/v1/general/rotate-pdf angle: 90, 180 or 270
Compress /api/v1/misc/compress-pdf optimizeLevel 1–9, or expectedOutputSize such as 2MB
OCR /api/v1/misc/ocr-pdf languages (repeat), ocrType, ocrRenderType, sidecar, deskew
PDF to images /api/v1/convert/pdf/img imageFormat, singleOrMultiple, colorType, dpi, pageNumbers
Office file to PDF /api/v1/convert/file/pdf fileInput
Password /api/v1/security/add-password, /api/v1/security/remove-password password, ownerPassword, keyLength
Watermark /api/v1/security/add-watermark watermarkType, watermarkText, fontSize, opacity, rotation
BASE=http://localhost:8080

# OCR a scan in English and German; skip pages that already contain text
curl -sS -X POST "$BASE/api/v1/misc/ocr-pdf" -H "X-API-KEY: $STIRLING_API_KEY" \
  -F "[email protected]" -F "languages=eng" -F "languages=deu" \
  -F "ocrType=skip-text" -F "ocrRenderType=hocr" \
  -o lease-2019-searchable.pdf -w "%{http_code} %{size_download}\n"

# Render pages 1 to 3 as 150 dpi PNG files (ZIP ar
Полный SKILL.md на GitHub

Установить stirling-pdf в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

_scores.json

FAQ

Что делает скилл stirling-pdf?

Stirling PDF is a self-hosted web application with an HTTP API that merges, splits, compresses, converts, OCRs, watermarks and password-protects PDF files on your own server. Use when a user asks to deploy Stirling PDF with Docker, configure it with environment variables or settings.yml, call the Stirling PDF API from curl or Python, batch-process PDFs without uploading them to a cloud service, or chain several operations with the pipeline endpoint.

Как установить скилл stirling-pdf?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл stirling-pdf запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить stirling-pdf с