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

@localey/cli

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@localey/cli

**Localization that feels like TypeScript.**

latest
npmnpm
Version
0.1.26
Version published
Maintainers
1
Created
Source

🧩 Localey

Localization that feels like TypeScript.

Localey is a high-precision, component-centric localization engine designed for modern web and mobile apps. It automates the extraction of hardcoded strings, generates semantic translation keys using AI, and ensures 100% type safety.

🚀 Recent Features (v0.1.21)

🎯 High-Precision Extraction

  • Technical Noise Filtering: Automatically skips HEX colors (#ffffff), CSS units (10px, 1rem), numbers, and technical constants.
  • Smart Scoping: Automatically generates component-scoped keys (e.g., LoginForm.SUBMIT).
  • Context-Aware Fallbacks: Intelligently uses semantic folder names for Next.js/Expo routes (skipping generic names like app or index).

🛠️ Developer Control

  • ignoreAttributes: Blacklist custom props from extraction in your localey.config.json.
  • /* localey-ignore */: Skip specific lines or elements with a simple comment.
  • Type-Safe Injection: Automatically adds as any to t() calls in JSX props to satisfy strict TypeScript union types.

🤖 AI-Powered Workflow

  • ai.auto: Enable AI in your config, and Localey will automatically use it for every extraction.
  • Improved Context: Uses JSX parent components (like Button, Text) to decide on prefixes (BTN_, LBL_).
  • Diagnostic Logging: Clear feedback in the console if your AI configuration is missing or invalid.

📦 Installation

npm install -g @localey/cli

🛠️ Getting Started

1. Initialize

localey setup

This generates localey.config.json and sets up your i18n infrastructure.

2. Configure (Optional)

Add your AI key and custom exclusions to localey.config.json:

{
  "frameworks": ["react"],
  "ignoreAttributes": ["rightIcon", "headerLeft"],
  "ai": {
    "provider": "openai",
    "apiKey": "sk-...",
    "auto": true
  }
}

3. Extract & Sync

localey extract --dir ./src

Or use the real-time watcher:

localey dev --dir ./src

📜 Manual Control

Want to skip a specific string?

<Text>{/* localey-ignore */}Not for translation</Text>
<div className="bg-[#ea580c]" /> // Automatically skipped

📄 License

MIT

FAQs

Package last updated on 25 Mar 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