@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.
- package/LICENSE +33 -0
- package/README.md +111 -0
- package/bin/appinit.js +15 -0
- package/dist/index.d.ts +4 -2
- package/dist/index.js +97 -2
- package/dist/templates/frontend-react/.appinit-generate/project/README.md +14 -0
- package/dist/templates/frontend-react/.appinit-generate/project/index.html +12 -0
- package/dist/templates/frontend-react/.appinit-generate/project/package.json +26 -0
- package/dist/templates/frontend-react/.appinit-generate/project/public/vite.svg +30 -0
- package/dist/templates/frontend-react/.appinit-generate/project/src/App.tsx +16 -0
- package/dist/templates/frontend-react/.appinit-generate/project/src/assets/react.svg +1 -0
- package/dist/templates/frontend-react/.appinit-generate/project/src/index.css +9 -0
- package/dist/templates/frontend-react/.appinit-generate/project/src/main.tsx +10 -0
- package/dist/templates/frontend-react/.appinit-generate/project/tsconfig.app.json +31 -0
- package/dist/templates/frontend-react/.appinit-generate/project/tsconfig.json +7 -0
- package/dist/templates/frontend-react/.appinit-generate/project/tsconfig.node.json +26 -0
- package/dist/templates/frontend-react/.appinit-generate/project/vite.config.ts +16 -0
- package/dist/templates/frontend-react/docs/README.md +12 -0
- package/dist/templates/frontend-react/hooks/afterRender.ts +3 -0
- package/dist/templates/frontend-react/hooks/afterWrite.ts +3 -0
- package/dist/templates/frontend-react/hooks/beforeRender.ts +3 -0
- package/dist/templates/frontend-react/hooks/beforeWrite.ts +3 -0
- package/dist/templates/frontend-react/package.json +16 -0
- package/dist/templates/frontend-react/template/.env__tmpl +1 -0
- package/dist/templates/frontend-react/template/README.md__tmpl +14 -0
- package/dist/templates/frontend-react/template/_gitignore +41 -0
- package/dist/templates/frontend-react/template/index.html__tmpl +12 -0
- package/dist/templates/frontend-react/template/package.json__tmpl +26 -0
- package/dist/templates/frontend-react/template/public/vite.svg +30 -0
- package/dist/templates/frontend-react/template/src/App.tsx__tmpl +16 -0
- package/dist/templates/frontend-react/template/src/assets/react.svg +1 -0
- package/dist/templates/frontend-react/template/src/index.css__tmpl +9 -0
- package/dist/templates/frontend-react/template/src/main.tsx__tmpl +10 -0
- package/dist/templates/frontend-react/template/tsconfig.app.json__tmpl +31 -0
- package/dist/templates/frontend-react/template/tsconfig.json__tmpl +7 -0
- package/dist/templates/frontend-react/template/tsconfig.node.json__tmpl +26 -0
- package/dist/templates/frontend-react/template/vite.config.ts__tmpl +16 -0
- package/dist/templates/frontend-react/template.config.ts +30 -0
- package/dist/templates/frontend-react/variables/defaults.ts +6 -0
- package/dist/templates/frontend-react/variables/schema.ts +17 -0
- package/dist/templates/frontend-react/variables/transform.ts +10 -0
- package/package.json +57 -15
- package/.turbo/turbo-build.log +0 -4
- package/bin/cli.js +0 -5
- package/dist/commands/add.d.ts +0 -2
- package/dist/commands/add.d.ts.map +0 -1
- package/dist/commands/add.js +0 -1
- package/dist/commands/config.d.ts +0 -2
- package/dist/commands/config.d.ts.map +0 -1
- package/dist/commands/config.js +0 -1
- package/dist/commands/create.d.ts +0 -2
- package/dist/commands/create.d.ts.map +0 -1
- package/dist/commands/create.js +0 -1
- package/dist/commands/doctor.d.ts +0 -2
- package/dist/commands/doctor.d.ts.map +0 -1
- package/dist/commands/doctor.js +0 -1
- package/dist/index.d.ts.map +0 -1
- package/src/commands/add.ts +0 -0
- package/src/commands/config.ts +0 -0
- package/src/commands/create.ts +0 -0
- package/src/commands/doctor.ts +0 -0
- package/src/index.ts +0 -1
- 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