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 🙏

© 2025 – Pkg Stats / Ryan Hefner

vitepress-auto-translate

v1.0.3

Published

Internationalize vitepress repository automatically by using LLMs.

Downloads

5

Readme

vitepress-auto-translate

npm version npm downloads License: MIT

Internationalize Vitepress repository automatically by using LLMs. This tool is designed to help you translate your markdown files in a Vitepress repository to multiple languages automatically, leveraging the power of LLMs to generate high-quality translations.

Quick Start

This section will take you a quick glance at how to use this tool to translate your Vitepress repository.

Installation

Change to your Vitepress repository and install the tool using npm:

npm install vitepress-auto-translate

[!NOTE] This tool requires Node.js version 16 or above.

Prepare Your API Key

This tool now supports two LLM providers: SiliconFlow and OpenAI. You need to get an API key from one of them to use this tool. It will use deepseek-ai/DeepSeek-V3(SiliconFlow) or gpt-3.5-turbo(OpenAI) as translator LLM.

After you get the API key, you can set it in the environment file .env in the root directory of your vitepress repository:

# .env
API_KEY=your_api_key

Translate Your Repository

Run the following command to translate your repository:

npx vitepress-auto-translate -s docs -l zh

This command will translate all the markdown files in the docs directory to Chinese. You can replace docs with your own directory and zh with your target language. The LLM provider is SiliconFlow by default. If you want to use OpenAI, you can specify it with the -m option:

npx vitepress-auto-translate -s docs -l zh -m openai

Multiple languages can be done at once:

npx vitepress-auto-translate -s docs -l zh en fr

[!TIP] You can use the -h option to get more help information about the command.

Features

  • High-Quality Translation: This tool uses LLMs to generate high-quality translations.
  • Multiple Languages: You can translate your repository to multiple languages at once.
  • Markdown Parsing: This tool can parse markdown files, extract text, and translate them, which can preserve the code blocks, math blocks, etc.

Full List of Options

Here is a full list of options you can use with this tool:

Usage: vitepress-auto-translate [options]

| Option | Description | Default | Choices | |----------------------------------|---------------------------------------------------|------------------------------|-----------------------------------------------------------------------------------------------| | -s, --source <source> | The source directory of the markdown files. | docs | <pathname> | | -l, --languages <languages...> | The target languages to translate to. | ['es', 'fr'] | ['en', 'es', 'fr', 'de', 'it', 'pt', 'nl', 'pl', 'ru', 'ja', 'ko', 'zh', 'tzh', 'ar', 'tr'] | | -p, --provider <provider> | The LLM provider to use. | siliconflow | ['siliconflow', 'openai'] | | -m, --model <model> | The LLM model to use. | deepseek-ai/DeepSeek-V3 | <model> | | -e --exclude <exclude...> | The filename pattern to exclude. | [] | <regex> | | -r --retries <retries> | The number of retries when the translation fails. | 3 | <number> | | -b, --baseURL <baseURL> | The base URL of LLM API. | https://api.siliconflow.cn | <url> | | -h, --help | Display help for command. | | |

[!TIP] The choices of --languages option correspond to the language listed below: | Code | Language | |------|--------------------| | en | English | | es | Spanish | | fr | French | | de | German | | it | Italian | | pt | Portuguese | | nl | Dutch | | pl | Polish | | ru | Russian | | ja | Japanese | | ko | Korean | | zh | Simplified Chinese | | tzh | Traditional Chinese| | ar | Arabic | | tr | Turkish |

License

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