@korajs/cli 0.1.0 → 0.1.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.
- package/README.md +77 -0
- package/package.json +5 -1
package/README.md
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# @korajs/cli
|
|
2
|
+
|
|
3
|
+
CLI tooling for Kora.js. Scaffold new apps, run the development server, manage schema migrations, and generate TypeScript types.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
pnpm add -g @korajs/cli
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Or use directly with `npx`:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
npx create-kora-app my-app
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Commands
|
|
18
|
+
|
|
19
|
+
### create-kora-app
|
|
20
|
+
|
|
21
|
+
Scaffold a new Kora.js project:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
npx create-kora-app my-app
|
|
25
|
+
|
|
26
|
+
# Interactive prompts:
|
|
27
|
+
# Select a template: React (basic) | React (with sync)
|
|
28
|
+
# Package manager: pnpm | npm | yarn | bun
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
### kora dev
|
|
32
|
+
|
|
33
|
+
Start the development environment:
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
kora dev
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
This runs:
|
|
40
|
+
- Vite dev server for your application
|
|
41
|
+
- Kora sync server (if configured)
|
|
42
|
+
- Schema file watcher with auto type generation
|
|
43
|
+
- Embedded DevTools (toggle with `Ctrl+Shift+K`)
|
|
44
|
+
|
|
45
|
+
### kora migrate
|
|
46
|
+
|
|
47
|
+
Detect schema changes and generate migrations:
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
kora migrate
|
|
51
|
+
# Detects changes, generates migration file, prompts to apply
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### kora generate types
|
|
55
|
+
|
|
56
|
+
Generate TypeScript types from your schema:
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
kora generate types
|
|
60
|
+
# Output: kora/generated/types.ts
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
## Quick Start
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
npx create-kora-app my-app
|
|
67
|
+
cd my-app
|
|
68
|
+
pnpm dev
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
You'll have a working offline-first app in under 2 minutes.
|
|
72
|
+
|
|
73
|
+
## License
|
|
74
|
+
|
|
75
|
+
MIT
|
|
76
|
+
|
|
77
|
+
See the [full documentation](https://github.com/ehoneahobed/kora) for guides, API reference, and examples.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@korajs/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Kora.js CLI tooling and project scaffolding",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -20,6 +20,10 @@
|
|
|
20
20
|
"types": "./dist/index.d.cts",
|
|
21
21
|
"default": "./dist/index.cjs"
|
|
22
22
|
}
|
|
23
|
+
},
|
|
24
|
+
"./create": {
|
|
25
|
+
"import": "./dist/create.js",
|
|
26
|
+
"require": "./dist/create.cjs"
|
|
23
27
|
}
|
|
24
28
|
},
|
|
25
29
|
"files": [
|