Documentation
Guides, references, and migration material for Palamedes.
Page outline
Field guide / maintained from source
Canonical source files still live under docs/; this page groups the generated routes by the question in front of you.
Guides
Start a translation workflow, connect a host, and operate it day to day.
First Working Translation In 5 Minutes
This guide is the shortest path to the good Palamedes feeling: write a message, extract it, translate it, and see it render without changing the mental model.
First Working Translation with Next.js
This guide takes an existing TypeScript Next.js 16 App Router application from one message to one rendered translation. It uses Server Components on the Node runtime. The Next.js package README and API reference cover Client Components, server actions, and production options after this first path works.
Platform Support
Palamedes ships native packages for the CLI and the Node binding. Check this page before installing @palamedes/cli or a package that uses @palamedes/core-node.
Configuration Reference
Palamedes uses palamedes.yaml as the canonical config file. The native pmds CLI loads data-only config files and does not execute JavaScript or TypeScript config. Supported file names are palamedes.yaml, palamedes.yml, palamedes.json, and palamedes.toml.
CLI Reference
The @palamedes/cli package publishes pmds. Its npm launcher selects the installed platform binary; the native Rust executable owns built-in and plugin command dispatch.
Catalog Formats
Palamedes catalogs are source-string-first. The semantic message identity is message + context; compiled lookup keys remain an internal runtime detail.
MDX Messages
Palamedes treats .mdx as a first-class source format. The native extractor and the Vite compiler consume the same Ferromark source-ranged AST, so a message extracted by pmds extract is the same message rendered by the compiled module.
Set up or migrate with an agent skill
The repository includes a portable palamedes skill for an AI coding agent working in your application. It covers:
Locale Strategies And URL Policies
Locale controls support five authoritative strategies: cookie, route, domain, subdomain, and tld. The example matrix proves cookie, route, subdomain, and tld integrations plus derived host mapping on top of the route strategy. Domain mapping and SEO link generation have focused core contract tests.
Framework Example Notes
This document records what each framework family in the example matrix verifies, which quirks were fixed in Palamedes, and which remaining edges belong to the framework/tooling layer rather than the Palamedes runtime model.
Demo Deployments
The live deployment contains 41 demos on one Bunny Magic Containers app: ten framework families × four locale strategies, plus Vite MDX. Its 101 custom HTTPS hostnames preserve the public URL shapes. The image identity, rollout, and public acceptance receipts are recorded below and in the framework-demo rollout.
Shared Bunny Demo Rollout
The shared Bunny Magic Containers app serves 41 demos: ten framework families across four locale strategies, plus Vite MDX. Its inventory contains 101 public HTTPS hosts. Demo Deployments records the pinned image, source, active rollout, live URLs, and public acceptance receipts. Historical migration work is recorded in 1261.
Palamedes In Backend Servers
Palamedes is not limited to React frameworks.
Rust Applications (Experimental)
Use Palamedes to prepare PO catalogs during a Cargo build, then load the selected language from a file when your Rust CLI or service runs. Every language, including English, stays outside the executable. Compatible translation edits and additional languages can ship without rebuilding it.
Pseudo-Localization And Fallback Locales
Palamedes supports two config options that are useful during adoption and UI quality checks:
Translation Candidates and Patches
Palamedes Core exposes a provider-neutral boundary for finding local translation work and writing completed translations back to repository-owned catalogs. The API is available from Rust and through @palamedes/core-node.
Troubleshooting
This page collects the setup failures that usually happen before an app has a stable Palamedes workflow. It is organized by symptom so the exact error string can lead here.
References
Look up package APIs, configuration details, compatibility notes, and project policy.
Stability And Versioning
Palamedes 2.0 is the current major release. The app-facing surfaces below are SemVer-stable, as they have been since 1.0. This page defines what app teams can depend on and where changes may still happen between minor releases.
Palamedes Principles
These are the product principles that shape Palamedes today.
Optional CLI usage reporting
Palamedes v2 includes the shared Rust app-tracking client for optional native CLI usage reporting. It is off until you opt in. Previous update-check analytics are not consent. The npm launcher, framework/build plugins, Rust/Node APIs, and application runtimes do not report automatically.
`pmds` Binary Plugin Protocol
Binary plugins are standalone executables that extend pmds with namespaced commands. The native Rust CLI spawns them and exchanges newline-delimited JSON over stdio. The protocol is the only CLI plugin boundary; JavaScript modules and executable JavaScript/TypeScript configs are not supported.
`@palamedes/cli`
@palamedes/cli publishes the pmds command. A minimal npm launcher selects the packaged native executable; Rust owns built-ins and explicit binary plugin commands.
`@palamedes/config`
@palamedes/config loads and validates Palamedes data config files and legacy palamedes.config. files.
`@palamedes/core-node`
@palamedes/core-node is the JavaScript wrapper around the native Palamedes core. Most apps use it indirectly through the CLI and plugins.
`@palamedes/core`
Palamedes v2 executes compiled catalogs through one parser-free runtime on server and client. ICU is an authoring, translation, validation and compilation format. Framework adapters own ordinary catalog delivery; explicit catalog loading remains available for standalone/custom integrations.
Migrating from `@palamedes/eslint-plugin`
The ESLint/Oxlint adapter is removed from the Palamedes v2 release set. Use pmds lint for native source-authoring checks, including explicit file checks for agent workflows:
`@palamedes/extractor`
@palamedes/extractor exposes the native message extractor for Palamedes macro syntax.
`@palamedes/next-plugin`
@palamedes/next-plugin wires Palamedes macro transformation and automatic compiled catalog delivery into Next.js.
Migrating from `@palamedes/react-router-rsc`
The React Router RSC adapter is discontinued in Palamedes v2. React Router's RSC mode is still experimental upstream, so no v2 package provides a React Router RSC entry point. The 1.x package stays on npm, but it gets no further releases and does not work with v2 packages.
React Router Framework Mode
@palamedes/react-router connects Palamedes to React Router Framework Mode on Vite. The application adds three pieces next to @palamedes/vite-plugin: one createReactRouterI18n() call with its locale policy, the adapter's middleware on the root route, and the adapter's server entry. Loaders and actions need no Palamedes code.
`@palamedes/react`
@palamedes/react provides provider-free React runtime components, macro entry points, and headless locale-switch helpers.
Example Screenshots
These screenshots are generated from the Playwright-based browser verifier that checks 25 browser-capable examples on relevant pull requests, main pushes, weekly runs, and opted-in manual dispatches. The 20 UI-adapter examples represented here have versioned captures; Vite MDX and the four Remix browser proofs have no capture artifact. All 25 matrix examples receive smoke verification on relevant pull requests and main pushes. They are versioned verification artifacts, not manually curated mockups.
API Reference
This directory documents the public Palamedes package surface that app teams are expected to use directly.
`@palamedes/remix`
@palamedes/remix integrates Palamedes with Remix v3's Node loader and browser asset pipelines.
`@palamedes/runtime`
@palamedes/runtime provides the active i18n instance lookup used by transformed macro output.
`@palamedes/solid`
@palamedes/solid mirrors the React package for Solid applications.
`@palamedes/tanstack`
@palamedes/tanstack activates a fresh request-local i18n instance around TanStack Start page requests and createServerFn() invocations. It is opt-in: existing TanStack Start applications do not change unless they install and register the middleware.
`@palamedes/transform`
@palamedes/transform exposes the low-level macro transformer used by the plugins.
`@palamedes/vite-plugin`
@palamedes/vite-plugin transforms Palamedes macro imports, compiles .mdx modules, and compiles .po imports inside Vite builds.
`@palamedes/waku`
@palamedes/waku activates a fresh request-local i18n instance around Waku handlers, including "use server" actions. It is opt-in: existing Waku applications do not change until an interceptor is registered.
Comparisons and migrations
Evaluate tradeoffs, inspect proof, and plan a migration with the supporting evidence.
Palamedes 2.0 release notes
Palamedes 2.0 is out. These notes explain what changed and why. To upgrade an existing application, follow the v2 migration guide.
Migrating the application runtime to Palamedes v2
V2 uses compiled messages on server and client, including development. The package roots and existing compiled subpaths share one implementation. This guide covers the coordinated major transition and its breaking changes. For an overview of the improvements and their practical impact, read the Palamedes 2.0 release notes.
Ferralk 1.1 adoption
The native CLI uses released Ferralk 1.1.0 for traversal and include/exclude matching. Extraction and watch mode share PatternSet with PatternOptions::walker().matchhidden(true) and the separator-crossing ismatch entry point. Globset is no longer a CLI dependency or an alternate matching mode. This is a pre-v2 pattern-contract change.
Migration from Lingui to Palamedes
Palamedes is easiest to understand as a steadier path for teams that already like Lingui-style authoring. A migration can preserve familiar macro-style authoring and existing PO catalogs.
Palamedes vs. Lingui
Palamedes is not trying to be a universal rebuttal to Lingui. It is a focused path for teams that already like macro-based i18n and want the stack underneath to feel more coherent, steadier, and easier to trust.
Comparing Modern i18n Approaches
Not every modern TypeScript i18n library should be compared in the same way.
Proof, Benchmarks, and Current Maturity
Palamedes makes a simple public claim: authoring, message identity, catalogs, and runtime access should form one coherent model.
ICU Semantics Proof: Source to Runtime
Palamedes preserves ICU MessageFormat semantics across every pipeline stage it controls:
End-to-End Extraction Workflow Benchmark
This benchmark measures the local extraction workflow a team would actually run after source changes:
Benchmarking Against Lingui v6
This repo includes a separate head-to-head benchmark harness for Palamedes vs. Lingui v6.
Migrating To Palamedes 1.0
Palamedes 1.0 ships the Ferrocat 2.x catalog migration as the stabilization release for the public app-facing surface. The runtime authoring model stays source-string-first, but catalog storage, metadata, and cleanup semantics now follow Ferrocat 2.x.