lokalise-install-auth
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".
- License 许可
- MIT
- 最近更新
- 2026-11-15
- Stars
- ★ 2.0k
- Forks
- 233
01 前言 Front Matter
- name
- lokalise-install-auth
- author
- Jeremy Longshore <jeremy@intentsolutions.io>
- license
- MIT
- version
- 1.0.0
- description
- 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".
- allowed-tools
- Read, Write, Edit, Bash(npm:*), Bash(pip:*), Bash(lokalise2:*), Grep
03 SKILL.md 正文
Lokalise Install & Auth
Overview
Set up Lokalise SDK/CLI and configure API token authentication for translation management.
Prerequisites
- Node.js 14+ (v18+ recommended for ESM support)
- Package manager (npm, pnpm, or yarn)
- Lokalise account with project access
- API token from Lokalise profile settings
Instructions
Step 1: Install Node.js SDK
# Node.js SDK (ESM module, v9+)
npm install @lokalise/node-api
# For CommonJS projects, use v8
npm install @lokalise/node-api@8
Step 2: Install CLI Tool (Optional)
# macOS via Homebrew
brew tap lokalise/cli-2
brew install lokalise2
# Linux/Windows via direct download
# Visit: https://github.com/lokalise/lokalise-cli-2-go/releases
# Verify installation
lokalise2 --version
Step 3: Generate API Token
- Log into Lokalise
- Click profile avatar -> Profile Settings
- Go to "API tokens" tab
- Click "Generate new token"
- Choose "Read and write" for full access
- Copy the token immediately (shown only once)
Step 4: Configure Authentication
# Set environment variable
export LOKALISE_API_TOKEN="your-api-token"
# Or create .env file
echo 'LOKALISE_API_TOKEN=your-api-token' >> .env
# CLI configuration (creates ~/.lokalise2/config.yml)
lokalise2 --token "$LOKALISE_API_TOKEN" project list
Step 5: Verify Connection
import { LokaliseApi } from "@lokalise/node-api";
const lokaliseApi = new LokaliseApi({
apiKey: process.env.LOKALISE_API_TOKEN!,
});
// Test connection by listing projects
const projects = await lokaliseApi.projects().list();
console.log(`Connected! Found ${projects.items.length} projects.`);
Output
- Installed
@lokalise/node-apipackage - Optional:
lokalise2CLI installed - Environment variable or .env file with API token
- Successful connection verification
Error Handling
| Error | Cause | Solution |
|---|---|---|
401 Unauthorized |
Invalid or expired token | Generate new token in profile settings |
403 Forbidden |
Token lacks required permissions | Use read-write token, not read-only |
ERR_REQUIRE_ESM |
Using require() with SDK v9+ | Use ESM imports or downgrade to v8 |
ENOTFOUND api.lokalise.com |
Network blocked | Check firewall allows outbound HTTPS |
Examples
TypeScript Setup (ESM)
import { LokaliseApi } from "@lokalise/node-api";
const lokaliseApi = new LokaliseApi({
apiKey: process.env.LOKALISE_API_TOKEN!,
});
// List all projects
const projects = await lokaliseApi.projects().list();
projects.items.forEach(p => console.log(`${p.project_id}: ${p.name}`));
CommonJS Setup (SDK v8)
const { LokaliseApi } = require("@lokalise/node-api");
const lokaliseApi = new LokaliseApi({
apiKey: process.env.LOKALISE_API_TOKEN,
});
lokaliseApi.projects().list().then(projects => {
console.log(`Found ${projects.items.length} projects`);
});
CLI Configuration File
# ~/.lokalise2/config.yml
token: "your-api-token"
project_id: "123456789.abcdef"
OAuth2 Authentication (for apps)
import { LokaliseApiOAuth } from "@lokalise/node-api";
// Use token obtained via OAuth2 flow
const lokaliseApi = new LokaliseApiOAuth({
apiKey: oauthAccessToken,
});
Resources
Next Steps
After successful auth, proceed to lokalise-hello-world for your first API call.
04 同仓库更多 Skills
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with colors/fonts that you can apply to any artifact that has been creating, or can generate a new theme on-the-fly.
web-artifacts-builder
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use for complex artifacts requiring state management, routing, or shadcn/ui components - not for simple single-file HTML/JSX artifacts.
webapp-testing
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.
neuropixels-analysis
Neuropixels neural recording analysis. Load SpikeGLX/OpenEphys data, preprocess, motion correction, Kilosort4 spike sorting, quality metrics, Allen/IBL curation, AI-assisted visual analysis, for Neuropixels 1.0/2.0 extracellular electrophysiology. Use when working with neural recordings, spike sorting, extracellular electrophysiology, or when the user mentions Neuropixels, SpikeGLX, Open Ephys, Kilosort, quality metrics, or unit curation.
skill-creator
Guide for creating effective skills. This skill should be used when users want to create a new skill (or update an existing skill) that extends Claude's capabilities with specialized knowledge, workflows, or tool integrations.
notebooklm
Use this skill to query your Google NotebookLM notebooks directly from Claude Code for source-grounded, citation-backed answers from Gemini. Browser automation, library management, persistent auth. Drastically reduced hallucinations through document-only responses.