@appinit/cli 1.0.0 → 1.2.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.
Files changed (63) hide show
  1. package/LICENSE +33 -0
  2. package/README.md +111 -0
  3. package/bin/appinit.js +15 -0
  4. package/dist/index.d.ts +4 -2
  5. package/dist/index.js +97 -2
  6. package/dist/templates/frontend-react/.appinit-generate/project/README.md +14 -0
  7. package/dist/templates/frontend-react/.appinit-generate/project/index.html +12 -0
  8. package/dist/templates/frontend-react/.appinit-generate/project/package.json +26 -0
  9. package/dist/templates/frontend-react/.appinit-generate/project/public/vite.svg +30 -0
  10. package/dist/templates/frontend-react/.appinit-generate/project/src/App.tsx +16 -0
  11. package/dist/templates/frontend-react/.appinit-generate/project/src/assets/react.svg +1 -0
  12. package/dist/templates/frontend-react/.appinit-generate/project/src/index.css +9 -0
  13. package/dist/templates/frontend-react/.appinit-generate/project/src/main.tsx +10 -0
  14. package/dist/templates/frontend-react/.appinit-generate/project/tsconfig.app.json +31 -0
  15. package/dist/templates/frontend-react/.appinit-generate/project/tsconfig.json +7 -0
  16. package/dist/templates/frontend-react/.appinit-generate/project/tsconfig.node.json +26 -0
  17. package/dist/templates/frontend-react/.appinit-generate/project/vite.config.ts +16 -0
  18. package/dist/templates/frontend-react/docs/README.md +12 -0
  19. package/dist/templates/frontend-react/hooks/afterRender.ts +3 -0
  20. package/dist/templates/frontend-react/hooks/afterWrite.ts +3 -0
  21. package/dist/templates/frontend-react/hooks/beforeRender.ts +3 -0
  22. package/dist/templates/frontend-react/hooks/beforeWrite.ts +3 -0
  23. package/dist/templates/frontend-react/package.json +16 -0
  24. package/dist/templates/frontend-react/template/.env__tmpl +1 -0
  25. package/dist/templates/frontend-react/template/README.md__tmpl +14 -0
  26. package/dist/templates/frontend-react/template/_gitignore +41 -0
  27. package/dist/templates/frontend-react/template/index.html__tmpl +12 -0
  28. package/dist/templates/frontend-react/template/package.json__tmpl +26 -0
  29. package/dist/templates/frontend-react/template/public/vite.svg +30 -0
  30. package/dist/templates/frontend-react/template/src/App.tsx__tmpl +16 -0
  31. package/dist/templates/frontend-react/template/src/assets/react.svg +1 -0
  32. package/dist/templates/frontend-react/template/src/index.css__tmpl +9 -0
  33. package/dist/templates/frontend-react/template/src/main.tsx__tmpl +10 -0
  34. package/dist/templates/frontend-react/template/tsconfig.app.json__tmpl +31 -0
  35. package/dist/templates/frontend-react/template/tsconfig.json__tmpl +7 -0
  36. package/dist/templates/frontend-react/template/tsconfig.node.json__tmpl +26 -0
  37. package/dist/templates/frontend-react/template/vite.config.ts__tmpl +16 -0
  38. package/dist/templates/frontend-react/template.config.ts +30 -0
  39. package/dist/templates/frontend-react/variables/defaults.ts +6 -0
  40. package/dist/templates/frontend-react/variables/schema.ts +17 -0
  41. package/dist/templates/frontend-react/variables/transform.ts +10 -0
  42. package/package.json +57 -15
  43. package/.turbo/turbo-build.log +0 -4
  44. package/bin/cli.js +0 -5
  45. package/dist/commands/add.d.ts +0 -2
  46. package/dist/commands/add.d.ts.map +0 -1
  47. package/dist/commands/add.js +0 -1
  48. package/dist/commands/config.d.ts +0 -2
  49. package/dist/commands/config.d.ts.map +0 -1
  50. package/dist/commands/config.js +0 -1
  51. package/dist/commands/create.d.ts +0 -2
  52. package/dist/commands/create.d.ts.map +0 -1
  53. package/dist/commands/create.js +0 -1
  54. package/dist/commands/doctor.d.ts +0 -2
  55. package/dist/commands/doctor.d.ts.map +0 -1
  56. package/dist/commands/doctor.js +0 -1
  57. package/dist/index.d.ts.map +0 -1
  58. package/src/commands/add.ts +0 -0
  59. package/src/commands/config.ts +0 -0
  60. package/src/commands/create.ts +0 -0
  61. package/src/commands/doctor.ts +0 -0
  62. package/src/index.ts +0 -1
  63. package/tsconfig.json +0 -15
