create-assistant-ui 0.0.35 → 0.0.36

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 CHANGED
@@ -1,81 +1,69 @@
1
1
  #!/usr/bin/env node
2
-
3
- // src/index.ts
4
2
  import { Command } from "commander";
5
3
  import chalk from "chalk";
6
4
  import { spawn } from "cross-spawn";
7
- var create = new Command().name("create-assistant-ui").description("create a new assistant-ui project").argument("[project-directory]").usage(`${chalk.green("[project-directory]")} [options]`).option(
8
- "-t, --template <template>",
9
- `
5
+ // Create a standalone version of the create command instead of importing from CLI package
6
+ const create = new Command()
7
+ .name("create-assistant-ui")
8
+ .description("create a new assistant-ui project")
9
+ .argument("[project-directory]")
10
+ .usage(`${chalk.green("[project-directory]")} [options]`)
11
+ .option("-t, --template <template>", `
10
12
 
11
13
  The template to use for the project, e.g. default, langgraph
12
- `
13
- ).option(
14
- "--use-npm",
15
- `
14
+ `)
15
+ .option("--use-npm", `
16
16
 
17
17
  Explicitly tell the CLI to bootstrap the application using npm
18
- `
19
- ).option(
20
- "--use-pnpm",
21
- `
18
+ `)
19
+ .option("--use-pnpm", `
22
20
 
23
21
  Explicitly tell the CLI to bootstrap the application using pnpm
24
- `
25
- ).option(
26
- "--use-yarn",
27
- `
22
+ `)
23
+ .option("--use-yarn", `
28
24
 
29
25
  Explicitly tell the CLI to bootstrap the application using Yarn
30
- `
31
- ).option(
32
- "--use-bun",
33
- `
26
+ `)
27
+ .option("--use-bun", `
34
28
 
35
29
  Explicitly tell the CLI to bootstrap the application using Bun
36
- `
37
- ).option(
38
- "--skip-install",
39
- `
30
+ `)
31
+ .option("--skip-install", `
40
32
 
41
33
  Explicitly tell the CLI to skip installing packages
42
- `
43
- ).action((_, opts) => {
44
- const templates = {
45
- default: "https://github.com/assistant-ui/assistant-ui-starter",
46
- langgraph: "https://github.com/assistant-ui/assistant-ui-starter-langgraph"
47
- };
48
- const templateUrl = templates[opts.template ?? "default"];
49
- if (!templateUrl) {
50
- console.error(
51
- `Unknown template: ${opts.template}
52
- Available templates: ${Object.keys(templates).join(", ")}`
53
- );
54
- process.exit(1);
55
- }
56
- const filteredArgs = process.argv.slice(2).filter((arg, index, arr) => {
57
- return !(arg === "-t" || arg === "--template" || arr[index - 1] === "-t" || arr[index - 1] === "--template");
58
- });
59
- const child = spawn(
60
- "npx",
61
- [`create-next-app@latest`, ...filteredArgs, "-e", templateUrl],
62
- {
63
- stdio: "inherit"
64
- }
65
- );
66
- child.on("error", (error) => {
67
- console.error(`Error: ${error.message}`);
68
- });
69
- child.on("close", (code) => {
70
- if (code !== 0) {
71
- console.log(`create-next-app process exited with code ${code}`);
34
+ `)
35
+ .action((_, opts) => {
36
+ const templates = {
37
+ default: "https://github.com/assistant-ui/assistant-ui-starter",
38
+ langgraph: "https://github.com/assistant-ui/assistant-ui-starter-langgraph",
39
+ };
40
+ const templateUrl = templates[opts.template ?? "default"];
41
+ if (!templateUrl) {
42
+ console.error(`Unknown template: ${opts.template}\nAvailable templates: ${Object.keys(templates).join(", ")}`);
43
+ process.exit(1);
72
44
  }
73
- });
45
+ const filteredArgs = process.argv.slice(2).filter((arg, index, arr) => {
46
+ return !(arg === "-t" ||
47
+ arg === "--template" ||
48
+ arr[index - 1] === "-t" ||
49
+ arr[index - 1] === "--template");
50
+ });
51
+ const child = spawn("npx", [`create-next-app@latest`, ...filteredArgs, "-e", templateUrl], {
52
+ stdio: "inherit",
53
+ });
54
+ child.on("error", (error) => {
55
+ console.error(`Error: ${error.message}`);
56
+ });
57
+ child.on("close", (code) => {
58
+ if (code !== 0) {
59
+ console.log(`create-next-app process exited with code ${code}`);
60
+ }
61
+ });
74
62
  });
