@linguanahq/cli
v0.1.2
Published
Create and connect multilingual apps with Linguana.
Readme
@linguanahq/cli
Create and connect multilingual apps with Linguana. Requires Node 22.12+; also runs on Bun. The executable is linguana.
npx @linguanahq/cli create app my-blog --framework solidjs --template blog --demo
cd my-blog
npm run devChoose from blank (a minimal translated hello world with hot reload), blog (Elsewhere), saas (Relay), and storefront (Common Goods) on React, Vue, Svelte, SolidJS, or TanStack Start. All 20 apps are standalone and include local assets, English/French/Spanish/Arabic demo catalogs, deployment configuration, and an MIT license. Demo mode makes no Linguana API requests.
Initial release availability: local demo scaffolding is available now. The hosted API and browser authorization deployment are pending, so login, --connect, link, and env pull require a compatible self-hosted server supplied with --api-url until that deployment is complete. Hosted template demo links are not included yet; run the generated apps locally using the commands above.
Use --connect instead of --demo for browser login and guided organization/project setup. With no mode flag, interactive creation asks you; noninteractive creation requires an explicit choice. --yes never opts you into account connection.
npx @linguanahq/cli login
npx @linguanahq/cli login --no-browser
npx @linguanahq/cli whoami
npx @linguanahq/cli orgs list
npx @linguanahq/cli projects list --organization ORGANIZATION_ID
npx @linguanahq/cli link --project PROJECT_ID
npx @linguanahq/cli env pull --environment staging
npx @linguanahq/cli doctor
npx @linguanahq/cli logoutThe CLI account session stays outside projects, partitioned by API origin. Build tokens go into ignored .env.local or explicit staging/production environment files. The CLI preserves unrelated variables and comments, rejects tracked credential files, and asks before replacing conflicting values. Use --overwrite-env to authorize replacement in automation.
Owner/Admin access is required to create credentials. Provisioning reuses existing APIs and defaults. It never starts paid translation or publishes production catalogs. Existing project locales stay unchanged unless --locales is supplied. env pull reuses valid local secrets; the server cannot recover previously issued token secrets.
link detects your framework and configures linkage/environment only. Integrate the SDK in existing app code using the printed guide. It does not rewrite components or Vite configuration.
Options include --package-manager npm|pnpm|yarn|bun, --skip-install, --organization, --project, --new-organization, --new-project, --locales, --environment, --api-url, --yes, and --json. Run each command with --help for its supported options.
The default API is https://api.linguana.dev. Overrides require HTTPS, except HTTP loopback development. Authenticated requests do not follow redirects. LINGUANA_CONFIG_DIR overrides account-session storage; LINGUANA_AUTH_TOKEN can supply an account session for controlled automation. Never include either session credentials or build tokens in browser variables, committed files, or shared logs.
Exit codes: success 0, operational failure 1, invalid input 2, cancellation 130. If dependency installation fails, the generated app is retained. Interrupted connected setup can be resumed with link; its nonsecret recovery journal is .linguana/setup.json.
Every generated app includes DEPLOY.md for Cloudflare and generic static hosting (or a Node server for TanStack Start). Hosting authentication and deployment are outside this CLI.
Full documentation. New CLI and template code: MIT.
