Commit 1b043a5
authored
Add remaining elements for create kernel app (#48)
This PR competes the remaining work for
[KERNEL-374](https://linear.app/onkernel/issue/KERNEL-374/port-create-kernel-app-to-the-kernel-cli)
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> Implements the `kernel create` flow with template selection and
overwrite prompts, adds deploy/invoke guidance per template, expands
tests, and updates README docs.
>
> - **Create CLI**:
> - Implement `kernel create` with `create.CreateInput` type,
interactive prompts, and overwrite confirmation via
`PromptForOverwrite`.
> - Copies template files with spinner feedback; handles existing dirs
by optional removal.
> - Refactor install flow: `InstallDependencies(appPath, CreateInput)`;
prints tailored next steps on failure/missing tools.
> - **Templates & Commands**:
> - Add template key constants and `Templates` map; provide
`GetDeployCommand` and `GetInvokeSample` via new `Commands` matrix per
language/template.
> - Normalize language shorthands; expose supported templates per
language.
> - **Tests**:
> - Major expansion: creation flow, dependency failure/missing tool
paths, overwrite behavior, permissions, invalid combos, shorthands, and
template coverage (`pkg/create/copy_test.go`, updates to
`cmd/create_test.go`).
> - **Docs**:
> - README: add app creation to capabilities, reorder Quick Start
(create → login → deploy → invoke), document create flags/templates, and
add create examples.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
83f218a. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->1 parent 1bc8095 commit 1b043a5
File tree
8 files changed
+769
-45
lines changed- cmd
- pkg/create
8 files changed
+769
-45
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
24 | 25 | | |
25 | 26 | | |
26 | 27 | | |
| |||
50 | 51 | | |
51 | 52 | | |
52 | 53 | | |
53 | | - | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
54 | 61 | | |
55 | 62 | | |
56 | 63 | | |
57 | 64 | | |
58 | 65 | | |
59 | | - | |
| 66 | + | |
60 | 67 | | |
61 | 68 | | |
62 | 69 | | |
63 | 70 | | |
64 | 71 | | |
65 | | - | |
| 72 | + | |
66 | 73 | | |
67 | 74 | | |
68 | 75 | | |
| |||
103 | 110 | | |
104 | 111 | | |
105 | 112 | | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
106 | 127 | | |
107 | 128 | | |
108 | 129 | | |
| |||
356 | 377 | | |
357 | 378 | | |
358 | 379 | | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
359 | 399 | | |
360 | 400 | | |
361 | 401 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | 14 | | |
21 | 15 | | |
22 | 16 | | |
23 | 17 | | |
24 | | - | |
| 18 | + | |
25 | 19 | | |
26 | 20 | | |
27 | 21 | | |
28 | 22 | | |
29 | 23 | | |
30 | | - | |
31 | | - | |
| 24 | + | |
32 | 25 | | |
33 | | - | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
34 | 40 | | |
35 | 41 | | |
36 | 42 | | |
| |||
45 | 51 | | |
46 | 52 | | |
47 | 53 | | |
| 54 | + | |
48 | 55 | | |
49 | | - | |
| 56 | + | |
50 | 57 | | |
51 | 58 | | |
52 | 59 | | |
| |||
91 | 98 | | |
92 | 99 | | |
93 | 100 | | |
94 | | - | |
| 101 | + | |
95 | 102 | | |
96 | 103 | | |
97 | 104 | | |
| |||
0 commit comments