@enterpriseai/cli 3.8.2 → 3.9.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/README.md +22 -15
- package/dist/commands/init.d.ts +69 -0
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +512 -32
- package/dist/commands/init.js.map +1 -1
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/lib/error-guidance/catalog.d.ts +9 -41
- package/dist/lib/error-guidance/catalog.d.ts.map +1 -1
- package/dist/lib/error-guidance/catalog.js +12 -0
- package/dist/lib/error-guidance/catalog.js.map +1 -1
- package/dist/lib/error-guidance/match.d.ts.map +1 -1
- package/dist/lib/error-guidance/match.js +59 -1
- package/dist/lib/error-guidance/match.js.map +1 -1
- package/dist/lib/output.d.ts +3 -0
- package/dist/lib/output.d.ts.map +1 -1
- package/dist/lib/output.js +21 -0
- package/dist/lib/output.js.map +1 -1
- package/dist/lib/splash.d.ts +13 -0
- package/dist/lib/splash.d.ts.map +1 -0
- package/dist/lib/splash.js +151 -0
- package/dist/lib/splash.js.map +1 -0
- package/package.json +2 -2
- package/resources/linked-sources.json +1 -1
package/README.md
CHANGED
|
@@ -93,45 +93,51 @@ npm install -g ./docs-site/static/registry/-/@enterpriseai/cli-latest.tgz
|
|
|
93
93
|
## Quick Start
|
|
94
94
|
|
|
95
95
|
```bash
|
|
96
|
-
# 1.
|
|
97
|
-
eai
|
|
96
|
+
# 1. Run the guided first-time setup
|
|
97
|
+
eai create my-app
|
|
98
98
|
cd my-app
|
|
99
|
-
npm install
|
|
100
99
|
|
|
101
|
-
#
|
|
102
|
-
|
|
100
|
+
# `eai create` checks local tooling, signs you in, confirms the signup
|
|
101
|
+
# workspace, creates the app, installs dependencies, verifies Gofer, and
|
|
102
|
+
# checks builder readiness. Use `/0_business_scenario` in your AI tool when
|
|
103
|
+
# it finishes. Pass `--no-install` to skip the install and run
|
|
104
|
+
# `npm install` yourself.
|
|
103
105
|
|
|
104
|
-
#
|
|
106
|
+
# 2. For an existing login or automation, use the lower-level commands:
|
|
107
|
+
eai whoami
|
|
105
108
|
eai tenant select
|
|
106
109
|
|
|
107
|
-
#
|
|
110
|
+
# 3. Create child tenants only when you need them
|
|
108
111
|
# `eai tenant create --parent <id>` now creates the tenant record,
|
|
109
112
|
# attempts first-admin bootstrap for the current login, and only marks
|
|
110
113
|
# the tenant usable after direct tenant-admin membership is confirmed.
|
|
111
114
|
# The child home region defaults to the parent region; pass
|
|
112
115
|
# `--home-region au|ca|eu` when the child must use another region.
|
|
113
116
|
|
|
114
|
-
#
|
|
117
|
+
# 4. Sync project environment if your app needs local configuration
|
|
115
118
|
eai env pull --include-secrets
|
|
116
119
|
|
|
117
|
-
#
|
|
120
|
+
# 5. Define your data model
|
|
118
121
|
# Edit src/eai.config/object-types.ts
|
|
119
122
|
|
|
120
|
-
#
|
|
123
|
+
# 6. Validate and seed
|
|
121
124
|
eai types validate
|
|
122
125
|
eai types seed
|
|
123
126
|
|
|
124
|
-
#
|
|
127
|
+
# 7. Start developing
|
|
125
128
|
eai dev
|
|
126
129
|
```
|
|
127
130
|
|
|
128
|
-
`eai
|
|
131
|
+
`eai create` installs Gofer AI terminal assets by default. New app repos include
|
|
129
132
|
Claude commands and agents, Codex skills, Gemini commands, Copilot prompts and
|
|
130
133
|
CLI skills, and the `.specify` commands/scripts/templates/hooks required to run
|
|
131
134
|
the Gofer pipeline.
|
|
132
|
-
Use `eai
|
|
135
|
+
Use `eai create my-app --no-gofer` only when you need a bare scaffold. `eai init`
|
|
136
|
+
remains available as the low-level, backwards-compatible scaffold command.
|
|
137
|
+
Use `eai create my-app --skip-onboarding` when you want the old init prompts
|
|
138
|
+
without the first-run checks.
|
|
133
139
|
|
|
134
|
-
By default, `eai
|
|
140
|
+
By default, `eai create my-app` creates a new `./my-app` folder. If you already
|
|
135
141
|
created and entered a project folder, run `eai init`, enter the app name, and
|
|
136
142
|
answer yes when asked to use the current folder. For automation, pass
|
|
137
143
|
`--current-dir` with the kebab-case app name. Current-folder init preserves
|
|
@@ -157,7 +163,8 @@ All commands support these global flags:
|
|
|
157
163
|
|
|
158
164
|
| Command | Description |
|
|
159
165
|
|---------|-------------|
|
|
160
|
-
| `eai
|
|
166
|
+
| `eai create [name]` | Guided first-run setup plus scaffold, Gofer verification, and builder readiness check |
|
|
167
|
+
| `eai init [name]` | Low-level backwards-compatible scaffold command |
|
|
161
168
|
| `eai dev` | Start local dev server with connectivity checks |
|
|
162
169
|
|
|
163
170
|
The bundled default template is pinned to the latest `eai-app-template` `main`
|
package/dist/commands/init.d.ts
CHANGED
|
@@ -2,6 +2,11 @@
|
|
|
2
2
|
* eai init — scaffold a new application from the template.
|
|
3
3
|
*/
|
|
4
4
|
import { Command } from "commander";
|
|
5
|
+
import { resolveActiveTenantContext } from "../lib/tenant-context.js";
|
|
6
|
+
import { type ParsedApiError } from "../lib/api.js";
|
|
7
|
+
export declare function describeAppCreationFailure(error: ParsedApiError): string;
|
|
8
|
+
export declare function describeCreateFlowFailure(error: unknown): string;
|
|
9
|
+
type CreateAiTool = "codex" | "claude" | "vscode" | "gemini";
|
|
5
10
|
export interface TemplateClonePlan {
|
|
6
11
|
readonly cloneSource: string;
|
|
7
12
|
readonly displaySource: string;
|
|
@@ -10,5 +15,69 @@ export interface TemplateClonePlan {
|
|
|
10
15
|
export declare function describeCloneFailure(templateSource: string, error: unknown): string;
|
|
11
16
|
export declare function isDefaultTemplateSource(templateSource: string): boolean;
|
|
12
17
|
export declare function resolveTemplateClonePlan(templateSource: string): TemplateClonePlan;
|
|
18
|
+
/**
|
|
19
|
+
* `--from` accepts any GitHub repo or local path, and install runs after
|
|
20
|
+
* .env.local has been generated and hydrated. Only the canonical template is
|
|
21
|
+
* trusted to execute npm lifecycle scripts on the developer machine.
|
|
22
|
+
*/
|
|
23
|
+
export declare function buildTemplateInstallArgs(from: string): string[];
|
|
24
|
+
export declare function consumeLastInitBinding(): InitTenantAppBinding | undefined;
|
|
13
25
|
export declare const initCommand: Command;
|
|
26
|
+
export interface CreateCommandOptions {
|
|
27
|
+
from: string;
|
|
28
|
+
skipPrompts: boolean;
|
|
29
|
+
skipOnboarding: boolean;
|
|
30
|
+
currentDir: boolean;
|
|
31
|
+
tenant?: string;
|
|
32
|
+
companyTenant?: string;
|
|
33
|
+
parentTenant?: string;
|
|
34
|
+
childTenant?: string;
|
|
35
|
+
createChildTenant?: boolean;
|
|
36
|
+
gofer?: boolean;
|
|
37
|
+
install?: boolean;
|
|
38
|
+
packageProfile: string;
|
|
39
|
+
tool?: string;
|
|
40
|
+
splash?: boolean;
|
|
41
|
+
}
|
|
42
|
+
interface CreateOnboardingAnswers {
|
|
43
|
+
name: string;
|
|
44
|
+
displayName: string;
|
|
45
|
+
description: string;
|
|
46
|
+
useCurrentDirectory: boolean;
|
|
47
|
+
aiTool: CreateAiTool;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Guided first-run setup matching the public Getting Started flow.
|
|
51
|
+
*
|
|
52
|
+
* The legacy `init` command remains the low-level scaffold entry point. This
|
|
53
|
+
* command owns the first-run experience: local checks, browser auth, tenant
|
|
54
|
+
* confirmation, non-interactive scaffolding, and the hand-off to Gofer.
|
|
55
|
+
*/
|
|
56
|
+
export declare const createCommand: Command;
|
|
57
|
+
/**
|
|
58
|
+
* Resolve the workspace for guided create.
|
|
59
|
+
*
|
|
60
|
+
* An explicit --company-tenant/--tenant is passed through as `tenantId` so the
|
|
61
|
+
* membership is validated and the cached active tenant cannot silently replace
|
|
62
|
+
* the operator's choice on a state-changing app create.
|
|
63
|
+
*/
|
|
64
|
+
export declare function resolveCreateTenantContext(publicApiUrl: string, options: CreateCommandOptions): ReturnType<typeof resolveActiveTenantContext>;
|
|
65
|
+
export declare function buildForwardedInitArgs(nameArg: string | undefined, options: CreateCommandOptions, answers?: CreateOnboardingAnswers, tenantId?: string): string[];
|
|
66
|
+
/**
|
|
67
|
+
* Next-step copy for guided create. A failed or unchecked builder readiness must
|
|
68
|
+
* not be presented as a ready workspace, and must not send the builder straight
|
|
69
|
+
* into a hand-off that is known to be unproven.
|
|
70
|
+
*/
|
|
71
|
+
export declare function buildCreateCompletionSummary(builderReady: boolean, aiTool: CreateAiTool): {
|
|
72
|
+
heading: string;
|
|
73
|
+
steps: string[];
|
|
74
|
+
};
|
|
75
|
+
export declare function toKebabCase(value: string): string;
|
|
76
|
+
interface InitTenantAppBinding {
|
|
77
|
+
parentTenantId: string;
|
|
78
|
+
runtimeTenantId: string;
|
|
79
|
+
childTenantId?: string;
|
|
80
|
+
runtimeTenantHomeRegion?: string | null;
|
|
81
|
+
}
|
|
82
|
+
export {};
|
|
14
83
|
//# sourceMappingURL=init.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../src/commands/init.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA+BpC,OAAO,EAEL,0BAA0B,EAI3B,MAAM,0BAA0B,CAAC;AAKlC,OAAO,EAIL,KAAK,cAAc,EACpB,MAAM,eAAe,CAAC;AAoBvB,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,cAAc,GAAG,MAAM,CA6BxE;AAED,wBAAgB,yBAAyB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAWhE;AAgBD,KAAK,YAAY,GAAG,OAAO,GAAG,QAAQ,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAkD7D,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,YAAY,CAAC,EAAE,MAAM,CA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