claude-code-starter 0.12.1 → 0.13.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/dist/cli.js +43 -8
- package/package.json +2 -1
package/dist/cli.js
CHANGED
|
@@ -5,6 +5,7 @@ import { execSync, spawn } from "child_process";
|
|
|
5
5
|
import fs3 from "fs";
|
|
6
6
|
import path3 from "path";
|
|
7
7
|
import { fileURLToPath } from "url";
|
|
8
|
+
import ora from "ora";
|
|
8
9
|
import pc from "picocolors";
|
|
9
10
|
import prompts from "prompts";
|
|
10
11
|
|
|
@@ -1550,8 +1551,7 @@ async function promptNewProject(args) {
|
|
|
1550
1551
|
packageManager: pmResponse.packageManager || null,
|
|
1551
1552
|
testingFramework: testResponse.testingFramework || null,
|
|
1552
1553
|
linter: lintResponse.linter || null,
|
|
1553
|
-
formatter: lintResponse.linter || null,
|
|
1554
|
-
// Use same as linter for simplicity
|
|
1554
|
+
formatter: mapFormatter(lintResponse.linter || null),
|
|
1555
1555
|
projectType: typeResponse.projectType || "Other"
|
|
1556
1556
|
};
|
|
1557
1557
|
}
|
|
@@ -1667,6 +1667,20 @@ function getLinterFormatterChoices(lang) {
|
|
|
1667
1667
|
}
|
|
1668
1668
|
return [{ title: "None", value: null }];
|
|
1669
1669
|
}
|
|
1670
|
+
function mapFormatter(linter) {
|
|
1671
|
+
if (!linter) return null;
|
|
1672
|
+
const mapping = {
|
|
1673
|
+
eslint: "prettier",
|
|
1674
|
+
biome: "biome",
|
|
1675
|
+
ruff: "ruff",
|
|
1676
|
+
flake8: "black",
|
|
1677
|
+
pylint: "black",
|
|
1678
|
+
"golangci-lint": "gofmt",
|
|
1679
|
+
clippy: "rustfmt",
|
|
1680
|
+
rubocop: "rubocop"
|
|
1681
|
+
};
|
|
1682
|
+
return mapping[linter] ?? null;
|
|
1683
|
+
}
|
|
1670
1684
|
function createTaskFile(projectInfo, preferences) {
|
|
1671
1685
|
const taskPath = path3.join(projectInfo.rootDir, ".claude", "state", "task.md");
|
|
1672
1686
|
fs3.mkdirSync(path3.dirname(taskPath), { recursive: true });
|
|
@@ -1772,10 +1786,24 @@ function formatFramework(fw) {
|
|
|
1772
1786
|
sinatra: "Sinatra",
|
|
1773
1787
|
spring: "Spring",
|
|
1774
1788
|
quarkus: "Quarkus",
|
|
1789
|
+
// Swift/iOS
|
|
1790
|
+
swiftui: "SwiftUI",
|
|
1791
|
+
uikit: "UIKit",
|
|
1792
|
+
vapor: "Vapor",
|
|
1793
|
+
swiftdata: "SwiftData",
|
|
1794
|
+
combine: "Combine",
|
|
1795
|
+
// Android
|
|
1796
|
+
"jetpack-compose": "Jetpack Compose",
|
|
1797
|
+
"android-views": "Android Views",
|
|
1798
|
+
room: "Room",
|
|
1799
|
+
hilt: "Hilt",
|
|
1800
|
+
"ktor-android": "Ktor",
|
|
1801
|
+
// CSS/UI
|
|
1775
1802
|
tailwind: "Tailwind CSS",
|
|
1776
1803
|
shadcn: "shadcn/ui",
|
|
1777
1804
|
chakra: "Chakra UI",
|
|
1778
1805
|
mui: "Material UI",
|
|
1806
|
+
// Database/ORM
|
|
1779
1807
|
prisma: "Prisma",
|
|
1780
1808
|
drizzle: "Drizzle",
|
|
1781
1809
|
typeorm: "TypeORM",
|
|
@@ -1801,11 +1829,18 @@ function runClaudeAnalysis(projectDir, projectInfo) {
|
|
|
1801
1829
|
pc.gray("Claude will read your codebase and generate all .claude/ configuration files")
|
|
1802
1830
|
);
|
|
1803
1831
|
console.log();
|
|
1832
|
+
const spinner = ora({
|
|
1833
|
+
text: "Claude is analyzing your project...",
|
|
1834
|
+
spinner: {
|
|
1835
|
+
interval: 200,
|
|
1836
|
+
frames: ["\xB7", "\u2722", "\u2733", "\u2736", "\u273B", "\u273D", "\u273B", "\u2736", "\u2733", "\u2722"]
|
|
1837
|
+
},
|
|
1838
|
+
color: "cyan"
|
|
1839
|
+
}).start();
|
|
1804
1840
|
const child = spawn(
|
|
1805
1841
|
"claude",
|
|
1806
1842
|
[
|
|
1807
1843
|
"-p",
|
|
1808
|
-
"--dangerously-skip-permissions",
|
|
1809
1844
|
"--allowedTools",
|
|
1810
1845
|
"Read",
|
|
1811
1846
|
"--allowedTools",
|
|
@@ -1819,22 +1854,21 @@ function runClaudeAnalysis(projectDir, projectInfo) {
|
|
|
1819
1854
|
],
|
|
1820
1855
|
{
|
|
1821
1856
|
cwd: projectDir,
|
|
1822
|
-
stdio: ["pipe", "
|
|
1857
|
+
stdio: ["pipe", "pipe", "pipe"]
|
|
1823
1858
|
}
|
|
1824
1859
|
);
|
|
1825
1860
|
child.stdin.write(prompt);
|
|
1826
1861
|
child.stdin.end();
|
|
1827
1862
|
child.on("error", (err) => {
|
|
1828
|
-
|
|
1863
|
+
spinner.fail(`Failed to launch Claude CLI: ${err.message}`);
|
|
1829
1864
|
resolve(false);
|
|
1830
1865
|
});
|
|
1831
1866
|
child.on("close", (code) => {
|
|
1832
1867
|
if (code === 0) {
|
|
1833
|
-
|
|
1834
|
-
console.log(pc.green("Claude analysis complete!"));
|
|
1868
|
+
spinner.succeed("Claude analysis complete!");
|
|
1835
1869
|
resolve(true);
|
|
1836
1870
|
} else {
|
|
1837
|
-
|
|
1871
|
+
spinner.fail(`Claude exited with code ${code}`);
|
|
1838
1872
|
resolve(false);
|
|
1839
1873
|
}
|
|
1840
1874
|
});
|
|
@@ -1992,6 +2026,7 @@ export {
|
|
|
1992
2026
|
formatFramework,
|
|
1993
2027
|
formatLanguage,
|
|
1994
2028
|
getVersion,
|
|
2029
|
+
mapFormatter,
|
|
1995
2030
|
parseArgs,
|
|
1996
2031
|
promptNewProject,
|
|
1997
2032
|
runClaudeAnalysis,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claude-code-starter",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.0",
|
|
4
4
|
"description": "A lightweight starter kit for AI-assisted development with Claude Code",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"claude",
|
|
@@ -41,6 +41,7 @@
|
|
|
41
41
|
"prepublishOnly": "bun run build && bun run test"
|
|
42
42
|
},
|
|
43
43
|
"dependencies": {
|
|
44
|
+
"ora": "^9.3.0",
|
|
44
45
|
"picocolors": "^1.1.1",
|
|
45
46
|
"prompts": "^2.4.2"
|
|
46
47
|
},
|