cskit-cli 1.0.41 → 1.0.44
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/commands/init.js +33 -0
package/package.json
CHANGED
package/src/commands/init.js
CHANGED
|
@@ -609,6 +609,16 @@ async function initCommand(options) {
|
|
|
609
609
|
|
|
610
610
|
timeline.complete(5, `${applied} files`);
|
|
611
611
|
|
|
612
|
+
// Create .env from .env.example if not exists
|
|
613
|
+
const envPath = path.join(projectDir, '.claude', '.env');
|
|
614
|
+
const envExamplePath = path.join(projectDir, '.claude', '.env.example');
|
|
615
|
+
let envCreated = false;
|
|
616
|
+
|
|
617
|
+
if (!fs.existsSync(envPath) && fs.existsSync(envExamplePath)) {
|
|
618
|
+
fs.copyFileSync(envExamplePath, envPath);
|
|
619
|
+
envCreated = true;
|
|
620
|
+
}
|
|
621
|
+
|
|
612
622
|
// Step 7: Check dependencies
|
|
613
623
|
timeline.start(6);
|
|
614
624
|
|
|
@@ -624,6 +634,14 @@ async function initCommand(options) {
|
|
|
624
634
|
try { fs.rmSync(tempDir, { recursive: true, force: true }); } catch {}
|
|
625
635
|
const ver = selectedVersion.replace(/^v/, '');
|
|
626
636
|
console.log(chalk.green(`\n ✓ CSK v${ver} ${isUpdate ? 'updated' : 'installed'} successfully!\n`));
|
|
637
|
+
|
|
638
|
+
if (envCreated) {
|
|
639
|
+
console.log(chalk.yellow(' ⚠ Configuration needed:\n'));
|
|
640
|
+
console.log(chalk.dim(' Edit .claude/.env and set:'));
|
|
641
|
+
console.log(` ${chalk.white('CSK_OUTPUT_DIR')} - Output folder for reports`);
|
|
642
|
+
console.log(` ${chalk.white('GEMINI_API_KEY')} - For AI features (optional)\n`);
|
|
643
|
+
}
|
|
644
|
+
|
|
627
645
|
console.log(chalk.cyan(' Quick Start\n'));
|
|
628
646
|
console.log(chalk.dim(' 1. Open Claude Code:'));
|
|
629
647
|
console.log(` ${chalk.white('claude')}\n`);
|
|
@@ -701,6 +719,13 @@ async function initCommand(options) {
|
|
|
701
719
|
const ver = selectedVersion.replace(/^v/, '');
|
|
702
720
|
console.log(chalk.green(`\n ✓ CSK v${ver} ${isUpdate ? 'updated' : 'installed'} successfully!\n`));
|
|
703
721
|
console.log(chalk.dim(' Note: Python dependencies not installed.\n'));
|
|
722
|
+
|
|
723
|
+
if (envCreated) {
|
|
724
|
+
console.log(chalk.yellow(' ⚠ Configuration needed:\n'));
|
|
725
|
+
console.log(chalk.dim(' Edit .claude/.env and set:'));
|
|
726
|
+
console.log(` ${chalk.white('CSK_OUTPUT_DIR')} - Output folder for reports`);
|
|
727
|
+
console.log(` ${chalk.white('GEMINI_API_KEY')} - For AI features (optional)\n`);
|
|
728
|
+
}
|
|
704
729
|
return;
|
|
705
730
|
}
|
|
706
731
|
|
|
@@ -758,6 +783,14 @@ async function initCommand(options) {
|
|
|
758
783
|
const ver = selectedVersion.replace(/^v/, '');
|
|
759
784
|
console.log(chalk.green(`\n ✓ CSK v${ver} ${isUpdate ? 'updated' : 'installed'} successfully!\n`));
|
|
760
785
|
|
|
786
|
+
// Show .env reminder if created
|
|
787
|
+
if (envCreated) {
|
|
788
|
+
console.log(chalk.yellow(' ⚠ Configuration needed:\n'));
|
|
789
|
+
console.log(chalk.dim(' Edit .claude/.env and set:'));
|
|
790
|
+
console.log(` ${chalk.white('CSK_OUTPUT_DIR')} - Output folder for reports`);
|
|
791
|
+
console.log(` ${chalk.white('GEMINI_API_KEY')} - For AI features (optional)\n`);
|
|
792
|
+
}
|
|
793
|
+
|
|
761
794
|
console.log(chalk.cyan(' Quick Start\n'));
|
|
762
795
|
console.log(chalk.dim(' 1. Open Claude Code:'));
|
|
763
796
|
console.log(` ${chalk.white('claude')}\n`);
|