Localess

Get Started

Command-line interface for Localess — authenticate with your instance, sync translations and schemas, and generate TypeScript type definitions from your content schemas.

Package: @localess/cli

The @localess/cli package is the official command-line interface for the Localess headless CMS platform. It provides commands to authenticate with your Localess instance, synchronize translations and content schemas, and generate TypeScript type definitions from your content schemas.

The CLI is a standalone tool — framework-agnostic and independent of the SDK packages. Install it once per project (or globally) regardless of which framework you use on the application side.

Requirements

  • Node.js >= 24.0.0

Installation

# Install as a project dev dependency (recommended)
npm install @localess/cli@latest -D

# Or install globally
npm install @localess/cli@latest -g

Features

  • Authentication — Secure credential storage for CLI and CI/CD environments
  • Translations — Push, pull, and diff translation files against your Localess space
  • Type Generation — Generate TypeScript type definitions from your Localess content schemas for end-to-end type safety
  • Schema — Define content schemas in TypeScript and sync them with your space

Commands

CommandPurpose
localess login / logoutAuthenticate against an instance and space
localess translation pull|push|diffSync translation files
localess type generateGenerate TypeScript definitions from the space's schemas
localess schema validate|pull|diff|pushSync code-defined schemas with the space

The translation and type groups were previously named translations and types. Both plural names still work as aliases, so existing scripts keep running.

Every command that talks to the API accepts -v, --verbose to print request URLs and statuses, and exits 1 with Not logged in when no credentials are available.

Stored Files

FileDescription
.localess/credentials.jsonStored login credentials (created by localess login)
.localess/localess.d.tsGenerated TypeScript definitions (created by localess type generate)

localess login automatically adds .localess to .gitignore (creating the file if absent).

AI Coding Agents

This package ships a SKILL.md file that provides AI coding agents (GitHub Copilot, Claude Code, Cursor, and others) with accurate, up-to-date APIs, patterns, and best practices.

Reference it from your project's AGENTS.md:

## Localess

@node_modules/@localess/cli/SKILL.md

License

MIT

On this page