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

devdocs-global

v2.0.0

Published

🌍 AI-powered multilingual documentation with Lingo integration

Readme

DevDocs Global 🌍

npm version License: MIT Node.js Version

AI-powered multilingual documentation translation system with web dashboard, CLI tool, and GitHub Actions automation.

Translate your documentation into 6+ languages automatically using Lingo.dev SDK powered by GPT-4.

✨ Features

  • πŸš€ Full-Stack Application - Web dashboard + CLI tool + GitHub Actions automation
  • πŸ€– AI-Powered Translation - Uses Lingo.dev SDK with GPT-4 precision
  • πŸ“ Markdown Support - Preserves formatting, code blocks, and links
  • 🌍 Multi-Language - Translates to Spanish, French, German, Japanese, Hindi, Chinese
  • ⚑ Smart Caching - Incremental translations save time and API costs
  • πŸ”„ GitHub Actions - Auto-translate on every push
  • πŸ’Ύ Quality Metrics - 95-99% translation accuracy
  • πŸ“Š Dashboard UI - Beautiful React interface for translations
  • πŸ–₯️ CLI Tool - Use from command line or CI/CD pipelines
  • πŸ” Secure - Your API key stays local, never exposed

πŸš€ Quick Start

Installation

Global CLI (Recommended)

npm install -g devdocs-global

Local Project

npm install devdocs-global

Setup

1. Get API Key

  1. Visit lingo.dev
  2. Sign up for free
  3. Get your API key from dashboard

2. Initialize

devdocs-global init

Creates devdocs.config.json with default settings.

3. Set API Key

export LINGODOTDEV_API_KEY=your_api_key_here

Or add to .env.local:

LINGODOTDEV_API_KEY=your_api_key_here

4. Organize Your Docs

docs/
└── en/
    β”œβ”€β”€ getting-started.md
    β”œβ”€β”€ installation.md
    └── features.md

5. Translate

devdocs-global translate

Creates:

docs/
β”œβ”€β”€ en/ (original)
β”œβ”€β”€ es/ (Spanish)
β”œβ”€β”€ fr/ (French)
β”œβ”€β”€ de/ (German)
β”œβ”€β”€ ja/ (Japanese)
β”œβ”€β”€ hi/ (Hindi)
└── zh/ (Chinese)

πŸ“– Commands

devdocs-global init

Initialize DevDocs Global in your project.

devdocs-global init

Creates devdocs.config.json:

{
  "sourceLanguage": "en",
  "sourceDir": "./docs",
  "targetLanguages": ["es", "fr", "de", "ja", "hi", "zh"],
  "outputDir": "./docs",
  "apiKey": "your-api-key",
  "cacheDir": "./.lingo-cache"
}

devdocs-global translate [options]

Translate documentation to multiple languages.

devdocs-global translate

Options:

-s, --source <language>     Source language (default: auto-detect)
-t, --targets <languages>   Target languages (comma-separated)
--source-dir <path>         Source documentation directory
--output-dir <path>         Output directory for translations
--incremental               Only translate changed files

Examples:

# Translate all files to default languages
devdocs-global translate

# Translate to specific languages only
devdocs-global translate -t es,fr,de

# Use custom directories
devdocs-global translate --source-dir ./documentation --output-dir ./translated

# Only translate changed files (faster)
devdocs-global translate --incremental

# Specify source language
devdocs-global translate -s en -t es,fr

devdocs-global detect <file>

Detect the language of a document.

devdocs-global detect docs/en/getting-started.md

Output:

Detected language: en

devdocs-global status

Show translation status and statistics.

devdocs-global status

Output:

πŸ“Š Translation Status

Configuration:
  Source Language: en
  Target Languages: es, fr, de, ja, hi, zh
  Source Dir: ./docs
  Output Dir: ./docs

Cache Status: 5 files cached

πŸ“‹ Configuration

Edit devdocs.config.json:

{
  "sourceLanguage": "en",
  "sourceDir": "./docs",
  "targetLanguages": ["es", "fr", "de", "ja", "hi", "zh"],
  "outputDir": "./docs",
  "apiKey": "your-lingo-api-key",
  "cacheDir": "./.lingo-cache"
}

Configuration Options

| Option | Type | Default | Description | |--------|------|---------|-------------| | sourceLanguage | string | "en" | Source language code (or "auto" to detect) | | sourceDir | string | "./docs" | Directory containing source documentation | | targetLanguages | array | ["es", "fr", "de", "ja", "hi", "zh"] | Target language codes | | outputDir | string | "./docs" | Output directory for translations | | apiKey | string | - | Lingo.dev API key | | cacheDir | string | "./.lingo-cache" | Cache directory for incremental updates |

🌐 Supported Languages

| Code | Language | |------|----------| | en | English | | es | Spanish | | fr | French | | de | German | | ja | Japanese | | hi | Hindi | | zh | Chinese | | pt | Portuguese | | ru | Russian | | ar | Arabic |

πŸ”„ GitHub Actions Integration

Automatically translate documentation on every push!

Setup GitHub Actions

  1. Add Secret

    • Go to: Settings β†’ Secrets and variables β†’ Actions
    • Add: LINGODOTDEV_API_KEY with your API key
  2. Create Workflow

File: .github/workflows/auto-translate.yml

name: Auto-Translate Documentation

on:
  push:
    branches: [ main ]
    paths:
      - 'docs/en/**'
      - 'package.json'
      - '.github/workflows/auto-translate.yml'

permissions:
  contents: write

