create-donotdev 0.0.1

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.
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * @fileoverview create-donotdev — One command to scaffold a DoNotDev project
4
+ * @description Installs CLI globally, scaffolds project, installs deps, prints next steps
5
+ *
6
+ * Usage: npx create-donotdev [project-name]
7
+ * bunx create-donotdev [project-name]
8
+ *
9
+ * @version 0.0.2
10
+ * @since 0.0.1
11
+ * @author AMBROISE PARK Consulting
12
+ */
13
+ export {};
14
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA;;;;;;;;;;GAUG"}
package/dist/index.js ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env node
2
+ import*as e from"@clack/prompts";import{execSync as t}from"node:child_process";e.intro("DoNotDev \u2014 Create a new project");const o=e.spinner();o.start("Installing @donotdev/cli@latest globally...");try{t("npm install -g @donotdev/cli@latest",{stdio:"pipe"}),o.stop("CLI installed globally")}catch{o.stop("Needs elevated permissions"),e.log.warn("Could not install globally (likely needs sudo)."),e.note(`Run these two commands:
3
+
4
+ sudo npm install -g @donotdev/cli@latest
5
+ npx create-donotdev`,"Manual step needed"),process.exit(1)}let n=process.argv[2]||"";if(!n){const l=await e.text({message:"Project name?",placeholder:"my-app",validate:i=>{const a=i?.trim();if(!a)return"Project name is required";if(!/^[a-zA-Z0-9_-]+$/.test(a))return"Use only letters, numbers, dashes, underscores"}});e.isCancel(l)&&(e.outro("Cancelled."),process.exit(0)),n=l.trim()}e.log.info(`Scaffolding "${n}"...`);try{t(`dndev init ${n}`,{stdio:"inherit",cwd:process.cwd()})}catch{e.log.error("Scaffolding failed. Check the output above."),process.exit(1)}const d=`${process.cwd()}/${n}`,s=e.spinner();s.start("Installing dependencies...");try{t("bun install",{stdio:"pipe",cwd:d}),s.stop("Dependencies installed")}catch{s.stop("bun install failed"),e.log.warn(`Dependencies failed to install. Run manually:
6
+ cd ${n} && bun install`)}e.note(`cd ${n}
7
+ Open your IDE and tell your AI agent:
8
+
9
+ "Read AI.md and build my app"
10
+
11
+ Cursor: enable MCP in Settings > Tools & MCP > toggle "donotdev" ON
12
+ Claude Code / Windsurf: MCP auto-connects
13
+
14
+ Dev server: dndev dev`,"Next Steps"),e.outro("Happy building!");
package/package.json ADDED
@@ -0,0 +1,40 @@
1
+ {
2
+ "name": "create-donotdev",
3
+ "version": "0.0.1",
4
+ "description": "Create a new DoNotDev project",
5
+ "type": "module",
6
+ "private": false,
7
+ "bin": {
8
+ "create-donotdev": "./dist/index.js"
9
+ },
10
+ "main": "./dist/index.js",
11
+ "types": "./dist/index.d.ts",
12
+ "exports": {
13
+ ".": {
14
+ "import": "./dist/index.js",
15
+ "types": "./dist/index.d.ts"
16
+ },
17
+ "./package.json": "./package.json"
18
+ },
19
+ "files": [
20
+ "dist",
21
+ "README.md"
22
+ ],
23
+ "sideEffects": false,
24
+ "scripts": {
25
+ "build": "dn bundle --package create-donotdev",
26
+ "dev": "tsc --watch",
27
+ "clean": "rimraf dist tsconfig.tsbuildinfo",
28
+ "type-check": "tsc --noEmit"
29
+ },
30
+ "dependencies": {
31
+ "@clack/prompts": "^1.0.0"
32
+ },
33
+ "engines": {
34
+ "node": ">=20.0.0"
35
+ },
36
+ "publishConfig": {
37
+ "registry": "https://registry.npmjs.org",
38
+ "access": "public"
39
+ }
40
+ }