npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@dossier/deepl-tools

v0.1.0

Published

DeepL translation tools with Dossier ProFile defaults — MCP server, CLI, and TypeScript library

Readme

@dossier/deepl-tools

DeepL translation tools with Dossier ProFile defaults — MCP server and CLI.

Wraps the DeepL API with automatic glossary resolution and formality settings tuned for Dossier's supported languages. Works as a standalone CLI or as an MCP server for AI coding assistants.

Install

npm install @dossier/deepl-tools

Requires a DeepL API key linked to the Dossier organization account (for glossary access). Get one assigned by your leader, or retrieve it from AWS Secrets Manager.

MCP Server

Exposes three tools: translate-text, translate-document, and rephrase-text.

Add to your MCP client config (Claude Desktop, Cursor, Windsurf, etc.):

{
  "mcpServers": {
    "dossier-deepl": {
      "command": "npx",
      "args": ["-p", "@dossier/deepl-tools", "dossier-deepl-mcp"],
      "env": {
        "DEEPL_API_KEY": "your-key"
      }
    }
  }
}

Or register via the Claude Code CLI:

claude mcp add dossier-deepl -e DEEPL_API_KEY=your-key -- npx -p @dossier/deepl-tools dossier-deepl-mcp

CLI

# Translate text
dossier-deepl translate "Hello world" --to de

# Multiple targets
dossier-deepl translate "Hello world" --to nb,da,sv,de,fr,es

# With source language (enables glossary)
dossier-deepl translate "Dialog" --to nb --from en

# Pipe from stdin
echo "Complete the training" | dossier-deepl translate --to fr

# Context and custom instructions
dossier-deepl translate "Started" --to de --from en \
  --custom-instruction "Translate as a past participle used as a status label"

# JSON output
dossier-deepl translate "Hello" --to nb --format json

# Translate a document
dossier-deepl translate-document report.pdf --to de --output report_de.pdf --format json

# Rephrase text
dossier-deepl rephrase "Their going to the store" --lang en-US

# Rephrase with style or tone (mutually exclusive)
dossier-deepl rephrase "We need to do this ASAP" --lang en-US --style business
dossier-deepl rephrase "We need to do this ASAP" --lang en-US --tone diplomatic

All commands support --format json for programmatic use.

Translate vs. Rephrase options

The DeepL Translate and Write (rephrase) APIs offer different controls:

| Option | Translate | Rephrase | |--------|-----------|----------| | formality | less, more, prefer_less, prefer_more | -- | | customInstructions | free-form directives (de, en, es, fr) | -- | | context | surrounding source text for disambiguation | -- | | style | -- | simple, business, academic, casual (de, en, es, fr, it, pt) | | tone | -- | enthusiastic, friendly, confident, diplomatic (de, en, es, fr, it, pt) |

style and tone are mutually exclusive — only one can be used per request. Both also accept prefer_ variants (e.g. prefer_business) which fall back gracefully for unsupported languages instead of erroring.

Dossier Defaults

These defaults are applied automatically and can be overridden per request:

| Setting | Value | Applies to | |---------|-------|------------| | Formality | prefer_more | de, fr, es | | Glossary | auto-resolved by source language | when --from is specified and a matching dossier-profile-{lang} glossary exists on DeepL |

Configuration

DEEPL_API_KEY (required) — your DeepL API authentication key.

Glossary auto-resolution — on startup, the client lists all multilingual glossaries on your DeepL account and matches any named dossier-profile-{lang}. When you specify a source language (--from / sourceLangCode), the matching glossary is attached automatically. Pass --glossary <id> to override.

Library Usage

The package also exports DossierDeepL for use as a TypeScript/JavaScript library:

import { DossierDeepL } from '@dossier/deepl-tools';

const deepl = new DossierDeepL();          // uses DEEPL_API_KEY env var
// or: new DossierDeepL('your-api-key')    // pass key explicitly

// Single target
const result = await deepl.translate('Hello world', 'en', 'de');
console.log(result.text); // "Hallo Welt"

// Multiple targets
const results = await deepl.translateMultiple('Hello', 'en', ['nb', 'da', 'sv']);
for (const [lang, result] of results) {
  console.log(`${lang}: ${result.text}`);
}

// With options (same as deepl-node TranslateTextOptions)
const custom = await deepl.translate('Started', 'en', 'de', {
  customInstructions: ['Translate as a past participle used as a status label'],
});

// Rephrase with style or tone (mutually exclusive)
const rephrased = await deepl.rephrase('We need to do this ASAP', 'en-US', 'business');

// Document translation
const doc = await deepl.translateDocument('report.pdf', 'report_de.pdf', 'en', 'de');

All Dossier defaults (glossary resolution, formality) are applied automatically.

Glossary Management

The curated glossary lives at domain/glossary.yaml (repo root). Three npm scripts manage it:

# Push glossary to DeepL as multilingual glossaries (one per source language)
npm run glossary:push -- --dry-run   # preview what would be created
npm run glossary:push                # push to DeepL

# Compare glossary against ProFile .properties translations
npm run glossary:diff -- --profile /path/to/dossier-profile
npm run glossary:diff -- --profile /path/to/dossier-profile --lang nb,de

# Export glossary as a standalone HTML page
npm run glossary:html

glossary:push creates/replaces dossier-profile-{lang} glossaries on DeepL for each source language. Requires the deepl CLI.

glossary:diff finds where ProFile .properties translations diverge from the glossary. The glossary is the source of truth — divergences are informational.

glossary:html renders the glossary as a static HTML file (written to output/glossary.html).

Language Codes

All tools use DeepL language codes (ISO 639-1). Regional variants like en-US and en-GB are accepted for targets and resolve to the parent language glossary.

| Language | Code | |----------|------| | English | en | | Norwegian Bokmal | nb | | Danish | da | | Swedish | sv | | German | de | | French | fr | | Spanish | es |

License

MIT