New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

@wrkspace-co/interceptor

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@wrkspace-co/interceptor

On-demand translation compiler for i18n message files

latest
Source
npmnpm
Version
0.1.5
Version published
Maintainers
1
Created
Source

Interceptor

Interceptor is an on-demand translation compiler that scans your code for translation calls, translates missing strings via an LLM, and writes them into your i18n message files. It keeps translation management aligned with how teams actually ship software: by extracting from source, preserving manual edits, and generating only what’s missing.

Docs: https://wrkspace-co.github.io/Interceptor/

Benefits

  • Eliminate manual file edits. As you code, Interceptor finds t("...") calls and fills in missing translations for each locale. You only review and refine the output, not copy‑paste strings across files.
  • Add languages without rework. Have 300+ existing strings? Just add a new locale in the config. Interceptor will generate the new language from your source code and existing base locale.
  • Keep locale files clean. Enable unused‑key cleanup to remove stale translations and avoid bloated message catalogs.

Features

  • Auto scan and translate missing keys with LLMs
  • Works with popular i18n libraries (react-intl, i18next, vue-i18n) and custom t() calls
  • Never overwrites existing translations
  • Watch mode and batching
  • TypeScript-first

Install

pnpm add -D @wrkspace-co/interceptor

Quick start

  • Create interceptor.config.ts:
import type { InterceptorConfig } from "@wrkspace-co/interceptor";

const config: InterceptorConfig = {
  locales: ["en", "fr"],
  defaultLocale: "en",
  llm: {
    provider: "openai",
    model: "gpt-4o-mini",
    apiKeyEnv: "OPENAI_API_KEY"
  },
  i18n: {
    messagesPath: "src/locales/{locale}.json"
  }
};

export default config;
  • Add .env:
OPENAI_API_KEY=sk-your-real-key
  • Run:
pnpm interceptor

Examples

Vite:

import { defineConfig } from "vite";
import { interceptorVitePlugin } from "@wrkspace-co/interceptor/vite";

export default defineConfig({
  plugins: [interceptorVitePlugin({ configPath: "interceptor.config.ts" })]
});

Webpack:

const { InterceptorWebpackPlugin } = require("@wrkspace-co/interceptor/webpack");

module.exports = {
  plugins: [new InterceptorWebpackPlugin({ configPath: "interceptor.config.ts" })]
};

LLMs

Supports OpenAI, Gemini, Claude, Mistral, Cohere, Groq, DeepSeek, and OpenAI-compatible providers. See docs for configuration examples.

Learn more

Full documentation

Credits Interceptor is a part of Wrkspace Co. © group.

Keywords

i18n

FAQs

Package last updated on 13 Feb 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts