---
title: "CLI and templates"
description: "Create a multilingual app from a template, sign in from your terminal, and connect an app to a Linguana project."
canonical_url: "https://docs.linguana.dev/docs/cli"
markdown_url: "https://docs.linguana.dev/docs/cli.md"
x_farming_labs_generated_preamble: true
---

# CLI and templates
URL: /docs/cli
LLM index: /llms.txt
Description: Create a multilingual app from a template, sign in from your terminal, and connect an app to a Linguana project.

# Linguana CLI

The Linguana CLI creates complete multilingual apps from templates and connects apps to your Linguana account. It is published as `@linguanahq/cli`, installs a `linguana` executable, and is MIT licensed.

Use it to:

- Create a standalone blog, SaaS landing page, or storefront in React, Vue, Svelte, SolidJS, or TanStack Start.
- Try a working multilingual app in **demo mode** with no account and no Linguana API requests.
- Sign in through your browser, then create or select an organization and project without copying IDs from the dashboard.
- Write project linkage and environment credentials into ignored local files, and check the result with `doctor`.

## Requirements

The CLI runs on Node.js **22.12 or later** and also runs on Bun. It works with npm, pnpm, Yarn, and Bun projects.

Run it without installing, or install it globally to use the shorter `linguana` command:

<Tabs items={["npm", "pnpm", "Bun", "Global install"]}>
<Tab value="npm">

```bash title="terminal"
npx @linguanahq/cli --help
```

</Tab>
<Tab value="pnpm">

```bash title="terminal"
pnpm dlx @linguanahq/cli --help
```

</Tab>
<Tab value="Bun">

```bash title="terminal"
bunx @linguanahq/cli --help
```

</Tab>
<Tab value="Global install">

```bash title="terminal"
npm install --global @linguanahq/cli
linguana --help
```

</Tab>
</Tabs>

Examples in these docs use `npx @linguanahq/cli`. With a global install, replace it with `linguana`. Run `--version` to print the installed CLI version.

## Quickstart: a demo app in one minute

```bash title="terminal"
npx @linguanahq/cli create app my-blog --framework solidjs --template blog --demo
cd my-blog
npm run dev
```

Open the local address Vite prints and switch between English, French, Spanish, and Arabic. Arabic switches the page to right-to-left. Demo mode bundles its translations and makes no Linguana API requests.

Run `create app` with no options to choose the template, framework, directory, package manager, and mode interactively:

```bash title="terminal"
npx @linguanahq/cli create app
```

<ExpectedResult>
The CLI writes the app, installs its dependencies with your package manager, and prints the `cd` and `dev` commands to run next. The running app shows its source text in English and changes language from the built-in selector.
</ExpectedResult>

## Choose a template

{/* template-registry:start */}

| Template | App | Included interactions |
| --- | --- | --- |
| `blog` | Elsewhere | Six complete articles, Search and categories, Localized dates |
| `saas` | Relay | Interactive product preview, Monthly and annual pricing, Accessible demo forms |
| `storefront` | Common Goods | Eight original products, Search, sort, and filters, Persistent shopping cart |

Registry version **0.1.0** includes **15 standalone apps**. Every template supports `react`, `vue`, `svelte`, `solidjs`, `tanstack-start`. `solid` is accepted as an alias for `solidjs`. TanStack Start includes server rendering and locale hydration. All variants include local illustrations, responsive layouts, language persistence, and Arabic right-to-left support.

{/* template-registry:end */}

List templates and any hosted demos from your terminal:

```bash title="terminal"
npx @linguanahq/cli templates list
```

The new CLI and template code is MIT licensed. Demo forms do not send information, and checkout does not collect payments or create orders. Bring your own backend when you need those features. See [Create an app](/docs/cli/create-app) for every option and the files each template contains.

## Demo mode and connected mode

| | Demo mode | Connected mode |
| --- | --- | --- |
| Select with | `--demo` | `--connect`, or `link` later |
| Account required | No | Yes, with Owner or Admin access |
| Linguana API requests | None | Sign-in, project setup, and build uploads |
| Translations shown | Bundled English, French, Spanish, and Arabic | Your project's published catalogs, with English source fallback |
| Files written | `linguana.json` with `"mode": "demo"` | `linguana.json` with project IDs, plus an ignored `.env.local` |

You can start in demo mode and connect later. Run `npx @linguanahq/cli link` inside the app; the CLI keeps your code and switches the app to your project. Connected templates stop using bundled demo catalogs, so they cannot conceal what your project actually publishes.

Creating or connecting an app never starts paid translation and never publishes a catalog. Those remain explicit actions in the dashboard.

## Commands at a glance

| Command | What it does | Guide |
| --- | --- | --- |
| `create app [directory]` | Scaffold a template app in demo or connected mode | [Create an app](/docs/cli/create-app) |
| `templates list` | List templates, frameworks, and hosted demos | [Create an app](/docs/cli/create-app) |
| `login` / `logout` / `whoami` | Manage the CLI account session | [Sign in from the terminal](/docs/cli/authentication) |
| `orgs list` / `projects list` | Look up organization and project IDs | [Connect an existing app](/docs/cli/link) |
| `link` | Connect the current app and write credentials | [Connect an existing app](/docs/cli/link) |
| `env pull` | Refresh credentials for an environment | [Connect an existing app](/docs/cli/link) |
| `doctor` | Check SDK, Vite, linkage, session, and token setup | [Check your setup](/docs/cli/doctor) |

Every command accepts `--json`, `--yes`, and `--api-url`. See the [command reference](/docs/cli/commands) for each flag, output shape, exit code, and environment variable, and [Scripts and CI](/docs/cli/automation) for noninteractive use.

## Supported frameworks

Templates, `link`, and `doctor` target Vite apps using React, Vue, Svelte, or SolidJS, and TanStack Start. These match the [framework integrations](/docs/getting-started/frameworks) built on `@linguanahq/vite`.

Next.js uses a separate integration, [`@linguanahq/next`](/docs/getting-started/nextjs). There is no Next.js template yet, and `link` and `doctor` do not recognize Next.js. You can still use `link` to provision a project and credentials for a Next.js app; see [Next.js apps](/docs/cli/link#nextjs-apps).

## How the CLI keeps credentials safe

- The CLI account session is stored in your user configuration directory, never in the app. It is separate for each API origin and is written with owner-only file permissions.
- The project build token goes only into an ignored `.env.local` (or `.env.<environment>.local`) file. The CLI refuses to write credentials into files tracked by Git or through symbolic links.
- Browser variables receive only the public project ID, environment, API URL, and publishable key. Build tokens are never given a `VITE_` prefix.
- `--json` output and error messages never contain session or project tokens.
- Authenticated requests require HTTPS (HTTP only for loopback development) and never follow redirects to another origin.

<SecurityNote>
Hosting login and deployment are separate from Linguana login, and the Linguana CLI does not deploy hosting infrastructure. Configure production build secrets in your host's environment settings; never upload local environment files or the CLI session.
</SecurityNote>

<NextStep>
[Create an app](/docs/cli/create-app), or [connect an existing app](/docs/cli/link) you already have.
</NextStep>

## Sitemap

See the full [sitemap](/sitemap.md) for all pages.
Docs-scoped sitemap: [/docs/sitemap.md](/docs/sitemap.md).
Well-known sitemap: [/.well-known/sitemap.md](/.well-known/sitemap.md).
