claude-think 0.1.1 → 0.1.2

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.
@@ -16,7 +16,10 @@
16
16
  "Bash(git push:*)",
17
17
  "Bash(think init:*)",
18
18
  "Bash(git add:*)",
19
- "Bash(git commit -m \"$\\(cat <<''EOF''\nv0.1.1: Fix plugin registration\n\n- Use correct .claude-plugin/ directory structure\n- Auto-register plugin in Claude settings.json on sync\n\nCo-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>\nEOF\n\\)\")"
19
+ "Bash(git commit -m \"$\\(cat <<''EOF''\nv0.1.1: Fix plugin registration\n\n- Use correct .claude-plugin/ directory structure\n- Auto-register plugin in Claude settings.json on sync\n\nCo-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>\nEOF\n\\)\")",
20
+ "Bash(bun src/cli/index.ts setup:*)",
21
+ "Bash(printf:*)",
22
+ "Bash(npm publish:*)"
20
23
  ]
21
24
  }
22
25
  }
package/CHANGELOG.md CHANGED
@@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.1.2] - 2025-02-05
9
+
10
+ ### Added
11
+ - Setup wizard now asks about frontend framework, CSS framework, database, infrastructure, and testing preferences
12
+ - Generated tools.md and anti-patterns.md include tech choices with alternatives to avoid
13
+
8
14
  ## [0.1.1] - 2025-02-05
9
15
 
10
16
  ### Fixed
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-think",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "Personal context manager for Claude - manage your preferences, patterns, and memory",
5
5
  "author": "Amit Feldman",
6
6
  "license": "MIT",
@@ -11,6 +11,15 @@ interface SetupAnswers {
11
11
  style: "direct" | "conversational" | "detailed";
12
12
  packageManager: "bun" | "pnpm" | "npm" | "yarn";
13
13
  languages: string[];
14
+ backend: string;
15
+ frontend: string;
16
+ css: string;
17
+ database: string;
18
+ infrastructure: string;
19
+ monorepo: string;
20
+ testing: string[];
21
+ linting: string[];
22
+ validation: string[];
14
23
  editor: string;
15
24
  avoidAll: boolean;
16
25
  }
@@ -92,13 +101,173 @@ export async function setupCommand(): Promise<void> {
92
101
  ]);
93
102
  console.log();
94
103
 
104
+ // Bun-specific features
105
+ let bunFeatures: string[] = [];
106
+ if (packageManager === "bun") {
107
+ bunFeatures = await multiSelect("Bun features you use?", [
108
+ { key: "catalog", label: "Dependency catalog" },
109
+ { key: "workspaces", label: "Bun workspaces" },
110
+ { key: "macros", label: "Bun macros" },
111
+ { key: "shell", label: "Bun shell ($``)" },
112
+ { key: "sqlite", label: "bun:sqlite" },
113
+ { key: "test", label: "bun test" },
114
+ ]);
115
+ console.log();
116
+ }
117
+
95
118
  // Languages
