[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-73948":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":22,"archived":23,"fork":23,"defaultBranch":24,"hasWiki":25,"hasPages":23,"topics":26,"createdAt":10,"pushedAt":10,"updatedAt":27,"readmeContent":28,"aiSummary":29,"trendingCount":16,"starSnapshotCount":16,"syncStatus":18,"lastSyncTime":30,"discoverSource":31},73948,"languine","languine-ai\u002Flanguine","languine-ai","Translate your application with Languine CLI powered by AI.","https:\u002F\u002Flanguine.ai",null,"TypeScript",2028,132,10,9,0,1,2,11,3,62.47,"MIT License",false,"main",true,[],"2026-06-12 04:01:12","\u003Cp align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Fraw.githubusercontent.com\u002Flanguine-ai\u002Flanguine\u002Fmain\u002Fapps\u002Fweb\u002Fsrc\u002Fapp\u002Fopengraph-image.png\" alt=\"Languine\" \u002F>\n\u003C\u002Fp>\n\n# Languine\n\n**Self-hosted, Vercel-native AI localization.** Click Deploy. Run `npx languine`. That's it.\n\n---\n\n## One-click deploy\n\n[![Deploy with Vercel](https:\u002F\u002Fvercel.com\u002Fbutton)](https:\u002F\u002Fvercel.com\u002Fnew\u002Fclone?repository-url=https%3A%2F%2Fgithub.com%2Flanguine-ai%2Flanguine&project-name=languine&repository-name=languine&root-directory=apps%2Fweb&env=LANGUINE_API_KEY,AI_MODEL&envDescription=LANGUINE_API_KEY%20is%20a%20random%20token%20you%20pick%20(e.g.%20%60openssl%20rand%20-hex%2032%60).%20AI_MODEL%20is%20optional%20(default%20openai%2Fgpt-4.1).&envLink=https%3A%2F%2Fgithub.com%2Flanguine-ai%2Flanguine%23environment-variables&stores=%5B%7B%22type%22%3A%22postgres%22%2C%22productSlug%22%3A%22neon%22%7D%5D&demo-title=Languine&demo-description=Self-hosted%20AI%20localization%20on%20your%20own%20Vercel%20account&demo-image=https%3A%2F%2Fraw.githubusercontent.com%2Flanguine-ai%2Flanguine%2Fmain%2Fapps%2Fweb%2Fsrc%2Fapp%2Fopengraph-image.png&demo-url=https%3A%2F%2Flanguine.ai)\n\nWhat the button does:\n\n1. Forks this repo to your GitHub account.\n2. Creates a Vercel project with `apps\u002Fweb` as the root.\n3. Provisions serverless Postgres via the Vercel Marketplace — `DATABASE_URL` is auto-injected.\n4. Prompts you for `LANGUINE_API_KEY` (any random string) and an optional `AI_MODEL` slug.\n5. Builds and deploys. The build automatically runs `drizzle-kit migrate` against your fresh database.\n\nAfter the first deploy, do these two things:\n\n1. **Enable Deployment Protection.** In your Vercel project: *Settings → Deployment Protection* → turn on **Vercel Authentication** (or **Password Protection**). This gates the dashboard and `\u002Fcli\u002Ftoken`. Without this, your API key is publicly visible.\n2. **Open the dashboard** (`https:\u002F\u002F\u003Cyour-deployment>.vercel.app`). It shows a status checklist and ready-to-paste CLI commands.\n\nThat's it. No additional integrations to configure — Vercel AI Gateway authenticates automatically via the project's OIDC token.\n\n## Use the CLI\n\n> The self-hosted CLI ships under the `selfhosted` npm dist-tag so it doesn't disturb users still pointed at the legacy hosted backend. Install it with `npx languine@selfhosted ...` (or pin `\"languine\": \"^4\"` in your `package.json`). `npx languine@latest` continues to resolve to the legacy 3.x CLI for the old hosted service.\n\nIn any project that needs translations:\n\n```bash\nnpx languine@selfhosted login --url https:\u002F\u002Flanguine.your-team.vercel.app\nnpx languine@selfhosted init\nnpx languine@selfhosted translate\n```\n\n`languine login` opens `\u002Fcli\u002Ftoken` in your browser. Because Deployment Protection is on, only authorized owners can see the page — copy the API key, paste it into the CLI prompt.\n\n`languine init` creates a project on your deployment via tRPC (`project.create`) and writes the returned `projectId` into `languine.json`. You don't need to provision anything from the dashboard.\n\nFor non-interactive use (CI, scripts):\n\n```bash\nexport LANGUINE_BASE_URL=https:\u002F\u002Flanguine.your-team.vercel.app\nexport LANGUINE_API_KEY=\u003Cthe-key-you-set-on-vercel>\nnpx languine@selfhosted translate\n```\n\n## GitHub Action\n\n```yaml\nname: Languine\non:\n  push:\n    branches: [main]\n\njobs:\n  translate:\n    runs-on: ubuntu-latest\n    permissions:\n      contents: write\n      pull-requests: write\n    steps:\n      - uses: actions\u002Fcheckout@v4\n      - uses: languine-ai\u002Flanguine@v4\n        with:\n          api-key: ${{ secrets.LANGUINE_API_KEY }}\n          base-url: ${{ vars.LANGUINE_BASE_URL }}\n          project-id: prj_xxxxxxx\n          create-pull-request: 'true'\n```\n\n## Environment variables\n\n| Variable | Required | Source | Description |\n| --- | --- | --- | --- |\n| `LANGUINE_API_KEY` | Yes | Set at deploy | Single API key shared between the dashboard, CLI and Action. Generate with `openssl rand -hex 32`. |\n| `DATABASE_URL` | Yes | Auto-injected | Postgres connection string from the Vercel Marketplace integration you picked at deploy. |\n| `AI_MODEL` | No | Set at deploy | Vercel AI Gateway model slug. Defaults to `openai\u002Fgpt-4.1`. Examples: `anthropic\u002Fclaude-sonnet-4`, `openai\u002Fgpt-4.1-mini`. |\n| `AI_GATEWAY_API_KEY` | No | Local dev only | Only needed when running locally outside Vercel. In production the Gateway uses the project's OIDC token. |\n\n## Architecture\n\n- **Hosting:** Vercel (Next.js 16, App Router, Node.js runtime).\n- **Database:** Serverless Postgres from the Vercel Marketplace + Drizzle ORM.\n- **Background jobs:** Vercel Workflows (`workflow` SDK) — durable, resumable, observable.\n- **AI:** Vercel AI Gateway (`@ai-sdk\u002Fgateway` + AI SDK v6) — single configurable model.\n- **Auth:** Single `LANGUINE_API_KEY` for the CLI\u002FAction; the dashboard is gated by Vercel Deployment Protection.\n\n```mermaid\nflowchart LR\n  Dev[Developer] -->|languine| CLI\n  GHA[GitHub Action] -->|x-api-key| Web\n  CLI -->|x-api-key| Web[apps\u002Fweb on Vercel]\n  Web --> Workflows[Vercel Workflows]\n  Workflows --> Gateway[Vercel AI Gateway]\n  Gateway --> Models[OpenAI \u002F Anthropic \u002F ...]\n  Web --> DB[(Postgres)]\n  Workflows --> DB\n  Owner[Owner browser] -->|Deployment Protection| Web\n```\n\n## Local development\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Flanguine-ai\u002Flanguine\ncd languine\nbun install\ncp apps\u002Fweb\u002F.env.example apps\u002Fweb\u002F.env  # fill in DATABASE_URL etc.\nbun dev\n```\n\nSet `AI_GATEWAY_API_KEY` in `apps\u002Fweb\u002F.env` so the Gateway can authenticate when not running on Vercel.\n\n## Tests\n\n```bash\nbun test                         # everything\nbun test --filter @languine\u002Fweb  # just the web app\nbun test --filter languine       # just the CLI\n```\n\n## License\n\n[MIT](.\u002FLICENSE) © Midday Labs AB","Languine 是一个基于AI的本地化工具，通过CLI帮助开发者快速实现应用程序的多语言支持。其核心功能包括一键部署至Vercel、自动化的数据库迁移以及使用AI模型进行文本翻译。项目采用TypeScript编写，提供了一个自托管的解决方案，并且集成了Vercel AI Gateway以简化认证流程。适用于需要为Web应用添加国际化支持的场景，特别是那些希望在不牺牲安全性和控制权的前提下利用AI技术加速本地化进程的团队。","2026-06-11 03:48:01","high_star"]