jobs:
  translate:
    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v4
      with:
        fetch-depth: 0

    - uses: actions/setup-node@v4
      with:
        node-version: '20'
        cache: 'npm'

    - run: npm ci

    - name: Clean old translations
      run: rm -rf docs/es docs/fr docs/de docs/ja docs/hi docs/zh

    - name: Run translations
      env:
        LINGODOTDEV_API_KEY: \${{ secrets.LINGODOTDEV_API_KEY }}
      run: npm run translate

    - name: Commit and push
      run: |
        git config user.name "github-actions[bot]"
        git config user.email "github-actions[bot]@users.noreply.github.com"
        if ! git diff --quiet; then
          git add docs/
          git commit -m "🌍 chore: Auto-translate documentation"
          git push origin main
        fi

πŸ’» Web Dashboard

Use the web interface for easier management:

  1. Start Dev Server

    npm run dev
  2. Open Dashboard

    http://localhost:3000/dashboard
  3. Upload & Translate

    • Select markdown files
    • Choose target languages
    • Click "Translate Now"
    • Download results

πŸ› οΈ Development

Prerequisites

  • Node.js 18+
  • npm or yarn
  • Git

Setup

# Clone repository
git clone https://github.com/Patelmedhansh/DevDocs-Global.git
cd DevDocs-Global

# Install dependencies
npm install

# Create .env.local
echo "LINGODOTDEV_API_KEY=your_key_here" > .env.local

# Start development
npm run dev

Project Structure

DevDocs-Global/
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ cli/              # CLI tool
β”‚   β”‚   β”œβ”€β”€ index.js      # Main CLI entry
β”‚   β”‚   β”œβ”€β”€ translator.js # Lingo SDK integration
β”‚   β”‚   β”œβ”€β”€ extractor.js  # Text extraction
β”‚   β”‚   β”œβ”€β”€ cache.js      # Caching logic
β”‚   β”‚   └── languageDetector.js
β”‚   └── app/              # Next.js web app
β”‚       β”œβ”€β”€ page.js       # Home page
β”‚       β”œβ”€β”€ dashboard/    # Dashboard
β”‚       └── api/          # API routes
β”œβ”€β”€ docs/
β”‚   └── en/               # Source documentation
β”œβ”€β”€ .github/workflows/    # GitHub Actions
β”œβ”€β”€ package.json
└── README.md

πŸ“¦ API Reference

LingoTranslator

import { LingoTranslator } from './translator.js';

const translator = new LingoTranslator(apiKey);

// Translate text
const result = await translator.translate(text, 'en', 'es');

// Batch translate
const results = await translator.batchTranslate(texts, 'en', ['es', 'fr']);

// Detect language
const lang = await translator.detectLanguage(text);

// Get supported languages
const langs = await translator.getSupportedLanguages();

πŸ” Security

  • βœ… API keys stored locally in .env.local (not committed)
  • βœ… Never exposed in public files
  • βœ… GitHub Actions uses Secrets (encrypted)
  • βœ… No data sent to third parties except Lingo.dev
  • βœ… Uses HTTPS for all API calls

πŸ“Š Performance

  • Translation Speed: ~2-5 seconds per file
  • Caching: 50-70% faster on incremental updates
  • Memory Usage: <100MB typical
  • API Efficiency: Smart batching reduces API calls

πŸ’° Cost Estimation

Based on Lingo.dev pricing:

  • Free Tier: ~10,000 words/month
  • Small Project (100KB docs): ~$5-10/month
  • Medium Project (1MB docs): ~$50-100/month
  • Large Project (10MB docs): ~$500-1000/month

πŸ› Troubleshooting

"API Key not found"

# Check .env.local exists
cat .env.local

# Should show:
# LINGODOTDEV_API_KEY=your_key

# If missing, create it:
echo "LINGODOTDEV_API_KEY=your_key" > .env.local

"No markdown files found"

# Verify source directory structure
find docs/en -name "*.md"

# Should show your markdown files

"Translation failed - Invalid credentials"

# 1. Verify API key is correct
npm run status

# 2. Get new key from lingo.dev if expired
# 3. Update .env.local
# 4. Restart: npm run dev
# 5. Try again: npm run translate

"GitHub Actions permission denied"

  1. Go to: Settings β†’ Actions β†’ General
  2. Select: "Read and write permissions"
  3. Check: "Allow GitHub Actions to create pull requests"
  4. Save and retry

🀝 Contributing

Contributions welcome! Please:

  1. Fork the repository
  2. Create feature branch (git checkout -b feature/amazing-feature)
  3. Commit changes (git commit -m 'Add amazing feature')
  4. Push to branch (git push origin feature/amazing-feature)
  5. Open Pull Request

πŸ“ License

This project is licensed under the MIT License - see LICENSE file for details.

πŸ’¬ Support

πŸ™ Acknowledgments

πŸš€ Roadmap

  • [ ] Web UI improvements
  • [ ] Support for more languages
  • [ ] Glossary/terminology management
  • [ ] Translation memory
  • [ ] A/B testing translations
  • [ ] CI/CD integration (GitLab, Gitea, etc.)
  • [ ] REST API for programmatic access
  • [ ] Desktop app
  • [ ] Browser extension

⭐ Show Your Support

If this project helped you, please give it a star! ⭐

πŸ“„ Version History

v2.0.0 (Current)

  • ✨ Full-stack application
  • 🎨 React dashboard
  • πŸ”„ GitHub Actions automation
  • πŸš€ CLI improvements
  • πŸ“¦ npm publishing ready

v1.0.0

  • 🎯 Initial release
  • πŸ“ CLI tool
  • 🌐 Basic translation

Made with ❀️ by Medhansh Patel

Repository: https://github.com/Patelmedhansh/DevDocs-Global