ai-forge-cli 0.2.3 → 0.3.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/index.js +1 -1
- package/dist/{init-UBPMMJ4L.js → init-OYJP5QCZ.js} +56 -23
- package/dist/templates/init/biome.json.hbs +8 -4
- package/package.json +1 -1
- package/templates/init/biome.json.hbs +8 -4
- package/dist/templates/init/postcss.config.js.hbs +0 -6
- package/dist/templates/init/tailwind.config.ts.hbs +0 -12
- package/templates/init/postcss.config.js.hbs +0 -6
- package/templates/init/tailwind.config.ts.hbs +0 -12
package/dist/index.js
CHANGED
|
@@ -19,7 +19,7 @@ var main = defineCommand({
|
|
|
19
19
|
}
|
|
20
20
|
},
|
|
21
21
|
subCommands: {
|
|
22
|
-
init: () => import("./init-
|
|
22
|
+
init: () => import("./init-OYJP5QCZ.js").then((m) => m.default),
|
|
23
23
|
"add:feature": () => import("./add-feature-JBVJHKHX.js").then((m) => m.default),
|
|
24
24
|
check: () => import("./check-B4VHLFHH.js").then((m) => m.default),
|
|
25
25
|
version: () => import("./version-VO3LHLDO.js").then((m) => m.default)
|
|
@@ -59,16 +59,24 @@ var init_default = defineCommand({
|
|
|
59
59
|
logger.blank();
|
|
60
60
|
logger.log(` ${pc.bold("Forge CLI")} - Creating project "${name}"`);
|
|
61
61
|
logger.blank();
|
|
62
|
-
logger.log(` ${pc.
|
|
62
|
+
logger.log(` ${pc.dim("\u2500".repeat(50))}`);
|
|
63
|
+
logger.log(` ${pc.cyan("Step 1/5:")} TanStack Start`);
|
|
64
|
+
logger.log(` ${pc.dim("\u2500".repeat(50))}`);
|
|
63
65
|
logger.blank();
|
|
64
66
|
try {
|
|
65
67
|
await runInteractive("pnpm", ["create", "@tanstack/start@latest", name]);
|
|
68
|
+
logger.blank();
|
|
69
|
+
logger.success("TanStack Start scaffolding complete");
|
|
66
70
|
} catch {
|
|
67
71
|
logger.error("TanStack Start scaffolding failed");
|
|
68
72
|
process.exit(1);
|
|
69
73
|
}
|
|
70
74
|
logger.blank();
|
|
71
|
-
|
|
75
|
+
logger.log(` ${pc.dim("\u2500".repeat(50))}`);
|
|
76
|
+
logger.log(` ${pc.cyan("Step 2/5:")} Forge Customizations`);
|
|
77
|
+
logger.log(` ${pc.dim("\u2500".repeat(50))}`);
|
|
78
|
+
logger.blank();
|
|
79
|
+
const step2 = logger.step("Adding customizations...");
|
|
72
80
|
try {
|
|
73
81
|
const pkgPath = join(projectDir, "package.json");
|
|
74
82
|
const pkg = JSON.parse(await readFile(pkgPath));
|
|
@@ -80,10 +88,9 @@ var init_default = defineCommand({
|
|
|
80
88
|
};
|
|
81
89
|
pkg.devDependencies = {
|
|
82
90
|
...pkg.devDependencies,
|
|
83
|
-
"@biomejs/biome": "^
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
tailwindcss: "^3.4.17"
|
|
91
|
+
"@biomejs/biome": "^2.3.11",
|
|
92
|
+
"@tailwindcss/vite": "^4.1.18",
|
|
93
|
+
tailwindcss: "^4.1.18"
|
|
87
94
|
};
|
|
88
95
|
pkg.scripts = {
|
|
89
96
|
...pkg.scripts,
|
|
@@ -107,8 +114,6 @@ var init_default = defineCommand({
|
|
|
107
114
|
const templateData = { name };
|
|
108
115
|
const forgeFiles = [
|
|
109
116
|
{ templatePath: "init/biome.json.hbs", destPath: join(projectDir, "biome.json") },
|
|
110
|
-
{ templatePath: "init/tailwind.config.ts.hbs", destPath: join(projectDir, "tailwind.config.ts") },
|
|
111
|
-
{ templatePath: "init/postcss.config.js.hbs", destPath: join(projectDir, "postcss.config.js") },
|
|
112
117
|
{ templatePath: "init/convex/schema.ts.hbs", destPath: join(projectDir, "convex/schema.ts") },
|
|
113
118
|
{ templatePath: "init/src/lib/cn.ts.hbs", destPath: join(projectDir, "src/lib/cn.ts") },
|
|
114
119
|
{ templatePath: "init/src/providers/index.tsx.hbs", destPath: join(projectDir, "src/providers/index.tsx") },
|
|
@@ -143,13 +148,24 @@ ${rootContent}`;
|
|
|
143
148
|
}
|
|
144
149
|
const stylesPath = join(projectDir, "src/styles.css");
|
|
145
150
|
const existingStyles = await fileExists(stylesPath) ? await readFile(stylesPath) : "";
|
|
146
|
-
if (!existingStyles.includes("@tailwind")) {
|
|
147
|
-
const
|
|
148
|
-
@tailwind components;
|
|
149
|
-
@tailwind utilities;
|
|
151
|
+
if (!existingStyles.includes("@import") && !existingStyles.includes("@tailwind")) {
|
|
152
|
+
const tailwindImport = `@import "tailwindcss";
|
|
150
153
|
|
|
151
154
|
`;
|
|
152
|
-
await writeFile(stylesPath,
|
|
155
|
+
await writeFile(stylesPath, tailwindImport + existingStyles);
|
|
156
|
+
}
|
|
157
|
+
const viteConfigPath = join(projectDir, "vite.config.ts");
|
|
158
|
+
if (await fileExists(viteConfigPath)) {
|
|
159
|
+
let viteConfig = await readFile(viteConfigPath);
|
|
160
|
+
if (!viteConfig.includes("@tailwindcss/vite")) {
|
|
161
|
+
viteConfig = `import tailwindcss from "@tailwindcss/vite";
|
|
162
|
+
${viteConfig}`;
|
|
163
|
+
viteConfig = viteConfig.replace(
|
|
164
|
+
/plugins:\s*\[/,
|
|
165
|
+
"plugins: [tailwindcss(), "
|
|
166
|
+
);
|
|
167
|
+
await writeFile(viteConfigPath, viteConfig);
|
|
168
|
+
}
|
|
153
169
|
}
|
|
154
170
|
const gitignorePath = join(projectDir, ".gitignore");
|
|
155
171
|
let gitignore = await fileExists(gitignorePath) ? await readFile(gitignorePath) : "";
|
|
@@ -162,43 +178,60 @@ ${item}`;
|
|
|
162
178
|
}
|
|
163
179
|
await writeFile(gitignorePath, gitignore.trim() + "\n");
|
|
164
180
|
await writeFile(join(projectDir, ".env.example"), "VITE_CONVEX_URL=\n");
|
|
165
|
-
step2.succeed(
|
|
181
|
+
step2.succeed("Forge customizations added");
|
|
166
182
|
} catch (err) {
|
|
167
|
-
step2.fail(
|
|
183
|
+
step2.fail("Failed to add customizations");
|
|
168
184
|
throw err;
|
|
169
185
|
}
|
|
170
186
|
logger.blank();
|
|
171
|
-
logger.log(` ${pc.
|
|
187
|
+
logger.log(` ${pc.dim("\u2500".repeat(50))}`);
|
|
188
|
+
logger.log(` ${pc.cyan("Step 3/5:")} Dependencies`);
|
|
189
|
+
logger.log(` ${pc.dim("\u2500".repeat(50))}`);
|
|
172
190
|
logger.blank();
|
|
173
191
|
try {
|
|
174
192
|
await runInteractive("pnpm", ["install"], projectDir);
|
|
193
|
+
logger.blank();
|
|
194
|
+
logger.success("Dependencies installed");
|
|
175
195
|
} catch {
|
|
176
196
|
logger.error("Failed to install dependencies");
|
|
177
197
|
process.exit(1);
|
|
178
198
|
}
|
|
179
199
|
logger.blank();
|
|
180
|
-
logger.log(` ${pc.
|
|
200
|
+
logger.log(` ${pc.dim("\u2500".repeat(50))}`);
|
|
201
|
+
logger.log(` ${pc.cyan("Step 4/5:")} Convex`);
|
|
202
|
+
logger.log(` ${pc.dim("\u2500".repeat(50))}`);
|
|
181
203
|
logger.blank();
|
|
182
204
|
try {
|
|
183
205
|
await runInteractive("npx", ["convex", "dev", "--once", "--configure=new"], projectDir);
|
|
206
|
+
logger.blank();
|
|
207
|
+
logger.success("Convex configured");
|
|
184
208
|
} catch {
|
|
185
|
-
logger.
|
|
209
|
+
logger.blank();
|
|
210
|
+
logger.warn("Convex setup skipped - run 'npx convex dev' later");
|
|
186
211
|
}
|
|
187
212
|
logger.blank();
|
|
188
|
-
logger.log(` ${pc.
|
|
213
|
+
logger.log(` ${pc.dim("\u2500".repeat(50))}`);
|
|
214
|
+
logger.log(` ${pc.cyan("Step 5/5:")} shadcn/ui`);
|
|
215
|
+
logger.log(` ${pc.dim("\u2500".repeat(50))}`);
|
|
189
216
|
logger.blank();
|
|
190
217
|
try {
|
|
191
218
|
await runInteractive("pnpm", ["dlx", "shadcn@latest", "init"], projectDir);
|
|
219
|
+
logger.blank();
|
|
220
|
+
logger.success("shadcn/ui configured");
|
|
192
221
|
} catch {
|
|
193
|
-
logger.
|
|
222
|
+
logger.blank();
|
|
223
|
+
logger.warn("shadcn setup skipped - run 'pnpm dlx shadcn init' later");
|
|
194
224
|
}
|
|
195
225
|
logger.blank();
|
|
226
|
+
logger.log(` ${pc.dim("\u2500".repeat(50))}`);
|
|
196
227
|
logger.log(` ${pc.green("\u2713")} ${pc.bold("Project created successfully!")}`);
|
|
228
|
+
logger.log(` ${pc.dim("\u2500".repeat(50))}`);
|
|
197
229
|
logger.blank();
|
|
198
|
-
logger.log(` ${pc.
|
|
199
|
-
logger.log(` ${pc.cyan("
|
|
230
|
+
logger.log(` ${pc.dim("Next steps:")}`);
|
|
231
|
+
logger.log(` ${pc.cyan("$")} cd ${name}`);
|
|
232
|
+
logger.log(` ${pc.cyan("$")} pnpm dev`);
|
|
200
233
|
logger.blank();
|
|
201
|
-
logger.log(` ${pc.dim("CLAUDE.md
|
|
234
|
+
logger.log(` ${pc.dim("CLAUDE.md configured for Claude Code.")}`);
|
|
202
235
|
logger.blank();
|
|
203
236
|
}
|
|
204
237
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"$schema": "https://biomejs.dev/schemas/
|
|
2
|
+
"$schema": "https://biomejs.dev/schemas/2.0.0/schema.json",
|
|
3
3
|
"vcs": {
|
|
4
4
|
"enabled": true,
|
|
5
5
|
"clientKind": "git",
|
|
@@ -7,15 +7,19 @@
|
|
|
7
7
|
},
|
|
8
8
|
"files": {
|
|
9
9
|
"ignoreUnknown": false,
|
|
10
|
-
"
|
|
10
|
+
"includes": ["**/*.ts", "**/*.tsx", "**/*.js", "**/*.jsx", "**/*.json"]
|
|
11
11
|
},
|
|
12
12
|
"formatter": {
|
|
13
13
|
"enabled": true,
|
|
14
14
|
"indentStyle": "space",
|
|
15
15
|
"indentWidth": 2
|
|
16
16
|
},
|
|
17
|
-
"
|
|
18
|
-
"
|
|
17
|
+
"assist": {
|
|
18
|
+
"actions": {
|
|
19
|
+
"source": {
|
|
20
|
+
"organizeImports": "on"
|
|
21
|
+
}
|
|
22
|
+
}
|
|
19
23
|
},
|
|
20
24
|
"linter": {
|
|
21
25
|
"enabled": true,
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"$schema": "https://biomejs.dev/schemas/
|
|
2
|
+
"$schema": "https://biomejs.dev/schemas/2.0.0/schema.json",
|
|
3
3
|
"vcs": {
|
|
4
4
|
"enabled": true,
|
|
5
5
|
"clientKind": "git",
|
|
@@ -7,15 +7,19 @@
|
|
|
7
7
|
},
|
|
8
8
|
"files": {
|
|
9
9
|
"ignoreUnknown": false,
|
|
10
|
-
"
|
|
10
|
+
"includes": ["**/*.ts", "**/*.tsx", "**/*.js", "**/*.jsx", "**/*.json"]
|
|
11
11
|
},
|
|
12
12
|
"formatter": {
|
|
13
13
|
"enabled": true,
|
|
14
14
|
"indentStyle": "space",
|
|
15
15
|
"indentWidth": 2
|
|
16
16
|
},
|
|
17
|
-
"
|
|
18
|
-
"
|
|
17
|
+
"assist": {
|
|
18
|
+
"actions": {
|
|
19
|
+
"source": {
|
|
20
|
+
"organizeImports": "on"
|
|
21
|
+
}
|
|
22
|
+
}
|
|
19
23
|
},
|
|
20
24
|
"linter": {
|
|
21
25
|
"enabled": true,
|