package/LICENSE ADDED
@@ -0,0 +1,33 @@
1
+ MIT License (Modified for Proprietary CLI Distribution)
2
+
3
+ Copyright © 2025 Pradeep, AppInit OS Authors
4
+ All Rights Reserved.
5
+
6
+ Permission is hereby granted, free of charge, to any person obtaining an official copy
7
+ of the compiled CLI distributable package `@appinit/cli` (the "Software"), to install,
8
+ execute, and use the CLI for project initialization on their local machine or authorized
9
+ environments, subject to the following conditions:
10
+
11
+ ✅ Allowed:
12
+
13
+ 1. Installing and executing the official CLI via npm (`npx appinit`, `npm i -g @appinit/cli`)
14
+ 2. Using the CLI to initialize new projects and install owner-approved template packs/addons
15
+ 3. Modifying generated _output_ inside initialized projects (not the CLI core)
16
+ 4. Creating addons/plugins/templates using AppInit public contracts (future SDK/specs)
17
+
18
+ 🚫 Not Allowed (Strict Restrictions):
19
+
20
+ 1. Copying, cloning, or extracting the CLI internal implementation or bundled engine code
21
+ 2. Republishing internal implementation, architecture, or behavior in any form
22
+ 3. Creating derivative tools, generator systems, or runtime competitors using the CLI internals
23
+ 4. Distributing modified versions of AppInit core implementation as independent or competing systems
24
+ 5. Reverse engineering, de-bundling, or re-creating internal resolution, addon, or engine layers
25
+
26
+ The above copyright notice and this permission notice shall be included in all written
27
+ references to the official AppInit CLI distributable only.
28
+
29
+ Liability Disclaimer:
30
+
31
+ THE SOFTWARE IS PROVIDED "AS IS" (COMPILED CLI DISTRIBUTABLE ONLY), WITHOUT WARRANTY OF ANY KIND,
32
+ EXPRESS OR IMPLIED. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
33
+ DAMAGES, OR OTHER LIABILITY ARISING FROM USE OF THE DISTRIBUTED CLI.
package/README.md ADDED
@@ -0,0 +1,111 @@
1
+ # **@appinit/cli**
2
+
3
+ The official command-line interface for **AppInit OS**.
4
+
5
+ `@appinit/cli` provides all executable commands used to create, configure, and manage AppInit projects.
6
+ It connects the user experience (prompts, commands, flags) with the internal systems (core engine, resolver, and template/module execution pipeline).
7
+
8
+ This is the primary entrypoint for developers using AppInit.
9
+
10
+ ---
11
+
12
+ ## 📦 About
13
+
14
+ `@appinit/cli` enables:
15
+
16
+ - project creation
17
+
18
+ ```
19
+ appinit create <project-name>
20
+ ```
21
+
22
+ - feature / module installation
23
+
24
+ ```
25
+ appinit add <feature>
26
+ ```
27
+
28
+ - generating components, routes, API handlers
29
+
30
+ ```
31
+ appinit generate <component|page|api>
32
+ ```
33
+
34
+ - doctor, sync, upgrade, debugging tools
35
+
36
+ ```
37
+ appinit doctor
38
+ appinit sync
39
+ appinit upgrade
40
+ ```
41
+
42
+ - interactive prompts powered by **APS (AppInit Prompt Spec)**
43
+
44
+ - smart suggestions & stack detection
45
+
46
+ - safe, deterministic scaffolding
47
+
48
+ The CLI orchestrates interactions between:
49
+
50
+ - **resolver** (`@appinit/resolver`)
51
+ - **engine** (`@appinit/engine`)
52
+ - **core context** (`@appinit/core`)
53
+ - **types & specs** (`@appinit/types`)
54
+
55
+ ---
56
+
57
+ ## 📘 Usage
58
+
59
+ Global usage:
60
+
61
+ ```sh
62
+ npx appinit create my-app
63
+ ```
64
+
65
+ Local workspace usage:
66
+
67
+ ```sh
68
+ pnpm appinit create my-app
69
+ ```
70
+
71
+ Internal usage:
72
+
73
+ ```ts
74
+ import { runCLI } from "@appinit/cli";
75
+
76
+ runCLI(process.argv.slice(2));
77
+ ```
78
+
79
+ ---
80
+
81
+ ## 🛠 Development
82
+
83
+ Build:
84
+
85
+ ```
86
+ pnpm -F @appinit/cli build
87
+ ```
88
+
89
+ Watch mode:
90
+
91
+ ```
92
+ pnpm -F @appinit/cli dev
93
+ ```
94
+
95
+ Type-check:
96
+
97
+ ```
98
+ pnpm -F @appinit/cli typecheck
99
+ ```
100
+
101
+ Run locally (linked):
102
+
103
+ ```
104
+ pnpm -F @appinit/cli appinit create test
105
+ ```
106
+
107
+ ---
108
+
109
+ ## 📄 License
110
+
111
+ Internal – © AppInit
package/bin/appinit.js ADDED
@@ -0,0 +1,15 @@
1
+ #!/usr/bin/env node
2
+
3
+ import("../dist/index.js")
4
+ .then((mod) => {
5
+ if (mod && mod.start) {
6
+ mod.start(process.argv);
7
+ } else {
8
+ console.error("AppInit: No 'start' export found in CLI module.");
9
+ process.exit(1);
10
+ }
11
+ })
12
+ .catch((err) => {
13
+ console.error("AppInit CLI failed:", err);
14
+ process.exit(1);
15
+ });
package/dist/index.d.ts CHANGED
@@ -1,2 +1,4 @@
1
- export {};
2
- //# sourceMappingURL=index.d.ts.map
1
+ #!/usr/bin/env node
2
+ declare function start(argv: string[]): void;
3
+
4
+ export { start };