@haposoft/cafekit 0.5.2 → 0.5.4
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/bin/install.js +16 -6
- package/package.json +1 -1
package/bin/install.js
CHANGED
|
@@ -836,12 +836,23 @@ async function promptGeminiAPIKey() {
|
|
|
836
836
|
|
|
837
837
|
function configureGeminiKey(apiKey) {
|
|
838
838
|
try {
|
|
839
|
-
|
|
839
|
+
const geminiDir = path.join(os.homedir(), '.gemini');
|
|
840
|
+
const envFile = path.join(geminiDir, '.env');
|
|
841
|
+
|
|
842
|
+
// Ensure .gemini directory exists
|
|
843
|
+
if (!fs.existsSync(geminiDir)) {
|
|
844
|
+
fs.mkdirSync(geminiDir, { recursive: true });
|
|
845
|
+
}
|
|
846
|
+
|
|
847
|
+
// Write API key to .env file
|
|
848
|
+
fs.writeFileSync(envFile, `GEMINI_API_KEY=${apiKey}\n`, { mode: 0o600 });
|
|
840
849
|
console.log(' ✓ Gemini API key configured successfully');
|
|
850
|
+
console.log(' ✓ Saved to ~/.gemini/.env');
|
|
841
851
|
return true;
|
|
842
852
|
} catch (error) {
|
|
843
853
|
console.log(' ✗ Failed to configure Gemini API key');
|
|
844
|
-
console.log(
|
|
854
|
+
console.log(` Error: ${error.message}`);
|
|
855
|
+
console.log(' You can manually set: export GEMINI_API_KEY="your-key"');
|
|
845
856
|
return false;
|
|
846
857
|
}
|
|
847
858
|
}
|
|
@@ -863,7 +874,6 @@ async function setupGeminiCLI() {
|
|
|
863
874
|
return;
|
|
864
875
|
}
|
|
865
876
|
|
|
866
|
-
console.log('\n⚙ Installing gemini-cli...');
|
|
867
877
|
const installed = installGeminiCLI();
|
|
868
878
|
|
|
869
879
|
if (installed) {
|
|
@@ -872,14 +882,14 @@ async function setupGeminiCLI() {
|
|
|
872
882
|
if (apiKey) {
|
|
873
883
|
configureGeminiKey(apiKey);
|
|
874
884
|
} else {
|
|
875
|
-
console.log('\n
|
|
876
|
-
console.log('
|
|
885
|
+
console.log('\n ℹ Skipped API key configuration');
|
|
886
|
+
console.log(' Set later: export GEMINI_API_KEY="your-key"');
|
|
877
887
|
}
|
|
878
888
|
} else {
|
|
879
889
|
console.log('\n📝 Manual installation steps:');
|
|
880
890
|
console.log(' 1. npm install -g @google/gemini-cli');
|
|
881
891
|
console.log(' 2. Get API key: https://aistudio.google.com/apikey');
|
|
882
|
-
console.log(' 3.
|
|
892
|
+
console.log(' 3. export GEMINI_API_KEY="your-key"');
|
|
883
893
|
}
|
|
884
894
|
}
|
|
885
895
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@haposoft/cafekit",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.4",
|
|
4
4
|
"description": "Spec-Driven Development workflow for AI coding assistants. Supports Claude Code and Antigravity with spec-first workflows plus Claude Code hapo: skills.",
|
|
5
5
|
"author": "Haposoft <nghialt@haposoft.com>",
|
|
6
6
|
"license": "MIT",
|