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

dire

v0.4.7

Published

Go-based CLI tool that automatically translates and maintains your i18n JSON files using translation and AI providers, glossary definitions, and translation memory

Downloads

3,152

Readme

Dire

Features

  • Multi-provider support: DeepL, Google Translate, Azure AI Translator, Claude, OpenAI, Gemini, Mistral, and DeepSeek
  • Automatic translation reuse: sourcing from glossary definitions and translation memory
  • Translation rephrasing: generate alternative phrasings to improve quality
  • Completeness checking: lint translation files in CI/CD pipelines with --check flag
  • Cleanup orphaned keys: remove translations that no longer exist in your reference locale with --prune
  • Context-aware translations: provide domain-specific context for better results
  • Nested object support: handles complex JSON structures and deeply nested translations
  • High-performance: native Go binary with smart batching and concurrent processing

Installation

# Option 1: Install as project dependency
npm i dire

# Option 2: Install globally
npm i -g dire

# Option 3: Run without installing
npx dire

Quick Start

  1. Initialize Configuration

    dire init

    This creates a .dire.toml file in your project root. Edit it to match your project structure. See CONFIGURATION.md for complete configuration reference.

    Note: The .dire.toml config file is optional. You can configure everything via CLI flags (see Configuration Override Flags). However, the TOML file offers quality-of-life features like glossary management and multiple pre-configured providers for quick switching.

  2. Set Up API Keys

    See Supported Providers section below for setup details.

    Note: Dire automatically loads environment variables from any .env* files in your current directory (e.g., .env, .env.local, .env.production).

  3. Run Translation

    dire

Common Commands

| Command | Description | | ------------------- | ------------------------------------------------------------------- | | dire | Translate all missing keys in your i18n files | | dire --keys <key> | Translate specific key(s): dire --keys "auth.login,auth.register" | | dire --sourced | Apply only glossary and memory translations | | dire --stub | Create placeholder translations (empty strings) | | dire --prune | Remove orphaned keys from non-reference locales | | dire --check | Lint translation completeness for CI/CD |

See COMMANDS.md for the complete command reference.

Supported Providers

Set your API key in any .env* file in your project root:

| Provider | Environment Variable | | ------------------------------------------------------------------------------------------- | ----------------------- | | DeepL | DIRE_DEEPL_API_KEY | | Google Translate | DIRE_GOOGLE_API_KEY | | Azure AI Translator | DIRE_AZURE_API_KEY | | OpenAI | DIRE_OPENAI_API_KEY | | Claude | DIRE_CLAUDE_API_KEY | | Gemini | DIRE_GEMINI_API_KEY | | Mistral | DIRE_MISTRAL_API_KEY | | DeepSeek | DIRE_DEEPSEEK_API_KEY |

Example .env file:

DIRE_CLAUDE_API_KEY=sk-ant-api03-your-key-here

Requirements

  • Node.js 20 or higher
  • API key for at least one supported provider (if using the translation features)

License

All rights reserved. This software is provided for use only and may not be copied, modified, or redistributed without explicit permission.