96
119
  const languages = await multiSelect("Primary programming languages?", [
97
120
  { key: "TypeScript", label: "TypeScript" },
98
121
  { key: "JavaScript", label: "JavaScript" },
99
122
  { key: "Python", label: "Python" },
123
+ { key: "Ruby", label: "Ruby" },
100
124
  { key: "Rust", label: "Rust" },
101
125
  { key: "Go", label: "Go" },
126
+ { key: "Java", label: "Java" },
127
+ { key: "C#", label: "C#" },
128
+ { key: "PHP", label: "PHP" },
129
+ { key: "Elixir", label: "Elixir" },
130
+ ]);
131
+ console.log();
132
+
133
+ // Backend framework
134
+ const backend = await select("Backend framework?", [
135
+ { key: "none", label: "None / Custom" },
136
+ { key: "Rails", label: "Ruby on Rails" },
137
+ { key: "Django", label: "Django" },
138
+ { key: "FastAPI", label: "FastAPI" },
139
+ { key: "Express", label: "Express.js" },
140
+ { key: "Hono", label: "Hono" },
141
+ { key: "Phoenix", label: "Phoenix (Elixir)" },
142
+ { key: "Spring", label: "Spring Boot" },
143
+ { key: "ASP.NET", label: "ASP.NET Core" },
144
+ { key: "Laravel", label: "Laravel" },
145
+ ]);
146
+ console.log();
147
+
148
+ // Frontend framework
149
+ const frontend = await select("Frontend framework?", [
150
+ { key: "none", label: "None / Backend only" },
151
+ { key: "React", label: "React" },
152
+ { key: "Vue", label: "Vue.js" },
153
+ { key: "Svelte", label: "Svelte" },
154
+ { key: "Angular", label: "Angular" },
155
+ { key: "Solid", label: "SolidJS" },
156
+ { key: "HTMX", label: "HTMX" },
157
+ ]);
158
+ console.log();
159
+
160
+ // CSS/UI framework
161
+ const css = await select("CSS / UI framework?", [
162
+ { key: "none", label: "Plain CSS / None" },
163
+ { key: "Tailwind", label: "Tailwind CSS" },
164
+ { key: "Vuetify", label: "Vuetify" },
165
+ { key: "Bootstrap", label: "Bootstrap" },
166
+ { key: "Material UI", label: "Material UI" },
167
+ { key: "shadcn/ui", label: "shadcn/ui" },
168
+ { key: "CSS Modules", label: "CSS Modules" },
169
+ { key: "styled-components", label: "styled-components" },
170
+ ]);
171
+ console.log();
172
+
173
+ // Database
174
+ const database = await select("Primary database?", [
175
+ { key: "none", label: "None" },
176
+ { key: "PostgreSQL", label: "PostgreSQL" },
177
+ { key: "MySQL", label: "MySQL" },
178
+ { key: "MongoDB", label: "MongoDB" },
179
+ { key: "SQLite", label: "SQLite" },
180
+ { key: "Redis", label: "Redis" },
181
+ { key: "Supabase", label: "Supabase" },
182
+ { key: "Firebase", label: "Firebase" },
183
+ ]);
184
+ console.log();
185
+
186
+ // ORM / Database tools
187
+ const orm = await multiSelect("ORM / database tools?", [
188
+ { key: "Prisma", label: "Prisma" },
189
+ { key: "Drizzle", label: "Drizzle" },
190
+ { key: "TypeORM", label: "TypeORM" },
191
+ { key: "Kysely", label: "Kysely" },
192
+ { key: "Sequelize", label: "Sequelize" },
193
+ { key: "Mongoose", label: "Mongoose" },
194
+ { key: "ActiveRecord", label: "ActiveRecord (Rails)" },
195
+ { key: "SQLAlchemy", label: "SQLAlchemy" },
196
+ { key: "Django ORM", label: "Django ORM" },
197
+ ]);
198
+ console.log();
199
+
200
+ // Auth
201
+ const auth = await multiSelect("Authentication?", [
202
+ { key: "better-auth", label: "better-auth" },
203
+ { key: "Auth.js", label: "Auth.js (NextAuth)" },
204
+ { key: "Lucia", label: "Lucia" },
205
+ { key: "Clerk", label: "Clerk" },
206
+ { key: "Supabase Auth", label: "Supabase Auth" },
207
+ { key: "Firebase Auth", label: "Firebase Auth" },
208
+ { key: "Passport.js", label: "Passport.js" },
209
+ { key: "Devise", label: "Devise (Rails)" },
210
+ ]);
211
+ console.log();
212
+
213
+ // Infrastructure
214
+ const infrastructure = await select("Infrastructure / containerization?", [
215
+ { key: "none", label: "None" },
216
+ { key: "Docker Compose", label: "Docker + Compose" },
217
+ { key: "Docker", label: "Docker only" },
218
+ { key: "Kubernetes", label: "Kubernetes" },
219
+ { key: "Fly.io", label: "Fly.io" },
220
+ { key: "Vercel", label: "Vercel" },
221
+ { key: "Railway", label: "Railway" },
222
+ ]);
223
+ console.log();
224
+
225
+ // Monorepo
226
+ const monorepo = await select("Monorepo tooling?", [
227
+ { key: "none", label: "None / Single repo" },
228
+ { key: "Turborepo", label: "Turborepo" },
229
+ { key: "Bun workspaces", label: "Bun workspaces" },
230
+ { key: "Nx", label: "Nx" },
231
+ { key: "pnpm workspaces", label: "pnpm workspaces" },
232
+ { key: "Lerna", label: "Lerna" },
233
+ ]);
234
+ console.log();
235
+
236
+ // Testing
237
+ const testing = await multiSelect("Testing frameworks?", [
238
+ { key: "bun test", label: "bun test" },
239
+ { key: "Vitest", label: "Vitest" },
240
+ { key: "Jest", label: "Jest" },
241
+ { key: "RSpec", label: "RSpec" },
242
+ { key: "pytest", label: "pytest" },
243
+ { key: "Playwright", label: "Playwright (E2E)" },
244
+ { key: "Cypress", label: "Cypress (E2E)" },
245
+ ]);
246
+ console.log();
247
+
248
+ // Linting/Formatting
249
+ const linting = await multiSelect("Linting & formatting?", [
250
+ { key: "Biome", label: "Biome" },
251
+ { key: "ESLint", label: "ESLint" },
252
+ { key: "Prettier", label: "Prettier" },
253
+ { key: "oxlint", label: "oxlint" },
254
+ { key: "Rubocop", label: "Rubocop" },
255
+ { key: "Ruff", label: "Ruff (Python)" },
256
+ { key: "rustfmt", label: "rustfmt" },
257
+ { key: "gofmt", label: "gofmt" },
258
+ ]);
259
+ console.log();
260
+
261
+ // Validation/Schema
262
+ const validation = await multiSelect("Validation & schema libraries?", [
263
+ { key: "Zod", label: "Zod" },
264
+ { key: "Yup", label: "Yup" },
265
+ { key: "Valibot", label: "Valibot" },
266
+ { key: "ArkType", label: "ArkType" },
267
+ { key: "io-ts", label: "io-ts" },
268
+ { key: "TypeBox", label: "TypeBox" },
269
+ { key: "Pydantic", label: "Pydantic" },
270
+ { key: "Joi", label: "Joi" },
102
271
  ]);
