Supercharge Your i18next Workflow with the All-New i18next-cli


The i18next ecosystem has been at the heart of web localization for over a decade. It was born in a world of jQuery and has evolved alongside the community through the rise of modern frameworks like React, Vue, and Svelte. As our applications have grown in complexity, so have the challenges of managing translations.
For years, the community has relied on tools like i18next-parser
for the critical task of extracting translation keys. These tools were pioneers and have served us well. But as codebases swelled into the hundreds of thousands of lines and modern JavaScript syntax became the norm, we began to feel the friction. Slow extraction times, struggles with TypeScript and JSX, and the need for a patchwork of different tools to create a complete workflow became common pain points.
It was time for a change.
Today, we're thrilled to introduce i18next-cli
, the official, next-generation, all-in-one toolkit for the i18next ecosystem. It’s a complete reimagining of the developer toolchain, built with three core principles in mind: raw performance, deep code intelligence, and a unified developer experience.
🚀 Want to try it without reading the complete announcement? 😉
We designed i18next-cli
to provide immediate value. You can get an instant analysis of your project's translation status without any configuration. Just run this command in your repository's root:
npx i18next-cli status
It heuristically detects your project structure and gives you a report in seconds.

For those using i18next-parser
, the transition is seamless. Our migration command automatically converts your legacy config file to the new format:
npx i18next-cli migrate-config
Why This Matters: A Better Workflow
Before diving into the features, let's talk about the impact:
Blazing Fast, By Design
Performance is not just a feature; it’s the foundation of a great developer experience. The single biggest bottleneck in older tools was the use of JavaScript-based parsers.
i18next-cli
solves this by being built on SWC, a modern, Rust-based compiler. By leveraging native code, we've unlocked dramatic speed improvements. Workflows that once took over a minute to scan a large project now complete in under five seconds. This isn't just an upgrade; it's a transformation of the development loop, making localization tasks feel instantaneous.
One Tool to Rule Them All
A complete localization workflow requires more than just extraction. i18next-cli
is a true toolkit, unifying all essential functions into a single, cohesive CLI with one configuration file.
extract
: The core command to find and save keys with a powerful--watch
mode.sync
: Keeps your language files synchronized, adding missing keys and removing unused ones.types
: Generates TypeScript definitions for ultimate type safety and autocompletion.lint
: Finds hardcoded strings in your code that should be translated, with smart heuristics to reduce false positives.status
: Gives you a high-level dashboard of your project's translation health, with detailed, per-namespace reporting.
It Just Works: Advanced Pattern Detection
i18next-cli
was built with a scope-aware analyzer that creates a semantic understanding of your code. This means it handles a wide range of modern patterns automatically, with no extra configuration needed.
useTranslation
with keyPrefix
: It understands that keyPrefix
modifies the keys used by t
.
const { t } = useTranslation('common', { keyPrefix: 'userProfile' });
// ✅ Correctly extracts 'userProfile.title' into the 'common' namespace
return <h1>{t('title')}</h1>;
<Trans>
Component with Complex Children: Parsing the <Trans>
component is notoriously tricky. i18next-cli
handles it beautifully, correctly serializing nested components and even extracting keys from props inside the component.
import { Trans, useTranslation } from 'react-i18next';
function WelcomeMessage() {
const { t } = useTranslation();
return (
<Trans i18nKey="welcomeMessage">
Hello <strong title={t('userTitle')}>{{name}}</strong>, welcome to our app!
</Trans>
);
}
The CLI correctly understands this and extracts two keys:
welcomeMessage
, with the default value:"Hello <1>{{name}}</1>, welcome to our app!"
userTitle
from the nestedtitle
prop.
Aliased and Destructured t
functions: Whether you rename t
or pull it from an array, the toolkit follows along.
const { t: translate } = useTranslation('ns1');
const [t2] = useTranslation('ns2');
// ✅ Extracts 'key1' into 'ns1'
translate('key1');
// ✅ Extracts 'key2' into 'ns2'
t2('key2');
Key Fallbacks and returnObjects
: It understands advanced i18next features, extracting all static keys from a fallback array and preserving nested objects when you need them.
// ✅ Extracts both 'key.primary' and 'key.fallback'
t(['key.primary', 'key.fallback']);
// ✅ Preserves the entire `countries` object in your JSON files
t('countries', { returnObjects: true });
🚀 Try it Now - Zero Config!
We designed i18next-cli
to provide immediate value. For most projects, you can get an instant analysis of your translation status without any configuration. It heuristically detects your project structure and gives you a report in seconds.
Just run this command in your repository's root directory:
npx i18next-cli status

Migration Made Easy
For existing users of i18next-parser
, we've made the transition seamless. The toolkit includes a migration command that automatically converts your legacy config file to the new format.
npx i18next-cli migrate-config
Taking Your Workflow to the Cloud with Locize
i18next-cli
provides a best-in-class workflow for managing your local translation files in Git. As your project grows, however, managing translations across a team of developers, translators, and product managers can become a challenge.
This is where locize, our translation management platform, is the natural next step. We built i18next-cli
to be the perfect bridge between local development and a professional, cloud-based localization workflow.
The CLI is fully integrated with locize, allowing you to migrate your project and synchronize translations with simple commands (locize-migrate
, locize-download
, locize-sync
). It moves your translations out of JSON files and into a powerful platform built specifically for collaboration.
Get Started Today
We believe i18next-cli
sets a new standard for localization tooling. It’s a reflection of our commitment to the i18next community and our mission to create a truly seamless developer experience.
Check out the full documentation, advanced configuration, and plugin system on the official GitHub repository. We can't wait to see how it speeds up your workflow.