Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Install and configure Lokalise SDK/CLI authentication. Use when setting up a new Lokalise integration, configuring API tokens, or initializing Lokalise in your project. Trigger with phrases like "install lokalise", "setup lokalise", "lokalise auth", "configure lokalise API token".
.claude/skills/jeremylongshore-lokalise-install-auth/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 48% | 0% |
| case-02 | ✗→✓ | ▲ Improved | 51% | 0% |
| case-03 | ✗→✓ | ▲ Improved | 49% | 0% |
| case-04 | ✗→✓ | ▲ Improved | 48% | 0% |
| case-05 | ✗→✓ | ▲ Improved | 40% | 0% |
Set up Lokalise SDK/CLI and configure API token authentication for translation management. Covers the Node.js SDK (@lokalise/node-api v12+), the CLI (lokalise2), and OAuth2 for Lokalise apps.
bashset -euo pipefail # SDK v9+ is ESM-only — requires "type": "module" in package.json or .mjs files npm install @lokalise/node-api # For CommonJS projects that cannot migrate to ESM, pin to v8 npm install @lokalise/node-api@8
bashset -euo pipefail # macOS via Homebrew brew tap lokalise/cli-2 brew install lokalise2 # Linux — download latest release binary LATEST_CLI=$(curl -s https://api.github.com/repos/lokalise/lokalise-cli-2-go/releases/latest \ | grep -oP '"tag_name": "\K[^"]+') curl -sL "https://github.com/lokalise/lokalise-cli-2-go/releases/download/${LATEST_CLI}/lokalise2_linux_x86_64.tar.gz" | tar xz sudo mv lokalise2 /usr/local/bin/ # Verify installation lokalise2 --version
bash# Set environment variable (recommended) export LOKALISE_API_TOKEN="your-api-token" # Or create .env file for local development echo 'LOKALISE_API_TOKEN=your-api-token' >> .env # CLI configuration — creates ~/.lokalise2/config.yml lokalise2 --token "$LOKALISE_API_TOKEN" project list
typescriptimport { LokaliseApi } from "@lokalise/node-api"; const lokaliseApi = new LokaliseApi({ apiKey: process.env.LOKALISE_API_TOKEN!, enableCompression: true, // Gzip responses for faster transfers }); // Test connection by listing projects const projects = await lokaliseApi.projects().list({ limit: 10 }); console.log(`Connected! Found ${projects.items.length} projects.`); for (const p of projects.items) { console.log(` ${p.project_id}: ${p.name}`); }
typescriptimport { LokaliseApiOAuth } from "@lokalise/node-api"; // Use token obtained via OAuth2 flow // OAuth scopes: read_projects, write_projects, read_keys, write_keys, etc. const lokaliseApi = new LokaliseApiOAuth({ apiKey: oauthAccessToken, }); // All SDK methods work identically with OAuth tokens const projects = await lokaliseApi.projects().list({ limit: 10 });
OAuth2 is required when building Lokalise marketplace apps that act on behalf of users. Standard API tokens are sufficient for internal integrations.
@lokalise/node-api package (ESM v9+ or CJS v8)lokalise2 CLI installed and verified| Error | Cause | Solution | |-------|-------|----------| | 401 Unauthorized | Invalid or expired token | Generate new token at Profile Settings > API Tokens | | 403 Forbidden | Token lacks required scope | Use read-write token, or check OAuth scopes | | ERR_REQUIRE_ESM | Using require() with SDK v9+ | Use ESM import or downgrade to @lokalise/node-api@8 | | ENOTFOUND api.lokalise.com | Network blocked | Check firewall allows outbound HTTPS to api.lokalise.com | | Cannot find module | SDK not installed | Run npm install @lokalise/node-api |
typescript// src/lib/lokalise.ts import { LokaliseApi } from "@lokalise/node-api"; export function createClient(apiKey?: string): LokaliseApi { const key = apiKey ?? process.env.LOKALISE_API_TOKEN; if (!key) throw new Error("Set LOKALISE_API_TOKEN or pass apiKey"); return new LokaliseApi({ apiKey: key, enableCompression: true }); }
yaml# ~/.lokalise2/config.yml token: "your-api-token" project_id: "123456789.abcdef"
bashset -euo pipefail # Check which projects the token can access curl -s -H "X-Api-Token: $LOKALISE_API_TOKEN" \ "https://api.lokalise.com/api2/projects?limit=5" \ | jq '.projects[] | {project_id, name}'
After successful auth, proceed to lokalise-hello-world for your first API call.
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→pass | 12,108 | 15,236 | +26% | 1 | 1 | 0% | 2,371 | 3,514 | +48% | 0 | 0 | — |
case-02 | fail→pass | 21,393 | 19,213 | -10% | 1 | 1 | 0% | 2,322 | 3,504 | +51% | 0 | 0 | — |
case-03 | fail→pass | 18,003 | 12,283 | -32% | 1 | 1 | 0% | 1,981 | 2,959 | +49% | 0 | 0 | — |
case-04 | fail→pass | 12,375 | 11,217 | -9% | 1 | 1 | 0% | 1,800 | 2,660 | +48% | 0 | 0 | — |
case-05 | fail→pass | 8,265 | 4,490 | -46% | 1 | 1 | 0% | 1,560 | 2,188 | +40% | 0 | 0 | — |
case-06 | fail→pass | 33,654 | 13,708 | -59% | 1 | 1 | 0% | 1,907 | 3,226 | +69% | 0 | 0 | — |
case-07 | pass→pass | 13,258 | 5,515 | -58% | 1 | 1 | 0% | 1,156 | 2,387 | +106% | 0 | 0 | — |
case-08 | fail→pass | 15,053 | 6,809 | -55% | 1 | 1 | 0% | 1,772 | 2,753 | +55% | 0 | 0 | — |
case-09 | pass→pass | 13,547 | 9,668 | -29% | 1 | 1 | 0% | 1,448 | 2,237 | +54% | 0 | 0 | — |
case-10 | fail→pass | 20,623 | 14,834 | -28% | 1 | 1 | 0% | 2,683 | 3,000 | +12% | 0 | 0 | — |
case-11 | fail→pass | 31,252 | 11,826 | -62% | 1 | 1 | 0% | 1,814 | 2,696 | +49% | 0 | 0 | — |
case-12 | fail→pass | 16,495 | 11,379 | -31% | 1 | 1 | 0% | 1,730 | 2,688 | +55% | 0 | 0 | — |
case-13 | fail→pass | 14,412 | 11,137 | -23% | 1 | 1 | 0% | 1,582 | 2,678 | +69% | 0 | 0 | — |
case-14 | pass→pass | 19,828 | 14,552 | -27% | 1 | 1 | 0% | 2,040 | 3,137 | +54% | 0 | 0 | — |
case-15 | fail→pass | 18,684 | 7,756 | -58% | 1 | 1 | 0% | 2,239 | 3,041 | +36% | 0 | 0 | — |
case-16 | fail→pass | 8,681 | 4,100 | -53% | 1 | 1 | 0% | 1,397 | 2,222 | +59% | 0 | 0 | — |
case-17 | pass→pass | 6,493 | 6,069 | -7% | 1 | 1 | 0% | 950 | 2,528 | +166% | 0 | 0 | — |
case-18 | pass→pass | 19,582 | 17,364 | -11% | 1 | 1 | 0% | 2,466 | 3,338 | +35% | 0 | 0 | — |
case-19 | pass→pass | 13,645 | 13,119 | -4% | 1 | 1 | 0% | 1,443 | 2,685 | +86% | 0 | 0 | — |
case-20 | pass→pass | 14,994 | 12,899 | -14% | 1 | 1 | 0% | 1,854 | 3,899 | +110% | 0 | 0 | — |
case-21 | pass→pass | 9,479 | 9,138 | -4% | 1 | 1 | 0% | 730 | 2,188 | +200% | 0 | 0 | — |
case-22 | fail→fail | 15,213 | 18,050 | +19% | 1 | 1 | 0% | 1,701 | 3,980 | +134% | 0 | 0 | — |
case-23 | fail→fail | 12,935 | 17,602 | +36% | 1 | 1 | 0% | 2,075 | 3,617 | +74% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 23 cases were attempted, and 22 counted toward the lift figure. The other 1 produced results that are not comparable between the two arms, so they are excluded from the headline rather than averaged into it. The headline lift of +57 percentage points is the difference between those two pass rates over the 22 comparable cases.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.