context-bank 0.0.3 → 0.0.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.
@@ -90,6 +90,27 @@ export async function initCommand(options) {
90
90
  const projectName = path.basename(targetDir);
91
91
  await fs.writeFile(readmePath, `${aiContextMarker}\n\n# ${projectName}\n`);
92
92
  }
93
+ // Gemini CLI Integration
94
+ const geminiDir = path.join(targetDir, ".gemini");
95
+ const geminiMemoryPath = path.join(geminiDir, "GEMINI.md");
96
+ const geminiRule = "- [Context Bank] Always check and follow the instructions in .ai/rules.md and .ai/active-context.md.";
97
+ if (!fs.existsSync(geminiDir)) {
98
+ await fs.ensureDir(geminiDir);
99
+ }
100
+ if (fs.existsSync(geminiMemoryPath)) {
101
+ const memoryContent = await fs.readFile(geminiMemoryPath, "utf-8");
102
+ if (!memoryContent.includes("[Context Bank]")) {
103
+ // Append to existing memory
104
+ const newContent = memoryContent.endsWith("\n")
105
+ ? `${memoryContent}${geminiRule}\n`
106
+ : `${memoryContent}\n${geminiRule}\n`;
107
+ await fs.writeFile(geminiMemoryPath, newContent);
108
+ }
109
+ }
110
+ else {
111
+ // Create new memory file
112
+ await fs.writeFile(geminiMemoryPath, `${geminiRule}\n`);
113
+ }
93
114
  s.stop(chalk.green("Context initialized!"));
94
115
  outro(chalk.green(`
95
116
  Context Bank setup complete! 🚀
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "context-bank",
3
- "version": "0.0.3",
3
+ "version": "0.0.4",
4
4
  "description": "A CLI tool to standardise AI context in projects.",
5
5
  "type": "module",
6
6
  "bin": {