103
272
  console.log();
104
273
 
@@ -160,26 +329,133 @@ ${styleDescriptions[style].map((s) => `- ${s}`).join("\n")}
160
329
  await writeFile(thinkPath(CONFIG.files.profile), profileContent);
161
330
 
162
331
  // Generate tools preferences
163
- const toolsContent = `# Tool Preferences
332
+ const toolsSections: string[] = ["# Tool Preferences"];
333
+
334
+ // Runtime & Package Manager
335
+ const pmAlternatives = ["npm", "pnpm", "yarn", "Node.js"].filter(
336
+ (p) => p.toLowerCase() !== packageManager.toLowerCase()
337
+ );
338
+ const pmSection = [`- Use ${packageManager === "bun" ? "Bun" : packageManager}${pmAlternatives.length ? ` (not ${pmAlternatives.join(", ")})` : ""}`];
339
+
340
+ if (bunFeatures.length > 0) {
341
+ if (bunFeatures.includes("catalog")) pmSection.push("- Use Bun dependency catalog for shared deps");
342
+ if (bunFeatures.includes("workspaces")) pmSection.push("- Use Bun workspaces for monorepos");
343
+ if (bunFeatures.includes("macros")) pmSection.push("- Use Bun macros for compile-time code");
344
+ if (bunFeatures.includes("shell")) pmSection.push("- Use Bun shell ($``) for shell commands");
345
+ if (bunFeatures.includes("sqlite")) pmSection.push("- Use bun:sqlite for embedded database");
346
+ if (bunFeatures.includes("test")) pmSection.push("- Use `bun test` for testing");
347
+ } else {
348
+ pmSection.push(`- Use \`${packageManager} test\` for testing`);
349
+ }
164
350
 
165
- ## Package Manager
166
- - Use ${packageManager}${packageManager !== "npm" ? " (not npm)" : ""}
351
+ toolsSections.push(`
352
+ ## Runtime & Package Manager
353
+ ${pmSection.join("\n")}`);
167
354
 
355
+ // Languages
356
+ toolsSections.push(`
168
357
  ## Languages
169
- ${languages.map((l) => `- ${l}`).join("\n")}
358
+ ${languages.map((l) => `- ${l}`).join("\n")}`);
359
+
360
+ // Backend
361
+ if (backend !== "none") {
362
+ toolsSections.push(`
363
+ ## Backend
364
+ - ${backend}`);
365
+ }
366
+
367
+ // Frontend
368
+ if (frontend !== "none") {
369
+ const frontendAlternatives = ["Next.js", "Vue", "Svelte", "Angular"].filter(
370
+ (f) => f.toLowerCase() !== frontend.toLowerCase()
371
+ );
372
+ toolsSections.push(`
373
+ ## Frontend
374
+ - ${frontend}${frontendAlternatives.length ? ` (not ${frontendAlternatives.slice(0, 2).join(", ")})` : ""}
375
+ - Prefer functional components with hooks`);
376
+
377
+ // CSS
378
+ if (css !== "none") {
379
+ toolsSections.push(`- ${css} for styling`);
380
+ }
381
+ }
382
+
383
+ // Database
384
+ if (database !== "none") {
385
+ const dbAlternatives = ["SQLite", "MySQL", "MongoDB", "PostgreSQL"].filter(
386
+ (d) => d.toLowerCase() !== database.toLowerCase()
387
+ );
388
+ toolsSections.push(`
389
+ ## Database
390
+ - ${database}${dbAlternatives.length ? ` (not ${dbAlternatives.slice(0, 3).join(", ")})` : ""}`);
391
+ }
392
+
393
+ // ORM
394
+ if (orm.length > 0) {
395
+ toolsSections.push(`
396
+ ## ORM / Database Tools
397
+ ${orm.map((o) => `- ${o}`).join("\n")}`);
398
+ }
399
+
400
+ // Auth
401
+ if (auth.length > 0) {
402
+ toolsSections.push(`
403
+ ## Authentication
404
+ ${auth.map((a) => `- ${a}`).join("\n")}`);
405
+ }
170
406
 
