Add Electron to `clerk init` framework detection and `--framework`
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 52/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- electron, typescript
- Área
- cli
Línea de trabajo
Comienza con packages/cli-core/src/lib/framework.ts y su FRAMEWORK_MAP; después inspecciona packages/cli-core/src/commands/env/pull.ts y el flujo de init. Verifica que los proyectos de Electron Forge se detecten como Electron, que se seleccionen la configuración de entorno del Electron SDK y de la publishable key, y que se omita CLERK_SECRET_KEY; comprueba si también es necesario actualizar el comportamiento del starter y las pruebas existentes.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Summary
clerk init cannot set up @clerk/electron. --framework has no electron choice, and detection (packages/cli-core/src/lib/framework.ts FRAMEWORK_MAP) matches an Electron Forge project as React once react is installed (React precedes Vite in the map) or as Vite/JavaScript before that, so init installs @clerk/react or @clerk/clerk-js. clerk env pull writes the right variable name (VITE_CLERK_PUBLISHABLE_KEY) but also writes CLERK_SECRET_KEY, because packages/cli-core/src/commands/env/pull.ts includes the secret key for every npm framework. A secret key has no use in an Electron app, so the docs cannot recommend env pull either.
The Electron docs (clerk/clerk#3382) therefore use the manual Publishable Key step and carry no CLI instructions.
Proposal
Add an entry to FRAMEWORK_MAP before the react and vite entries, since Electron Forge projects contain both:
{
dep: "electron",
name: "Electron",
sdk: "@clerk/electron",
envVar: "VITE_CLERK_PUBLISHABLE_KEY",
envFile: ".env",
},
Notes for the implementer:
@clerk/electronneedselectron-storeinstalled alongside it (optional peer used by@clerk/electron/storage);sdkInstallmay need to cover both.- Electron has no secret key;
initandenv pullshould skipCLERK_SECRET_KEYfor this framework the way the iOS and Android entries do (extendisNpmFramework/includeSecretKeyor add a per-framework flag). - The Electron renderer's Content Security Policy needs the instance's Frontend API host; the docs put it in
.envasVITE_CLERK_FRONTEND_API_HOST, whichenv pullcould write too. --startercould scaffold with Electron Forge:npm init electron-app@latest <name> -- --template=vite-typescriptplus React, matching the docs quickstart at https://clerk.com/docs/electron/getting-started/quickstart.- Keyless is not supported by the Electron SDK today (the SDK requires
publishableKey).
Follow-up in docs
Once shipped, the quickstart gains a "For AI agents" block with npx clerk@latest init --framework electron and a <PromptOnly> card (tracked in Linear DOCS, linked from the docs PR).
- Lenguaje dominante
- TypeScript
- Estrellas
- 55
- Forks
- 5
- Merge medio
- 1 d 16 h
- PR fusionados (30 d)
- 17
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de clerk/cli
-
Clerk CLI 3.3.0 on macOS arm64 Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 58/100
-
when i type clerk init Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 42/100
Issues similares
-
bug(cli): hapi doctor inline-media prints a fabricated B:\ helper-script path in packaged installs Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
-
Crush Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 85/100
catppuccin/catppuccin#3125 ·
-
Add a SECURITY.md Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 90/100
ElementsProject/cln-application#167 · 1 comentario · 1 reacción ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Quantco/pnpm-licenses#17 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100