claude-code-starter 0.1.0 → 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.
package/README.md CHANGED
@@ -13,7 +13,7 @@ claude
13
13
  ## What It Does
14
14
 
15
15
  Sets up your project with:
16
- - `CLAUDE.md` - Instructions for Claude
16
+ - `.claude/CLAUDE.md` - Instructions for Claude
17
17
  - `.claude/commands/` - Slash commands (`/task`, `/status`, `/done`, `/analyze`)
18
18
  - `.claude/skills/` - Methodology guides (debugging, testing, patterns)
19
19
  - `.claude/state/task.md` - Task tracking
package/dist/cli.js CHANGED
@@ -19,74 +19,35 @@ function parseArgs(args) {
19
19
  };
20
20
  }
21
21
  function detectProject(projectDir) {
22
- const techStack = [];
23
- const frameworks = [];
24
- const directories = [];
25
- let isExisting = false;
26
- const checks = [
27
- ["package.json", "Node.js"],
28
- ["tsconfig.json", "TypeScript"],
29
- ["requirements.txt", "Python"],
30
- ["pyproject.toml", "Python"],
31
- ["Cargo.toml", "Rust"],
32
- ["go.mod", "Go"],
33
- ["pom.xml", "Java"],
34
- ["build.gradle", "Java/Kotlin"],
35
- ["Gemfile", "Ruby"]
36
- ];
37
- for (const [file, tech] of checks) {
38
- if (fs.existsSync(path.join(projectDir, file))) {
39
- if (!techStack.includes(tech)) techStack.push(tech);
40
- isExisting = true;
41
- }
42
- }
43
- const keyDirs = ["src", "lib", "app", "api", "components", "pages", "tests", "test"];
44
- for (const dir of keyDirs) {
45
- if (fs.existsSync(path.join(projectDir, dir))) {
46
- directories.push(dir);
47
- isExisting = true;
48
- }
49
- }
50
- const pkgPath = path.join(projectDir, "package.json");
51
- if (fs.existsSync(pkgPath)) {
52
- try {
53
- const pkg = fs.readFileSync(pkgPath, "utf-8");
54
- const frameworkChecks = [
55
- ['"react"', "React"],
56
- ['"next"', "Next.js"],
57
- ['"vue"', "Vue"],
58
- ['"express"', "Express"],
59
- ['"fastify"', "Fastify"],
60
- ['"@nestjs"', "NestJS"]
61
- ];
62
- for (const [pattern, name] of frameworkChecks) {
63
- if (pkg.includes(pattern)) frameworks.push(name);
22
+ let fileCount = 0;
23
+ const extensions = [".js", ".ts", ".tsx", ".py", ".go", ".rs", ".java", ".rb", ".c", ".cpp", ".cs", ".swift", ".kt"];
24
+ const ignorePatterns = [".git"];
25
+ const gitignorePath = path.join(projectDir, ".gitignore");
26
+ if (fs.existsSync(gitignorePath)) {
27
+ const lines = fs.readFileSync(gitignorePath, "utf-8").split("\n");
28
+ for (const line of lines) {
29
+ const trimmed = line.trim();
30
+ if (trimmed && !trimmed.startsWith("#")) {
31
+ ignorePatterns.push(trimmed.replace(/\/$/, ""));
64
32
  }
65
- } catch {
66
33
  }
67
34
  }
68
- let fileCount = 0;
69
- const extensions = [".js", ".ts", ".tsx", ".py", ".go", ".rs", ".java", ".rb"];
70
- const ignoreDirs = ["node_modules", ".git", "dist", "build", ".claude"];
35
+ function shouldIgnore(name) {
36
+ return ignorePatterns.some((pattern) => name === pattern || name.startsWith(pattern + "/"));
37
+ }
71
38
  function countFiles(dir, depth = 0) {
72
39
  if (depth > 3) return;
73
- try {
74
- const entries = fs.readdirSync(dir, { withFileTypes: true });
75
- for (const entry of entries) {
76
- if (ignoreDirs.includes(entry.name)) continue;
77
- const fullPath = path.join(dir, entry.name);
78
- if (entry.isDirectory()) {
79
- countFiles(fullPath, depth + 1);
80
- } else if (extensions.some((ext) => entry.name.endsWith(ext))) {
81
- fileCount++;
82
- isExisting = true;
83
- }
40
+ for (const entry of fs.readdirSync(dir, { withFileTypes: true })) {
41
+ if (shouldIgnore(entry.name)) continue;
42
+ if (entry.isDirectory()) {
43
+ countFiles(path.join(dir, entry.name), depth + 1);
44
+ } else if (extensions.some((ext) => entry.name.endsWith(ext))) {
45
+ fileCount++;
84
46
  }
85
- } catch {
86
47
  }
87
48
  }
88
49
  countFiles(projectDir);
89
- return { isExisting, techStack, frameworks, directories, fileCount };
50
+ return { isExisting: fileCount > 0, fileCount };
90
51
  }
91
52
  function copyDir(src, dest) {
92
53
  fs.mkdirSync(dest, { recursive: true });
@@ -127,7 +88,7 @@ ${pc.bold("USAGE")}
127
88
  ${pc.bold("OPTIONS")}
128
89
  -h, --help Show this help message
129
90
  -v, --version Show version number
130
- -f, --force Force overwrite of CLAUDE.md and settings.json
91
+ -f, --force Force overwrite of .claude/CLAUDE.md and settings.json
131
92
 
132
93
  ${pc.bold("MORE INFO")}
133
94
  https://github.com/cassmtnr/claude-code-starter
@@ -162,13 +123,13 @@ async function main() {
162
123
  console.log(pc.blue("Setting up framework files..."));
163
124
  const claudeMdResult = copyFile(
164
125
  path.join(TEMPLATES_DIR, "CLAUDE.md"),
165
- path.join(projectDir, "CLAUDE.md"),
126
+ path.join(projectDir, ".claude", "CLAUDE.md"),
166
127
  args.force
167
128
  );
168
129
  if (claudeMdResult === "skipped") {
169
- console.log(" CLAUDE.md exists (use --force to overwrite)");
130
+ console.log(" .claude/CLAUDE.md exists (use --force to overwrite)");
170
131
  } else {
171
- console.log(` ${claudeMdResult === "updated" ? "Updated" : "Created"} CLAUDE.md`);
132
+ console.log(` ${claudeMdResult === "updated" ? "Updated" : "Created"} .claude/CLAUDE.md`);
172
133
  }
173
134
  const settingsResult = copyFile(
174
135
  path.join(TEMPLATES_DIR, "settings.json"),
@@ -188,20 +149,7 @@ async function main() {
188
149
  console.log();
189
150
  const project = detectProject(projectDir);
190
151
  if (project.isExisting) {
191
- console.log(pc.green("Detected existing project"));
192
- if (project.techStack.length > 0) {
193
- console.log(`Tech stack: ${pc.cyan(project.techStack.join(" "))}`);
194
- }
195
- console.log();
196
- console.log(pc.blue("Analyzing codebase..."));
197
- console.log();
198
- console.log(` Files: ${project.fileCount} source files`);
199
- if (project.directories.length > 0) {
200
- console.log(` Directories: ${project.directories.map((d) => d + "/").join(" ")}`);
201
- }
202
- if (project.frameworks.length > 0) {
203
- console.log(` Frameworks: ${project.frameworks.join(" ")}`);
204
- }
152
+ console.log(pc.green(`Existing project \xB7 ${project.fileCount} files`));
205
153
  console.log();
206
154
  const taskPath = path.join(projectDir, ".claude", "state", "task.md");
207
155
  if (!fs.existsSync(taskPath)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-code-starter",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "A lightweight starter kit for AI-assisted development with Claude Code",
5
5
  "keywords": [
6
6
  "claude",
@@ -27,23 +27,22 @@
27
27
  "templates"
28
28
  ],
29
29
  "scripts": {
30
- "build": "tsup",
31
- "dev": "tsup --watch",
32
- "start": "node dist/cli.js",
33
- "test": "vitest run",
34
- "test:watch": "vitest",
35
- "typecheck": "tsc --noEmit"
30
+ "build": "bun run tsup",
31
+ "dev": "bun run tsup --watch",
32
+ "start": "bun dist/cli.js",
33
+ "test": "bun test",
34
+ "typecheck": "bun run tsc --noEmit",
35
+ "prepublishOnly": "bun run build && bun run test"
36
36
  },
37
37
  "dependencies": {
38
38
  "picocolors": "^1.1.1",
39
39
  "prompts": "^2.4.2"
40
40
  },
41
41
  "devDependencies": {
42
- "@types/node": "^22.10.0",
42
+ "@types/bun": "latest",
43
43
  "@types/prompts": "^2.4.9",
44
44
  "tsup": "^8.3.5",
45
- "typescript": "^5.7.2",
46
- "vitest": "^4.0.17"
45
+ "typescript": "^5.7.2"
47
46
  },
48
47
  "engines": {
49
48
  "node": ">=18.0.0"
@@ -1,5 +1,5 @@
1
1
  {
2
- "$schema": "https://claude.ai/schemas/claude-code-settings.json",
2
+ "$schema": "https://json.schemastore.org/claude-code-settings.json",
3
3
  "permissions": {
4
4
  "allow": [
5
5
  "Read(**)",