chore: add dev:setup script to generate .env and missing secrets (#7555)

Co-authored-by: pandeymangg <anshuman.pandey9999@gmail.com>
This commit is contained in:
Matti Nannt
2026-03-24 09:26:32 +01:00
committed by GitHub
parent 6da4c6f352
commit 2b49dbecd3
7 changed files with 185 additions and 62 deletions
@@ -32,21 +32,13 @@ icon: "github"
pnpm install
```
4. **Create a `.env` file from the template:**
4. **Create a development `.env` file and generate the required secrets:**
```bash
cp .env.example .env
pnpm dev:setup
```
5. **Generate & set the required secrets:**
```bash
sed -i '/^ENCRYPTION_KEY=/c\ENCRYPTION_KEY='$(openssl rand -hex 32) .env
sed -i '/^NEXTAUTH_SECRET=/c\NEXTAUTH_SECRET='$(openssl rand -hex 32) .env
sed -i '/^CRON_SECRET=/c\CRON_SECRET='$(openssl rand -hex 32) .env
```
6. **Generate the Next.js AGENTS.md file (optional, for AI-assisted development):**
5. **Generate the Next.js AGENTS.md file (optional, for AI-assisted development):**
This step generates an `AGENTS.md` file at the repository root that provides Next.js documentation context for AI coding assistants (e.g. Cursor, GitHub Copilot). It runs `npx @next/codemod agents-md` under the hood. Re-run it whenever you upgrade Next.js.
@@ -54,7 +46,7 @@ icon: "github"
pnpm agents:update
```
7. **Launch the development setup:**
6. **Launch the development setup:**
```bash
pnpm go
```