Language Bridge

init

Scaffold a language-bridge.json config in the current directory.

Creates a language-bridge.json in the current directory, prefilled with your project(s) when the token can reach them.

lb init --url https://lb.example.com

Next: lb validate-config to check it, then lb sync to generate types.

What it generates

init always writes a language-bridge.json with a url and a projects list.

When a stored login (or --token) can reach the server, the real accessible project slugs are prefilled:

language-bridge.json
{
  "url": "https://lb.example.com",
  "projects": [
    { "project": "main-app" },
    { "project": "marketing" }
  ]
}

When logged out or the server is unreachable, it still scaffolds — with a placeholder slug showing the shape to fill in:

language-bridge.json
{
  "url": "https://lb.example.com",
  "projects": [
    { "project": "your-project-slug" }
  ]
}

From here you can flatten a single project to the top level, or add out, locale, namespaces, and more per entry — see Configuration:

language-bridge.json
{
  "url": "https://lb.example.com",
  "project": "main-app",
  "out": "src/@types/resources.d.ts"
}

Options

FlagEnvNotes
-u, --url <url>LB_URLServer base URL.
-t, --token <token>LB_TOKENBearer token (falls back to the stored login).
-H, --header <name:value>LB_HEADERSExtra HTTP header (repeatable).
-f, --forceOverwrite an existing config.

Re-running without --force when a config already exists is a no-op (it tells you to pass --force).

On this page