75
63
  process.on("SIGINT", () => process.exit(0));
76
64
  process.on("SIGTERM", () => process.exit(0));
77
65
  function main() {
78
- create.parse();
66
+ create.parse();
79
67
  }
80
68
  main();
81
69
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"sourcesContent":["#!/usr/bin/env node\nimport { Command } from \"commander\";\nimport chalk from \"chalk\";\nimport { spawn } from \"cross-spawn\";\n\n// Create a standalone version of the create command instead of importing from CLI package\nconst create = new Command()\n .name(\"create-assistant-ui\")\n .description(\"create a new assistant-ui project\")\n .argument(\"[project-directory]\")\n .usage(`${chalk.green(\"[project-directory]\")} [options]`)\n .option(\n \"-t, --template <template>\",\n `\n\n The template to use for the project, e.g. default, langgraph\n`,\n )\n .option(\n \"--use-npm\",\n `\n\n Explicitly tell the CLI to bootstrap the application using npm\n`,\n )\n .option(\n \"--use-pnpm\",\n `\n\n Explicitly tell the CLI to bootstrap the application using pnpm\n`,\n )\n .option(\n \"--use-yarn\",\n `\n\n Explicitly tell the CLI to bootstrap the application using Yarn\n`,\n )\n .option(\n \"--use-bun\",\n `\n\n Explicitly tell the CLI to bootstrap the application using Bun\n`,\n )\n .option(\n \"--skip-install\",\n `\n\n Explicitly tell the CLI to skip installing packages\n`,\n )\n .action((_, opts) => {\n const templates = {\n default: \"https://github.com/assistant-ui/assistant-ui-starter\",\n langgraph:\n \"https://github.com/assistant-ui/assistant-ui-starter-langgraph\",\n };\n\n const templateUrl =\n templates[(opts.template as keyof typeof templates) ?? \"default\"];\n if (!templateUrl) {\n console.error(\n `Unknown template: ${opts.template}\\nAvailable templates: ${Object.keys(templates).join(\", \")}`,\n );\n process.exit(1);\n }\n\n const filteredArgs = process.argv.slice(2).filter((arg, index, arr) => {\n return !(\n arg === \"-t\" ||\n arg === \"--template\" ||\n arr[index - 1] === \"-t\" ||\n arr[index - 1] === \"--template\"\n );\n });\n\n const child = spawn(\n \"npx\",\n [`create-next-app@latest`, ...filteredArgs, \"-e\", templateUrl],\n {\n stdio: \"inherit\",\n },\n );\n\n child.on(\"error\", (error) => {\n console.error(`Error: ${error.message}`);\n });\n\n child.on(\"close\", (code) => {\n if (code !== 0) {\n console.log(`create-next-app process exited with code ${code}`);\n }\n });\n });\n\nprocess.on(\"SIGINT\", () => process.exit(0));\nprocess.on(\"SIGTERM\", () => process.exit(0));\n\nfunction main() {\n create.parse();\n}\n\nmain();\n"],"mappings":";;;AACA,SAAS,eAAe;AACxB,OAAO,WAAW;AAClB,SAAS,aAAa;AAGtB,IAAM,SAAS,IAAI,QAAQ,EACxB,KAAK,qBAAqB,EAC1B,YAAY,mCAAmC,EAC/C,SAAS,qBAAqB,EAC9B,MAAM,GAAG,MAAM,MAAM,qBAAqB,CAAC,YAAY,EACvD;AAAA,EACC;AAAA,EACA;AAAA;AAAA;AAAA;AAIF,EACC;AAAA,EACC;AAAA,EACA;AAAA;AAAA;AAAA;AAIF,EACC;AAAA,EACC;AAAA,EACA;AAAA;AAAA;AAAA;AAIF,EACC;AAAA,EACC;AAAA,EACA;AAAA;AAAA;AAAA;AAIF,EACC;AAAA,EACC;AAAA,EACA;AAAA;AAAA;AAAA;AAIF,EACC;AAAA,EACC;AAAA,EACA;AAAA;AAAA;AAAA;AAIF,EACC,OAAO,CAAC,GAAG,SAAS;AACnB,QAAM,YAAY;AAAA,IAChB,SAAS;AAAA,IACT,WACE;AAAA,EACJ;AAEA,QAAM,cACJ,UAAW,KAAK,YAAuC,SAAS;AAClE,MAAI,CAAC,aAAa;AAChB,YAAQ;AAAA,MACN,qBAAqB,KAAK,QAAQ;AAAA,uBAA0B,OAAO,KAAK,SAAS,EAAE,KAAK,IAAI,CAAC;AAAA,IAC/F;AACA,YAAQ,KAAK,CAAC;AAAA,EAChB;AAEA,QAAM,eAAe,QAAQ,KAAK,MAAM,CAAC,EAAE,OAAO,CAAC,KAAK,OAAO,QAAQ;AACrE,WAAO,EACL,QAAQ,QACR,QAAQ,gBACR,IAAI,QAAQ,CAAC,MAAM,QACnB,IAAI,QAAQ,CAAC,MAAM;AAAA,EAEvB,CAAC;AAED,QAAM,QAAQ;AAAA,IACZ;AAAA,IACA,CAAC,0BAA0B,GAAG,cAAc,MAAM,WAAW;AAAA,IAC7D;AAAA,MACE,OAAO;AAA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AAC;AAEL,OAAO,CAAC,EAAE,CAAC,QAAQ,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;AAC5C,OAAO,CAAC,EAAE,CAAC,SAAS,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;AAE7C,SAAS,IAAI;IACX,MAAM,CAAC,KAAK,EAAE,CAAC;AACjB,CAAC;AAED,IAAI,EAAE,CAAC"}
package/package.json CHANGED
@@ -1,28 +1,38 @@
1
1
  {
2
2
  "name": "create-assistant-ui",
3
- "version": "0.0.35",
3
+ "version": "0.0.36",
4
+ "description": "Create assistant-ui apps with one command",
5
+ "keywords": [
6
+ "cli",
7
+ "create",
8
+ "scaffold",
9
+ "assistant-ui",
10
+ "ai",
11
+ "chat",
12
+ "react",
13
+ "nextjs"
14
+ ],
15
+ "author": "AgentbaseAI Inc.",
4
16
  "license": "MIT",
17
+ "type": "module",
18
+ "bin": {
19
+ "create-assistant-ui": "./dist/index.js"
20
+ },
21
+ "files": [
22
+ "dist",
23
+ "src",
24
+ "README.md"
25
+ ],
26
+ "sideEffects": false,
5
27
  "dependencies": {
6
28
  "chalk": "^5.6.2",
7
29
  "commander": "^14.0.2",
8
- "cosmiconfig": "^9.0.0",
9
- "cross-spawn": "^7.0.6",
10
- "tsconfig-paths": "^4.2.0",
11
- "zod": "^4.1.13"
30
+ "cross-spawn": "^7.0.6"
12
31
  },
13
- "type": "module",
14
32
  "devDependencies": {
15
33
  "@types/cross-spawn": "^6.0.6",
16
- "@types/node": "^25.0.0",
17
- "tsx": "^4.21.0",
18
34
  "@assistant-ui/x-buildutils": "0.0.1"
19
35
  },
20
- "files": [
21
- "dist",
22
- "src",
23
- "README.md"
24
- ],
25
- "bin": "./dist/index.js",
26
36
  "publishConfig": {
27
37
  "access": "public",
28
38
  "provenance": true
@@ -30,12 +40,13 @@
30
40
  "homepage": "https://www.assistant-ui.com/",
31
41
  "repository": {
32
42
  "type": "git",
33
- "url": "https://github.com/assistant-ui/assistant-ui/tree/main/packages/create-assistant-ui"
43
+ "url": "git+https://github.com/assistant-ui/assistant-ui.git",
44
+ "directory": "packages/create-assistant-ui"
34
45
  },
35
46
  "bugs": {
36
47
  "url": "https://github.com/assistant-ui/assistant-ui/issues"
37
48
  },
38
49
  "scripts": {
39
- "build": "tsx scripts/build.mts"
50
+ "build": "aui-build"
40
51
  }
41
52
  }