diff --git a/bin/cli.js b/bin/cli.js index e570eef..93cc70c 100644 --- a/bin/cli.js +++ b/bin/cli.js @@ -127,9 +127,15 @@ export default nextConfig; execSync('npm install @zen/core', { stdio: 'inherit' }); done('@zen/core installed'); + const envExample = path.resolve(process.cwd(), 'node_modules/@zen/core/.env.example'); + const envDest = path.resolve(process.cwd(), '.env'); + if (fs.existsSync(envExample) && !fs.existsSync(envDest)) { + fs.copyFileSync(envExample, envDest); + done('Created .env from @zen/core template'); + } + console.log(`\n ${c.green}${c.bold}Project ready.${c.reset} Next steps:\n`); - console.log(` ${c.dim}1.${c.reset} Configure environment variables`); - console.log(` ${c.dim}https://git.hyko.cx/zen/core${c.reset}`); + console.log(` ${c.dim}1.${c.reset} Fill in the environment variables in ${c.cyan}.env${c.reset}`); console.log(` ${c.dim}2.${c.reset} Initialize the database`); console.log(` ${c.dim}npx zen-db init${c.reset}\n`);