| name | lokalise-hello-world |
| description | Create a minimal working Lokalise example.
Use when starting a new Lokalise integration, testing your setup,
or learning basic Lokalise API patterns.
Trigger with phrases like "lokalise hello world", "lokalise example",
"lokalise quick start", "simple lokalise code".
|
| allowed-tools | Read, Write, Edit |
| version | 1.14.0 |
| license | MIT |
| author | Jeremy Longshore <jeremy@intentsolutions.io> |
| tags | ["saas","lokalise","api","testing"] |
| compatibility | Designed for Claude Code, also compatible with Codex and OpenClaw |
Lokalise Hello World
Overview
End-to-end walkthrough: list projects, create a test project, add keys, set translations across languages, and retrieve them. Covers both the Node SDK (@lokalise/node-api) and the CLI (lokalise2).
Prerequisites
- Lokalise API token exported as
LOKALISE_API_TOKEN
- Node.js 18+ with
@lokalise/node-api installed (npm i @lokalise/node-api)
- Lokalise CLI v2 installed (
brew install lokalise2 or binary releases)
Instructions
- List all projects using the SDK and CLI.
import { LokaliseApi } from "@lokalise/node-api";
const client = new LokaliseApi({ apiKey: process.env.LOKALISE_API_TOKEN! });
const projects = await client.projects().list({ page: 1, limit: 20 });
for (const p of projects.items) {
console.log(`${p.project_id} ${p.name} (${p.statistics.languages} languages)`);
}
set -euo pipefail
lokalise2 --token "$LOKALISE_API_TOKEN" project list
- Create a test project with three languages.
const project = client.().({
: ,
: ,
: [
{ : , : },
{ : , : },
{ : , : },
],
: ,
});
= project.;
.();