407
+ // Infrastructure
408
+ if (infrastructure !== "none") {
409
+ const infraAlternatives = infrastructure.includes("Kubernetes")
410
+ ? []
411
+ : ["Kubernetes"];
412
+ toolsSections.push(`
413
+ ## Infrastructure
414
+ - ${infrastructure} for containerization${infraAlternatives.length ? ` (not ${infraAlternatives.join(", ")})` : ""}
415
+ - Prefer simple Docker Compose for local dev`);
416
+ }
417
+
418
+ // Monorepo
419
+ if (monorepo !== "none") {
420
+ toolsSections.push(`
421
+ ## Monorepo
422
+ - ${monorepo}`);
423
+ }
424
+
425
+ // Testing
426
+ if (testing.length > 0) {
427
+ toolsSections.push(`
428
+ ## Testing
429
+ ${testing.map((t) => `- ${t}`).join("\n")}`);
430
+ }
431
+
432
+ // Linting & Formatting
433
+ if (linting.length > 0) {
434
+ toolsSections.push(`
435
+ ## Linting & Formatting
436
+ ${linting.map((l) => `- ${l}`).join("\n")}
437
+ - Use project's existing config when present`);
438
+ }
439
+
440
+ // Validation
441
+ if (validation.length > 0) {
442
+ toolsSections.push(`
443
+ ## Validation & Schema
444
+ ${validation.map((v) => `- ${v}`).join("\n")}`);
445
+ }
446
+
447
+ // Editor
448
+ toolsSections.push(`
171
449
  ## Editor
172
- - Primary: ${editor}
450
+ - Primary: ${editor}`);
173
451
 
174
- ## Runtime
175
- ${packageManager === "bun" ? "- Prefer Bun over Node.js when possible" : "- Node.js"}
176
- `;
452
+ const toolsContent = toolsSections.join("\n");
177
453
 
178
454
  await writeFile(thinkPath(CONFIG.files.tools), toolsContent);
179
455
 
180
456
  // Generate anti-patterns if selected
181
457
  if (avoidAnswer === "all") {
182
- const antiContent = `# Anti-Patterns to Avoid
458
+ const antiSections: string[] = [`# Anti-Patterns to Avoid
183
459
 
184
460
  ## Code Style
185
461
  - Don't add comments for obvious code
@@ -190,13 +466,37 @@ ${packageManager === "bun" ? "- Prefer Bun over Node.js when possible" : "- Node
190
466
  - Don't over-engineer solutions
191
467
  - Don't add features that weren't requested
192
468
  - Don't create unnecessary indirection
193
-
469
+ - Don't add "future-proofing" complexity`];
470
+
471
+ // Tech choices to avoid
472
+ const techAvoid: string[] = [];
473
+ if (packageManager === "bun") {
474
+ techAvoid.push("- Don't suggest npm/yarn/pnpm - use Bun");
475
+ }
476
+ if (frontend === "React") {
477
+ techAvoid.push("- Don't suggest Next.js - use plain React");
478
+ }
479
+ if (infrastructure === "Docker" || infrastructure === "Docker Compose") {
480
+ techAvoid.push("- Don't suggest Kubernetes - use Docker");
481
+ }
482
+ if (database === "PostgreSQL") {
483
+ techAvoid.push("- Don't suggest SQLite/MySQL/MongoDB - use PostgreSQL");
484
+ }
485
+
486
+ if (techAvoid.length > 0) {
487
+ antiSections.push(`
488
+ ## Tech Choices
489
+ ${techAvoid.join("\n")}`);
490
+ }
491
+
492
+ antiSections.push(`
194
493
  ## Communication
195
494
  - Don't explain obvious things
196
495
  - Don't repeat back what was just said
197
496
  - Don't pad responses with unnecessary context
198
- `;
199
- await writeFile(thinkPath(CONFIG.files.antiPatterns), antiContent);
497
+ `);
498
+
499
+ await writeFile(thinkPath(CONFIG.files.antiPatterns), antiSections.join("\n"));
200
500
  }
201
501
 
202
502
  console.log(chalk.green("Profile created!\n"));