From 31c3105e346b0b5b6b2d833656d5bfde1990851d Mon Sep 17 00:00:00 2001 From: ZTatman Date: Wed, 8 Apr 2026 14:52:11 -0400 Subject: [PATCH] remove myst.config.json generation, rely on .env for container deployments --- README.md | 2 +- docs/plans/2026-03-30-phase-1-design.md | 3 +-- ...6-03-31-myst-auth-and-deployment-design.md | 2 -- packages/cli/src/commands/init.ts | 20 ++----------------- 4 files changed, 4 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index ecc610e..6490f76 100644 --- a/README.md +++ b/README.md @@ -93,7 +93,7 @@ GRANT_TOKEN_SECRET="your-secret-here" - [x] Project renamed from Embargo to Myst - [x] CLI scaffold (`myst init`) -- [x] Config generation (`.env`, `myst.config.json`) +- [x] Config generation (`.env`) - [ ] Service foundation (FastAPI + PostgreSQL) - [ ] `myst forgejo bootstrap` — verify Forgejo connectivity - [ ] `myst doctor` — validate configuration diff --git a/docs/plans/2026-03-30-phase-1-design.md b/docs/plans/2026-03-30-phase-1-design.md index b6643fd..2389dd4 100644 --- a/docs/plans/2026-03-30-phase-1-design.md +++ b/docs/plans/2026-03-30-phase-1-design.md @@ -130,8 +130,7 @@ Only repo owners can create view links for their repos. `myst init` should generate all Myst-owned deployment config needed for Phase 1: -- `.env` -- `myst.config.json` +- `.env` (environment variables for Docker/container deployment) - any future Myst-only deployment templates, but never Forgejo provisioning files `myst init` should provide inline guidance that: diff --git a/docs/plans/2026-03-31-myst-auth-and-deployment-design.md b/docs/plans/2026-03-31-myst-auth-and-deployment-design.md index b877229..29d10ad 100644 --- a/docs/plans/2026-03-31-myst-auth-and-deployment-design.md +++ b/docs/plans/2026-03-31-myst-auth-and-deployment-design.md @@ -208,7 +208,6 @@ The CLI is the primary way to configure and validate Myst against an existing Fo - generate a grant token secret by default unless the operator pastes one - generate all Myst-owned config files needed for deployment in Phase 1 - write `.env` -- write `myst.config.json` - print manual follow-up actions for admin URL protection, app deployment, and Forgejo validation - show links to Forgejo docs for API usage, token scopes, repo permissions, and the admin CLI - remind operators to run `myst init` in the directory where Myst will be deployed, usually on the target VPS or server workspace @@ -285,7 +284,6 @@ Forgejo docs to link directly from CLI output: Expected outputs from `init`: - `.env` -- `myst.config.json` - optional platform templates for Myst only (e.g., Docker Compose for Dokploy) ## Data Model diff --git a/packages/cli/src/commands/init.ts b/packages/cli/src/commands/init.ts index ff4d5cc..04451ec 100644 --- a/packages/cli/src/commands/init.ts +++ b/packages/cli/src/commands/init.ts @@ -223,30 +223,14 @@ export async function initCommand(args?: string[]): Promise { publicUrl, }); - const configContent = JSON.stringify( - { - adminUrl, - forgejoBaseUrl, - forgejoBotUsername: answers.forgejoBotUsername, - publicUrl, - }, - null, - 2, - ); - const outDir = process.cwd(); const envPath = path.join(outDir, ".env"); - const configPath = path.join(outDir, "myst.config.json"); - await preflightWriteTargets([envPath, configPath]); + await preflightWriteTargets([envPath]); await writePrivateFile(envPath, envContent); - await writePrivateFile(configPath, configContent); s.stop("Config files generated"); - p.note( - [c.green(".env"), c.green("myst.config.json")].join("\n"), - c.yellow("Files written to current directory"), - ); + p.note(c.green(".env"), c.yellow("File written to current directory")); p.note( [ `${c.bold("Public viewer URL:")} ${c.cyan(publicUrl)}`,