seo-geo-optimizer 1.0.0

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 ADDED
@@ -0,0 +1,301 @@
1
+ #!/usr/bin/env node
2
+
3
+ /**
4
+ * SEO & GEO Optimizer — Universal AI IDE Skill Installer
5
+ * Author: Aryan Panwar — https://github.com/Aryanpanwar10005
6
+ *
7
+ * Usage:
8
+ * npx seo-geo-optimizer → auto-detects your IDE and installs
9
+ * npx seo-geo-optimizer --cursor → force install for Cursor
10
+ * npx seo-geo-optimizer --windsurf → force install for Windsurf
11
+ * npx seo-geo-optimizer --copilot → force install for GitHub Copilot
12
+ * npx seo-geo-optimizer --lovable → force install for Lovable
13
+ * npx seo-geo-optimizer --bolt → force install for Bolt
14
+ * npx seo-geo-optimizer --all → install for all supported IDEs
15
+ * npx seo-geo-optimizer --help → show help
16
+ */
17
+
18
+ const fs = require('fs');
19
+ const path = require('path');
20
+ const https = require('https');
21
+
22
+ const REPO_RAW = 'https://raw.githubusercontent.com/Aryanpanwar10005/seo-geo-optimizer/main/skill/SEO_GEO_SKILL.md';
23
+ const SKILL_FILENAME = 'SEO_GEO_SKILL.md';
24
+ const VERSION = '1.0.0';
25
+
26
+ const IDE_TARGETS = {
27
+ cursor: {
28
+ name: 'Cursor',
29
+ detection: ['.cursor', '.cursorrules'],
30
+ primary: '.cursor/rules/seo-geo-optimizer.mdc',
31
+ fallback: '.cursorrules',
32
+ note: 'Activates automatically in all Cursor AI and Composer sessions.'
33
+ },
34
+ windsurf: {
35
+ name: 'Windsurf',
36
+ detection: ['.windsurf', '.windsurfrules'],
37
+ primary: '.windsurf/rules/seo-geo-optimizer.md',
38
+ fallback: '.windsurfrules',
39
+ note: 'Activates automatically in all Cascade AI sessions.'
40
+ },
41
+ copilot: {
42
+ name: 'GitHub Copilot',
43
+ detection: ['.github/copilot-instructions.md', '.github'],
44
+ primary: '.github/copilot-instructions.md',
45
+ fallback: null,
46
+ note: 'Activates in all Copilot Chat sessions in VS Code.'
47
+ },
48
+ lovable: {
49
+ name: 'Lovable',
50
+ detection: ['lovable.config.js', 'lovable.config.ts'],
51
+ primary: '.ai/seo-geo-optimizer.md',
52
+ fallback: null,
53
+ note: 'Paste the file contents into your Lovable project system prompt to activate.'
54
+ },
55
+ bolt: {
56
+ name: 'Bolt',
57
+ detection: ['bolt.config.js', '.bolt'],
58
+ primary: '.bolt/prompt',
59
+ fallback: null,
60
+ note: 'Appended to your Bolt project prompt file.'
61
+ },
62
+ generic: {
63
+ name: 'Generic / Any AI IDE',
64
+ detection: [],
65
+ primary: 'seo-geo-optimizer.md',
66
+ fallback: null,
67
+ note: 'Paste the file contents into your AI assistant system prompt or context window.'
68
+ }
69
+ };
70
+
71
+ const c = {
72
+ reset: '\x1b[0m',
73
+ bold: '\x1b[1m',
74
+ green: '\x1b[32m',
75
+ blue: '\x1b[34m',
76
+ yellow: '\x1b[33m',
77
+ cyan: '\x1b[36m',
78
+ red: '\x1b[31m',
79
+ gray: '\x1b[90m',
80
+ white: '\x1b[97m',
81
+ };
82
+
83
+ const log = {
84
+ info: (msg) => console.log(`${c.blue}ℹ${c.reset} ${msg}`),
85
+ success: (msg) => console.log(`${c.green}✔${c.reset} ${msg}`),
86
+ warn: (msg) => console.log(`${c.yellow}⚠${c.reset} ${msg}`),
87
+ error: (msg) => console.log(`${c.red}✖${c.reset} ${msg}`),
88
+ step: (msg) => console.log(`${c.cyan}→${c.reset} ${msg}`),
89
+ title: (msg) => console.log(`\n${c.bold}${c.white}${msg}${c.reset}`),
90
+ divider: () => console.log(`${c.gray}${'─'.repeat(58)}${c.reset}`),
91
+ blank: () => console.log(''),
92
+ };
93
+
94
+ function showBanner() {
95
+ console.log(`
96
+ ${c.bold}${c.cyan} ╔════════════════════════════════════════════════════════╗
97
+ ║ 🔍 SEO & GEO OPTIMIZER v${VERSION} ║
98
+ ║ Universal AI Skill · Google · Bing · AI Overviews ║
99
+ ║ github.com/Aryanpanwar10005/seo-geo-optimizer ║
100
+ ╚════════════════════════════════════════════════════════╝${c.reset}
101
+ `);
102
+ }
103
+
104
+ function showHelp() {
105
+ showBanner();
106
+ console.log(`${c.bold}USAGE${c.reset}
107
+ npx seo-geo-optimizer [option]
108
+
109
+ ${c.bold}OPTIONS${c.reset}
110
+ ${c.cyan}(none)${c.reset} Auto-detect your IDE and install
111
+ ${c.cyan}--cursor${c.reset} Install for Cursor
112
+ ${c.cyan}--windsurf${c.reset} Install for Windsurf
113
+ ${c.cyan}--copilot${c.reset} Install for GitHub Copilot (VS Code)
114
+ ${c.cyan}--lovable${c.reset} Install for Lovable
115
+ ${c.cyan}--bolt${c.reset} Install for Bolt
116
+ ${c.cyan}--all${c.reset} Install for all supported IDEs at once
117
+ ${c.cyan}--help${c.reset} Show this help
118
+
119
+ ${c.bold}MANUAL INSTALL${c.reset}
120
+ Copy the raw skill file from:
121
+ ${c.gray}https://raw.githubusercontent.com/Aryanpanwar10005/seo-geo-optimizer/main/skill/SEO_GEO_SKILL.md${c.reset}
122
+ and paste it into your IDE rules or system prompt field.
123
+
124
+ ${c.bold}DOCS${c.reset}
125
+ ${c.gray}https://github.com/Aryanpanwar10005/seo-geo-optimizer${c.reset}
126
+ `);
127
+ }
128
+
129
+ function detectIDE(cwd) {
130
+ const detected = [];
131
+ for (const [key, ide] of Object.entries(IDE_TARGETS)) {
132
+ if (key === 'generic') continue;
133
+ for (const signal of ide.detection) {
134
+ if (fs.existsSync(path.join(cwd, signal))) {
135
+ detected.push(key);
136
+ break;
137
+ }
138
+ }
139
+ }
140
+ return detected;
141
+ }
142
+
143
+ function downloadSkill(url) {
144
+ return new Promise((resolve, reject) => {
145
+ const localSkill = path.join(__dirname, '..', 'skill', SKILL_FILENAME);
146
+ if (fs.existsSync(localSkill)) {
147
+ resolve(fs.readFileSync(localSkill, 'utf8'));
148
+ return;
149
+ }
150
+ https.get(url, (res) => {
151
+ if (res.statusCode === 301 || res.statusCode === 302) {
152
+ downloadSkill(res.headers.location).then(resolve).catch(reject);
153
+ return;
154
+ }
155
+ if (res.statusCode !== 200) {
156
+ reject(new Error(`HTTP ${res.statusCode} — could not fetch skill file from GitHub`));
157
+ return;
158
+ }
159
+ let data = '';
160
+ res.on('data', chunk => data += chunk);
161
+ res.on('end', () => resolve(data));
162
+ res.on('error', reject);
163
+ }).on('error', reject);
164
+ });
165
+ }
166
+
167
+ function installToTarget(ideKey, skillContent, cwd) {
168
+ const ide = IDE_TARGETS[ideKey];
169
+ const targetPath = path.join(cwd, ide.primary);
170
+ const targetDir = path.dirname(targetPath);
171
+ if (!fs.existsSync(targetDir)) {
172
+ fs.mkdirSync(targetDir, { recursive: true });
173
+ log.step(`Created directory: ${c.gray}${targetDir}${c.reset}`);
174
+ }
175
+ if (fs.existsSync(targetPath)) {
176
+ const backup = targetPath + '.backup';
177
+ fs.copyFileSync(targetPath, backup);
178
+ log.warn(`Existing file backed up → ${c.gray}${path.relative(cwd, backup)}${c.reset}`);
179
+ }
180
+ fs.writeFileSync(targetPath, skillContent, 'utf8');
181
+ log.success(`${c.bold}${ide.name}${c.reset} → ${c.green}${path.relative(cwd, targetPath)}${c.reset}`);
182
+ log.info(`${c.gray}${ide.note}${c.reset}`);
183
+ return targetPath;
184
+ }
185
+
186
+ async function main() {
187
+ const args = process.argv.slice(2);
188
+ const cwd = process.cwd();
189
+
190
+ if (args.includes('--help') || args.includes('-h')) {
191
+ showHelp();
192
+ process.exit(0);
193
+ }
194
+
195
+ showBanner();
196
+ log.divider();
197
+
198
+ let targets = [];
199
+
200
+ if (args.includes('--all')) {
201
+ targets = ['cursor', 'windsurf', 'copilot', 'lovable', 'bolt'];
202
+ log.title('Installing for ALL supported IDEs');
203
+ } else if (args.includes('--cursor')) {
204
+ targets = ['cursor'];
205
+ log.title('Installing for Cursor');
206
+ } else if (args.includes('--windsurf')) {
207
+ targets = ['windsurf'];
208
+ log.title('Installing for Windsurf');
209
+ } else if (args.includes('--copilot')) {
210
+ targets = ['copilot'];
211
+ log.title('Installing for GitHub Copilot');
212
+ } else if (args.includes('--lovable')) {
213
+ targets = ['lovable'];
214
+ log.title('Installing for Lovable');
215
+ } else if (args.includes('--bolt')) {
216
+ targets = ['bolt'];
217
+ log.title('Installing for Bolt');
218
+ } else {
219
+ log.title('Auto-detecting your IDE...');
220
+ targets = detectIDE(cwd);
221
+ if (targets.length > 0) {
222
+ log.success(`Detected: ${targets.map(t => IDE_TARGETS[t].name).join(', ')}`);
223
+ } else {
224
+ log.warn('No IDE config files detected in this directory.');
225
+ log.info('Defaulting to generic install → seo-geo-optimizer.md');
226
+ targets = ['generic'];
227
+ }
228
+ }
229
+
230
+ log.divider();
231
+ log.title('Downloading SEO & GEO skill file...');
232
+
233
+ let skillContent;
234
+ try {
235
+ skillContent = await downloadSkill(REPO_RAW);
236
+ log.success(`Skill file ready (${(skillContent.length / 1024).toFixed(1)} KB)`);
237
+ } catch (err) {
238
+ log.error(`Failed to download skill file: ${err.message}`);
239
+ log.blank();
240
+ log.info('Manual install — copy the raw skill file from:');
241
+ log.info(`${c.cyan}https://raw.githubusercontent.com/Aryanpanwar10005/seo-geo-optimizer/main/skill/SEO_GEO_SKILL.md${c.reset}`);
242
+ process.exit(1);
243
+ }
244
+
245
+ log.divider();
246
+ log.title('Installing...');
247
+ log.blank();
248
+
249
+ const installed = [];
250
+ const failed = [];
251
+
252
+ for (const ideKey of targets) {
253
+ try {
254
+ const filePath = installToTarget(ideKey, skillContent, cwd);
255
+ installed.push({ ide: IDE_TARGETS[ideKey].name, path: path.relative(cwd, filePath) });
256
+ log.blank();
257
+ } catch (err) {
258
+ log.error(`Failed to install for ${IDE_TARGETS[ideKey].name}: ${err.message}`);
259
+ failed.push(IDE_TARGETS[ideKey].name);
260
+ }
261
+ }
262
+
263
+ log.divider();
264
+
265
+ if (installed.length > 0) {
266
+ log.title('✅ Installation complete!');
267
+ log.blank();
268
+ console.log(`${c.bold}Files installed:${c.reset}`);
269
+ for (const item of installed) {
270
+ console.log(` ${c.green}${item.ide}${c.reset} → ${c.gray}${item.path}${c.reset}`);
271
+ }
272
+ log.blank();
273
+ }
274
+
275
+ if (failed.length > 0) {
276
+ log.title('⚠️ Some installs failed:');
277
+ for (const name of failed) {
278
+ console.log(` ${c.red}${name}${c.reset}`);
279
+ }
280
+ log.blank();
281
+ }
282
+
283
+ console.log(`${c.bold}Next step — tell your AI:${c.reset}`);
284
+ console.log(` ${c.yellow}"Read and activate the SEO & GEO Optimizer skill, then start the process."${c.reset}`);
285
+ log.blank();
286
+ console.log(`${c.gray}Your AI will then:${c.reset}`);
287
+ console.log(` ${c.gray}1. Read the full skill file and confirm${c.reset}`);
288
+ console.log(` ${c.gray}2. Ask all 40 intake questions${c.reset}`);
289
+ console.log(` ${c.gray}3. Run competitor analysis (3–5 real SEO competitors)${c.reset}`);
290
+ console.log(` ${c.gray}4. Build your Execution Plan Report — waits for approval${c.reset}`);
291
+ console.log(` ${c.gray}5. Execute phase by phase with your approval at every step${c.reset}`);
292
+ log.blank();
293
+ log.divider();
294
+ console.log(` ${c.gray}Docs: https://github.com/Aryanpanwar10005/seo-geo-optimizer${c.reset}`);
295
+ log.blank();
296
+ }
297
+
298
+ main().catch(err => {
299
+ log.error(`Unexpected error: ${err.message}`);
300
+ process.exit(1);
301
+ });
package/package.json ADDED
@@ -0,0 +1,62 @@
1
+ {
2
+ "name": "seo-geo-optimizer",
3
+ "version": "1.0.0",
4
+ "description": "Universal SEO & GEO skill for AI IDEs — Google, Bing, AI Overviews, Bing Copilot, ChatGPT, Perplexity. Works with Cursor, Windsurf, GitHub Copilot, Replit, Lovable, Bolt, and any AI assistant.",
5
+ "bin": {
6
+ "seo-geo-optimizer": "./bin/install.js"
7
+ },
8
+ "scripts": {
9
+ "start": "node bin/install.js"
10
+ },
11
+ "keywords": [
12
+ "seo",
13
+ "geo",
14
+ "generative-engine-optimization",
15
+ "cursor",
16
+ "windsurf",
17
+ "copilot",
18
+ "github-copilot",
19
+ "lovable",
20
+ "bolt",
21
+ "replit",
22
+ "ai-rules",
23
+ "cursor-rules",
24
+ "windsurfrules",
25
+ "schema",
26
+ "schema-markup",
27
+ "json-ld",
28
+ "meta-tags",
29
+ "core-web-vitals",
30
+ "google",
31
+ "bing",
32
+ "ai-overviews",
33
+ "structured-data",
34
+ "e-e-a-t",
35
+ "technical-seo",
36
+ "seo-skill",
37
+ "ai-skill"
38
+ ],
39
+ "author": {
40
+ "name": "Aryan Panwar",
41
+ "url": "https://github.com/Aryanpanwar10005"
42
+ },
43
+ "license": "MIT",
44
+ "repository": {
45
+ "type": "git",
46
+ "url": "https://github.com/Aryanpanwar10005/seo-geo-optimizer.git"
47
+ },
48
+ "bugs": {
49
+ "url": "https://github.com/Aryanpanwar10005/seo-geo-optimizer/issues"
50
+ },
51
+ "homepage": "https://github.com/Aryanpanwar10005/seo-geo-optimizer#readme",
52
+ "engines": {
53
+ "node": ">=16.0.0"
54
+ },
55
+ "files": [
56
+ "bin/",
57
+ "skill/",
58
+ "README.md",
59
+ "CONTRIBUTING.md",
60
+ "LICENSE"
61
+ ]
62
+ }