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

vue-i18n-agent

v1.0.1

Published

Automated i18n workflow for Vue/Nuxt 3 powered by DeepSeek: Scan, Extract, Translate, and Refactor. | 基于 DeepSeek 的 Vue/Nuxt 3 国际化全流程自动化工具:一键扫描、提取、翻译与代码回填。

Downloads

240

Readme

vue-i18n-agent

Automated i18n workflow for Vue/Nuxt 3 powered by DeepSeek: Scan, Extract, Translate, and Refactor.

基于 DeepSeek 的 Vue/Nuxt 3 国际化全流程自动化工具:一键扫描、提取、翻译与代码回填。

npm version License: ISC


📖 Languages


🇺🇸 English Documentation

Streamline your internationalization process for Vue 3 and Nuxt 3 projects. From scanning source code to generating language files and refactoring code, everything is automated with AI.

✨ Features

  • 🔍 Auto Scan: Intelligently detects hardcoded Chinese text in .vue files.
  • 🧹 Smart Extract: Filters comments and code, generating a clean list of text to translate.
  • 🤖 AI Translate: Powered by DeepSeek AI, automatically generates semantic keys (snake_case) and translates to multiple languages (En/De).
  • 📂 Auto Generate: Creates/Updates locales/zh.json, en.json, de.json.
  • 🔄 Code Refactor: Automatically replaces hardcoded text with $t('key') in both Templates and Scripts.
  • 🔧 Nuxt Support: Auto-injects const { t } = useI18n() into <script setup>.

🚀 Quick Start (Recommended)

Run directly in your project root without installation:

npx vue-i18n-agent

Or run with an API Key:

npx vue-i18n-agent --key sk-your-deepseek-key

📦 Installation(Optional)

Install as a dev dependency:

npm install -D vue-i18n-agent

Add a script to your package.json:

{
  "scripts": {
    "i18n": "vue-i18n-agent"
  }
}

Run:

npm run i18n

Configuration

An API Key is required for DeepSeek translation. You can provide it in 3 ways:

  1. Interactive: Run the command, and paste the key when prompted.
  2. Environment Variable (Recommended): Create a .env file in your root directory:
DEEPSEEK_API_KEY=sk-your-deepseek-key
  1. Command Line: Use the --key or -k flag.

🛡️ Safety

  • The tool creates a .i18n_cache folder for intermediate files.
  • Please commit your code to Git before running Step 5 (Refactor). Although the tool asks for confirmation, a backup is always recommended.

🇨🇳 中文说明

一键扫描、提取、翻译、回填。让 Nuxt 3 / Vue 3 项目的国际化迁移变得前所未有的简单。

✨ 功能特性

  • 🔍 自动扫描: 智能识别 .vue 文件中的中文硬编码。
  • 🧹 智能提取: 过滤注释和代码,生成干净的待翻译清单。
  • 🤖 AI 翻译: 内置 DeepSeek AI,自动生成语义化 Key 并翻译成多语言 (En/De)。
  • 📂 自动生成: 自动创建/更新 locales/zh.json, en.json, de.json
  • 🔄 代码重构: 全自动将源码中的中文替换为 $t('user_login'),支持 Template 和 Script。
  • 🔧 Nuxt 支持: 自动在 <script setup> 中注入 const { t } = useI18n()

🚀 快速开始 (推荐)

无需安装,直接在你的项目根目录下运行:

npx vue-i18n-agent

或者带上 API Key 运行:

npx vue-i18n-agent -k sk-你的DeepSeek密钥

📦 安装到项目 (可选)

如果想将工具安装到项目中,方便后续使用:

npm install -D vue-i18n-agent

然后在 package.json 中添加脚本:

"scripts": {
  "i18n": "vue-i18n-agent"
}

运行:

npm run i18n

⚙️ 配置API key

本工具需要 DeepSeek API Key 才能进行翻译。你有 3 种方式提供 Key:

  1. 交互式输入:直接运行命令,脚本会弹窗询问 Key。
  2. 环境变量 (推荐):在项目根目录创建 .env 文件:
DEEPSEEK_API_KEY=sk-你的DeepSeek密钥
  1. 命令行参数:使用 --key 或 -k 参数。

🛡️ 安全提示

  • 本工具会在项目根目录生成 .i18n_cache 文件夹用于存放临时数据。
  • 在执行“代码重构 (Step 5)”之前,请务必确保你的代码已经 Git 提交。 虽然工具有确认提示,但备份总是好的!