Skip to content

Commit

Permalink
cli: npm create assistant-ui (#1181)
Browse files Browse the repository at this point in the history
  • Loading branch information
Yonom authored Nov 19, 2024
1 parent 4a55849 commit 948ff17
Show file tree
Hide file tree
Showing 5 changed files with 75 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/create-assistant-ui/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": ["next/core-web-vitals", "next/typescript"]
}
9 changes: 9 additions & 0 deletions packages/create-assistant-ui/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# `create-assistant-ui`

This package contains the command line interface for `create-assistant-ui`.

## Usage

```sh
npm create assistant-ui
```
41 changes: 41 additions & 0 deletions packages/create-assistant-ui/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"name": "create-assistant-ui",
"version": "0.0.1",
"license": "MIT",
"type": "module",
"dependencies": {
"chalk": "^5.3.0",
"commander": "^12.1.0",
"cosmiconfig": "^9.0.0",
"cross-spawn": "^7.0.5",
"shadcn-ui": "0.8.0",
"tsconfig-paths": "^4.2.0",
"zod": "^3.23.8"
},
"devDependencies": {
"@assistant-ui/tsconfig": "workspace:*",
"@types/cross-spawn": "^6.0.6",
"@types/node": "^22.9.0",
"tsup": "8.3.5"
},
"files": [
"dist",
"README.md"
],
"bin": "./dist/index.js",
"scripts": {
"build": "tsup src/index.ts --format esm --sourcemap --clean"
},
"publishConfig": {
"access": "public",
"provenance": true
},
"homepage": "https://assistant-ui.com/",
"repository": {
"type": "git",
"url": "git+https://github.com/Yonom/assistant-ui.git"
},
"bugs": {
"url": "https://github.com/Yonom/assistant-ui/issues"
}
}
11 changes: 11 additions & 0 deletions packages/create-assistant-ui/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env node
import { create } from "../../cli/src/commands/create";

process.on("SIGINT", () => process.exit(0));
process.on("SIGTERM", () => process.exit(0));

async function main() {
create.parse();
}

main();
11 changes: 11 additions & 0 deletions packages/create-assistant-ui/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"extends": "@assistant-ui/tsconfig/base.json",
"compilerOptions": {
"paths": {
"@/*": ["./*"],
"@assistant-ui/*": ["../../packages/*/src"]
}
},
"include": ["**/*.ts", "**/*.tsx"],
"exclude": ["node_modules", "dist"]
}

0 comments on commit 948ff17

Please sign in to comment.