@geastack/cli 0.1.4 → 0.1.5

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 CHANGED
@@ -26,7 +26,7 @@ gea inspect --json
26
26
 
27
27
  ```mermaid
28
28
  flowchart TD
29
- create["npx @geastack/create-geastack my-app"] --> identity["Resolve app identity<br/>argument, optional --id, optional --name"]
29
+ create["gea create my-app"] --> identity["Resolve app identity<br/>argument, optional --id, optional --name"]
30
30
  identity --> starter{"Starter app?"}
31
31
 
32
32
  starter -->|"Counter starter"| counter["Copy bundled minimal JSX counter"]
@@ -30,7 +30,8 @@ You do not clone GeaStack.
30
30
 
31
31
  ```sh
32
32
  npm login
33
- npx @geastack/create-geastack my-app
33
+ npm install --global @geastack/cli
34
+ gea create my-app
34
35
  cd my-app
35
36
  ```
36
37
 
@@ -45,12 +46,12 @@ When the wizard asks what to create, choose:
45
46
 
46
47
  For the fastest first flash, choose `Counter starter`.
47
48
 
48
- That creates a tiny JSX app with one store and installs the project-local Gea CLI, so inside the app you can run `npx gea`.
49
+ That creates a tiny JSX app and installs all of its project dependencies.
49
50
 
50
51
  ## 3. Set Up The Board
51
52
 
52
53
  ```sh
53
- npx gea setup
54
+ gea setup
54
55
  ```
55
56
 
56
57
  Choose:
@@ -82,7 +83,7 @@ If ESP-IDF was installed, the CLI prints this for future shells:
82
83
  . "$HOME/esp/esp-idf/export.sh"
83
84
  ```
84
85
 
85
- You do not need to run that before every command unless `npx gea doctor` says ESP-IDF is not active.
86
+ You do not need to run that before every command unless `gea doctor` says ESP-IDF is not active.
86
87
 
87
88
  If the wizard finds a connected serial device, pick it. If no board is plugged in yet, that is fine; you can provide the port later.
88
89
 
@@ -93,13 +94,13 @@ The wizard writes the board config into your app at `.gea/boards.json` and initi
93
94
  Flash and open the serial monitor:
94
95
 
95
96
  ```sh
96
- npx gea flash --board amoled --monitor
97
+ gea flash --board amoled --monitor
97
98
  ```
98
99
 
99
100
  If you need to specify the serial port manually:
100
101
 
101
102
  ```sh
102
- npx gea flash --board amoled --port /dev/cu.usbmodemXXXX --monitor
103
+ gea flash --board amoled --port /dev/cu.usbmodemXXXX --monitor
103
104
  ```
104
105
 
105
106
  ## Rich Examples
@@ -109,10 +110,10 @@ The bundled starter is intentionally tiny. Rich examples live in the GeaStack ex
109
110
  For example:
110
111
 
111
112
  ```sh
112
- npx @geastack/create-geastack watch-demo --starter example --example watch
113
+ gea create watch-demo --starter example --example watch
113
114
  cd watch-demo
114
- npx gea setup
115
- npx gea flash --board amoled --monitor
115
+ gea setup
116
+ gea flash --board amoled --monitor
116
117
  ```
117
118
 
118
119
  The CLI owns the example catalog, so the user does not need to clone the examples repo.
@@ -122,7 +123,7 @@ The CLI owns the example catalog, so the user does not need to clone the example
122
123
  Run:
123
124
 
124
125
  ```sh
125
- npx gea doctor
126
+ gea doctor
126
127
  ```
127
128
 
128
129
  Most first-run issues are one of:
package/docs/SPEC.md CHANGED
@@ -115,7 +115,7 @@ Minimum checks:
115
115
  Human-readable output should point to [SETUP.md](SETUP.md) whenever a required
116
116
  or optional dependency is missing.
117
117
 
118
- ### `create-geastack`
118
+ ### `gea create`
119
119
 
120
120
  Scaffolds a new app folder with:
121
121
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@geastack/cli",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "type": "module",
5
5
  "description": "Command-line front door for GeaStack apps, targets, and local toolchains.",
6
6
  "publishConfig": {
@@ -15,6 +15,8 @@ import {
15
15
  formatStarterChoice
16
16
  } from './starter-catalog.mjs'
17
17
 
18
+ const cliVersion = JSON.parse(fs.readFileSync(new URL('../package.json', import.meta.url), 'utf8')).version
19
+
18
20
  export async function runCreateGeastack(argv, io = {}) {
19
21
  const parsed = parseArgs(argv)
20
22
  const stdout = io.stdout || console.log
@@ -38,7 +40,7 @@ export async function runCreateGeastack(argv, io = {}) {
38
40
  const ctx = createContext(parsed, env, cwd)
39
41
  const displayName = option(parsed, 'name', titleFromId(appId))
40
42
  const coreDependency = option(parsed, 'core-dependency') || '^0.1.4'
41
- const cliDependency = option(parsed, 'cli-dependency') || '^0.1.4'
43
+ const cliDependency = option(parsed, 'cli-dependency') || `^${cliVersion}`
42
44
  const starter = await resolveStarter(ctx, parsed, io)
43
45
  const entry = projectRelativePath(option(parsed, 'entry') || starter.starter?.entry || starter.example?.entry || 'index.tsx', 'entry')
44
46
  if (option(parsed, 'entry') && starter.kind !== 'empty') {