@nocobase/cli 2.2.0-alpha.1 → 2.2.0-alpha.10

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.
Files changed (78) hide show
  1. package/assets/env-proxy/nginx/snippets/proxy-location.conf +1 -0
  2. package/assets/env-proxy/nginx/snippets/uploads-location.conf +4 -1
  3. package/bin/early-locale.js +89 -0
  4. package/bin/node-version.js +35 -0
  5. package/bin/run.js +9 -0
  6. package/bin/windows-admin.js +60 -0
  7. package/dist/commands/app/destroy.js +4 -3
  8. package/dist/commands/app/restart.js +38 -0
  9. package/dist/commands/app/shared.js +49 -3
  10. package/dist/commands/app/start.js +95 -0
  11. package/dist/commands/app/upgrade.js +11 -0
  12. package/dist/commands/config/set.js +1 -0
  13. package/dist/commands/env/info.js +11 -1
  14. package/dist/commands/examples/prompts-stages.js +2 -2
  15. package/dist/commands/examples/prompts-test.js +2 -2
  16. package/dist/commands/init.js +152 -14
  17. package/dist/commands/install.js +256 -109
  18. package/dist/commands/license/activate.js +4 -1
  19. package/dist/commands/license/shared.js +24 -15
  20. package/dist/commands/portal/config.js +88 -0
  21. package/dist/commands/portal/create.js +104 -0
  22. package/dist/commands/portal/deploy.js +81 -0
  23. package/dist/commands/portal/destroy.js +104 -0
  24. package/dist/commands/portal/dev.js +71 -0
  25. package/dist/commands/portal/index.js +20 -0
  26. package/dist/commands/portal/info.js +82 -0
  27. package/dist/commands/portal/list.js +98 -0
  28. package/dist/commands/portal/pull.js +84 -0
  29. package/dist/commands/portal/push.js +79 -0
  30. package/dist/commands/proxy/caddy/generate.js +93 -7
  31. package/dist/commands/proxy/nginx/generate.js +98 -7
  32. package/dist/commands/revision/create.js +1 -1
  33. package/dist/commands/self/check.js +1 -1
  34. package/dist/commands/self/update.js +4 -4
  35. package/dist/commands/skills/check.js +4 -5
  36. package/dist/commands/skills/install.js +18 -1
  37. package/dist/commands/skills/update.js +19 -4
  38. package/dist/commands/source/dev.js +10 -6
  39. package/dist/commands/source/download.js +85 -16
  40. package/dist/lib/api-command-compat.js +51 -8
  41. package/dist/lib/app-managed-resources.js +104 -5
  42. package/dist/lib/auth-store.js +105 -13
  43. package/dist/lib/cli-config.js +93 -2
  44. package/dist/lib/docker-image.js +94 -6
  45. package/dist/lib/env-auth.js +291 -45
  46. package/dist/lib/env-config.js +14 -0
  47. package/dist/lib/env-proxy-config.js +48 -0
  48. package/dist/lib/env-proxy.js +266 -61
  49. package/dist/lib/hook-script.js +160 -0
  50. package/dist/lib/managed-init-env.js +6 -1
  51. package/dist/lib/portal-command-env.js +31 -0
  52. package/dist/lib/portal-config.js +133 -0
  53. package/dist/lib/portal-configure.js +117 -0
  54. package/dist/lib/portal-create.js +433 -0
  55. package/dist/lib/portal-deploy.js +283 -0
  56. package/dist/lib/portal-destroy.js +100 -0
  57. package/dist/lib/portal-dev.js +79 -0
  58. package/dist/lib/portal-env-files.js +53 -0
  59. package/dist/lib/portal-info.js +31 -0
  60. package/dist/lib/portal-list.js +211 -0
  61. package/dist/lib/portal-source.js +523 -0
  62. package/dist/lib/prompt-catalog-terminal.js +32 -19
  63. package/dist/lib/prompt-validators.js +1 -1
  64. package/dist/lib/prompt-web-ui.js +20 -13
  65. package/dist/lib/proxy-caddy.js +77 -9
  66. package/dist/lib/proxy-nginx.js +71 -11
  67. package/dist/lib/run-npm.js +21 -16
  68. package/dist/lib/self-manager.js +254 -46
  69. package/dist/lib/skills-manager.js +116 -23
  70. package/dist/lib/source-publish.js +2 -2
  71. package/dist/lib/startup-update.js +1 -1
  72. package/dist/lib/ui.js +28 -1
  73. package/dist/locale/en-US.json +227 -43
  74. package/dist/locale/zh-CN.json +227 -43
  75. package/package.json +11 -2
  76. package/scripts/build.mjs +0 -34
  77. package/scripts/clean.mjs +0 -9
  78. package/tsconfig.json +0 -19
@@ -232,7 +232,7 @@ export async function publishSourceSnapshot(params) {
232
232
  version,
233
233
  stdio,
234
234
  });
235
- await run('yarn', ['lerna', 'publish', 'from-package', '--registry', npmRegistry, '--dist-tag', 'local', '--yes', '--no-verify-access', '--git-head', gitSha], {
235
+ await run('yarn', ['lerna', 'publish', 'from-package', '--registry', npmRegistry, '--dist-tag', 'local', '--yes', '--no-verify-access', '--no-git-reset', '--git-head', gitSha], {
236
236
  cwd: projectRoot,
237
237
  errorName: 'lerna publish',
238
238
  stdio,
@@ -319,7 +319,7 @@ export function buildSuggestedInitCommand(result) {
319
319
  const normalizedRegistry = result.npmRegistry || `http://${host}:${port || DEFAULT_SOURCE_REGISTRY_PORT}`;
320
320
  const suggestedEnv = ['snapshot', sanitizeEnvSegment(result.gitSha)].filter(Boolean).join('');
321
321
  return [
322
- `nb init --ui --env ${suggestedEnv} --yes --source npm`,
322
+ `nb init --env ${suggestedEnv} --yes --source npm`,
323
323
  `--version ${result.version}`,
324
324
  `--npm-registry=${normalizedRegistry}`,
325
325
  ].join(' ');
@@ -151,7 +151,7 @@ export async function shouldRunStartupUpdateCheck(argv, now = new Date()) {
151
151
  return readCurrentInstallLastCheckedDate(state) !== todayStamp(now);
152
152
  }
153
153
  export function shouldEnableStartupUpdateForInstallMethod(installMethod) {
154
- return installMethod === 'npm-global';
154
+ return installMethod === 'npm-global' || installMethod === 'pnpm-global' || installMethod === 'yarn-global';
155
155
  }
156
156
  function hasPendingUpdates(selfStatus, skillsStatus) {
157
157
  return Boolean(selfStatus.updateAvailable || skillsStatus.updateAvailable === true);
package/dist/lib/ui.js CHANGED
@@ -15,8 +15,35 @@ let verboseMode = false;
15
15
  let lastStaticTaskMessage;
16
16
  let lastStaticTaskAt = 0;
17
17
  const STATIC_TASK_UPDATE_THROTTLE_MS = 3_000;
18
+ function isCombiningCodePoint(codePoint) {
19
+ return ((codePoint >= 0x0300 && codePoint <= 0x036f) ||
20
+ (codePoint >= 0x1ab0 && codePoint <= 0x1aff) ||
21
+ (codePoint >= 0x1dc0 && codePoint <= 0x1dff) ||
22
+ (codePoint >= 0x20d0 && codePoint <= 0x20ff) ||
23
+ (codePoint >= 0xfe20 && codePoint <= 0xfe2f));
24
+ }
25
+ function isFullWidthCodePoint(codePoint) {
26
+ return (codePoint >= 0x1100 &&
27
+ (codePoint <= 0x115f ||
28
+ codePoint === 0x2329 ||
29
+ codePoint === 0x232a ||
30
+ (codePoint >= 0x2e80 && codePoint <= 0xa4cf && codePoint !== 0x303f) ||
31
+ (codePoint >= 0xac00 && codePoint <= 0xd7a3) ||
32
+ (codePoint >= 0xf900 && codePoint <= 0xfaff) ||
33
+ (codePoint >= 0xfe10 && codePoint <= 0xfe19) ||
34
+ (codePoint >= 0xfe30 && codePoint <= 0xfe6f) ||
35
+ (codePoint >= 0xff00 && codePoint <= 0xff60) ||
36
+ (codePoint >= 0xffe0 && codePoint <= 0xffe6) ||
37
+ (codePoint >= 0x20000 && codePoint <= 0x3fffd)));
38
+ }
18
39
  function stringWidth(value) {
19
- return Array.from(value).length;
40
+ return Array.from(value).reduce((width, character) => {
41
+ const codePoint = character.codePointAt(0);
42
+ if (!codePoint || codePoint === 0 || codePoint < 32 || isCombiningCodePoint(codePoint)) {
43
+ return width;
44
+ }
45
+ return width + (isFullWidthCodePoint(codePoint) ? 2 : 1);
46
+ }, 0);
20
47
  }
21
48
  function pad(value, width) {
22
49
  const padding = Math.max(0, width - stringWidth(value));
@@ -1,4 +1,10 @@
1
1
  {
2
+ "entry": {
3
+ "windowsAdministratorRequired": {
4
+ "message": "NocoBase CLI must be run as Administrator on Windows.",
5
+ "hint": "Open your terminal as Administrator, then run the command again."
6
+ }
7
+ },
2
8
  "promptCatalog": {
3
9
  "common": {
4
10
  "cancelled": "Cancelled.",
@@ -62,7 +68,7 @@
62
68
  "unreachable": "Unable to connect to the API base URL. Check the address and make sure the server is reachable. Details: {{details}}"
63
69
  },
64
70
  "envKey": {
65
- "invalid": "Use letters and numbers only."
71
+ "invalid": "Use letters, numbers, hyphens, and underscores only."
66
72
  },
67
73
  "appPublicPath": {
68
74
  "invalid": "Use / or a slash-separated path like /nocobase/ or /foo-bar/baz_2/. Each path segment may contain letters, numbers, hyphens, and underscores only."
@@ -87,20 +93,20 @@
87
93
  "envAdd": {
88
94
  "prompts": {
89
95
  "name": {
90
- "message": "What would you like to call this environment?",
96
+ "message": "App environment identifier",
91
97
  "placeholder": "default"
92
98
  },
93
99
  "scope": {
94
- "message": "Where should this connection be saved?",
100
+ "message": "Connection save location",
95
101
  "globalLabel": "Global",
96
102
  "globalHint": "user-level config"
97
103
  },
98
104
  "apiBaseUrl": {
99
- "message": "What is the API base URL?",
105
+ "message": "API base URL",
100
106
  "placeholder": "https://demo.example.com/api or https://demo.example.com/api/__app/<subapp>"
101
107
  },
102
108
  "authType": {
103
- "message": "Which authentication method would you like to use?",
109
+ "message": "Authentication method",
104
110
  "basicLabel": "Basic authentication (username + password)",
105
111
  "basicHint": "uses your credentials to fetch a token after save",
106
112
  "oauthLabel": "OAuth (browser authentication)",
@@ -108,14 +114,14 @@
108
114
  "tokenLabel": "API token / API key"
109
115
  },
110
116
  "username": {
111
- "message": "Enter the username for basic login",
117
+ "message": "Basic login username",
112
118
  "placeholder": "admin"
113
119
  },
114
120
  "password": {
115
- "message": "Enter the password for basic login"
121
+ "message": "Basic login password"
116
122
  },
117
123
  "accessToken": {
118
- "message": "Enter an API token or API key",
124
+ "message": "API token or API key",
119
125
  "placeholder": "Enter your API token / API key"
120
126
  }
121
127
  }
@@ -162,6 +168,150 @@
162
168
  "refusal": "Refusing to run against env \"{{requestedEnv}}\" because the current env is \"{{currentEnv}}\" and interactive confirmation is unavailable in the current agent session.\n\nFor safety, the agent will not switch envs automatically and will not add --yes on your behalf.\n\nTo continue:\n- run `nb env use {{requestedEnv}}` yourself and then re-run the command, or\n- re-run the same command with `--env {{requestedEnv}} --yes` to confirm this one-off cross-env operation."
163
169
  }
164
170
  },
171
+ "portalCreate": {
172
+ "errors": {
173
+ "envNotConfigured": "Env \"{{envName}}\" is not configured. Run `nb env add {{envName}} --api-base-url <url>` first.",
174
+ "noEnvConfigured": "No NocoBase env is configured yet. Run `nb init --ui` to create one first.",
175
+ "templateInvalidDirectory": "Portal template \"{{source}}\" is invalid: expected a directory.",
176
+ "localTemplateMissing": "Portal template directory does not exist: {{source}}",
177
+ "templateUnresolved": "Portal template \"{{source}}\" could not be resolved. {{details}}",
178
+ "templateDownloadFailed": "Failed to download portal template \"{{source}}\" with npm pack. {{details}}",
179
+ "templateExtractFailed": "Failed to extract portal template \"{{source}}\": {{details}}",
180
+ "templateMissingPackageJson": "Portal template \"{{source}}\" is invalid: package.json is missing.",
181
+ "npmPackNoTarball": "npm pack did not produce a local tarball for {{source}}.",
182
+ "npmPackMultipleTarballs": "npm pack produced multiple tarballs for {{source}}.",
183
+ "invalidPortalName": "Invalid portal name \"{{value}}\". Use lowercase letters, numbers, underscores, or hyphens, and start with a lowercase letter or number.",
184
+ "invalidPortalAppName": "Invalid portal app name \"{{value}}\" from apiBaseUrl. Use letters, numbers, underscores, or hyphens, and start with a letter or number.",
185
+ "missingApiBaseUrl": "Cannot create a portal because the selected env has no apiBaseUrl.",
186
+ "outsideParent": "Refusing to modify a portal outside {{parentDir}}: {{portalDir}}",
187
+ "sshUnsupported": "Cannot create a portal for ssh envs in the first version.",
188
+ "workspaceExists": "Portal already exists: {{portalDir}}\nPass --force to delete it and create a new portal."
189
+ },
190
+ "messages": {
191
+ "skipInstall": "Skipped pnpm install because package.json was not found in {{portalDir}}.",
192
+ "created": "Portal \"{{portal}}\" created at {{portalDir}}.",
193
+ "app": "App: {{app}}",
194
+ "base": "Base: {{base}}",
195
+ "sourceStorage": "Source storage: {{sourceStorage}}"
196
+ }
197
+ },
198
+ "portalConfig": {
199
+ "errors": {
200
+ "invalidSourceStorage": "Invalid source storage \"{{value}}\". Use \"nocobase\" or \"git\".",
201
+ "invalidGitPath": "--git-path must be a relative path inside the Git repository.",
202
+ "gitOptionsForNocobaseStorage": "--git-repo, --git-branch, and --git-path can only be used with --source-storage git.",
203
+ "gitRepoRequired": "--git-repo is required when --source-storage is git.",
204
+ "gitRepoInvalid": "--git-repo must be a full Git remote URL.",
205
+ "updateFailed": "Portal config update failed with status {{status}}\n{{details}}"
206
+ }
207
+ },
208
+ "portalConfigure": {
209
+ "errors": {
210
+ "envNotConfigured": "Env \"{{envName}}\" is not configured. Run `nb env add {{envName}} --api-base-url <url>` first.",
211
+ "noEnvConfigured": "No NocoBase env is configured yet. Run `nb init --ui` to create one first.",
212
+ "noChanges": "No portal configuration changes were provided. Pass --source-storage or a --git-* flag.",
213
+ "workspaceMissing": "Portal does not exist: {{portalDir}}\nRun `nb portal create {{portal}}` or `nb portal pull {{portal}}` first."
214
+ },
215
+ "messages": {
216
+ "updated": "Portal \"{{portal}}\" configuration updated at {{portalDir}}/portal.config.json.",
217
+ "remoteSynced": "Remote portal record: synced",
218
+ "remoteSkipped": "Remote portal record: not found; local config only"
219
+ }
220
+ },
221
+ "portalDeploy": {
222
+ "errors": {
223
+ "envNotConfigured": "Env \"{{envName}}\" is not configured. Run `nb env add {{envName}} --api-base-url <url>` first.",
224
+ "noEnvConfigured": "No NocoBase env is configured yet. Run `nb init --ui` to create one first.",
225
+ "workspaceMissing": "Portal does not exist: {{portalDir}}\nRun `nb portal create {{portal}}` first.",
226
+ "packageJsonMissing": "Portal is invalid: package.json is missing in {{portalDir}}.",
227
+ "distMissing": "Portal build did not produce {{distDir}}/index.html.",
228
+ "unsupportedEnvKind": "Cannot deploy a portal for {{kind}} envs in the first version.",
229
+ "uploadFailed": "Portal dist upload failed with status {{status}}\n{{details}}",
230
+ "recordSyncFailed": "Portal record sync failed with status {{status}}\n{{details}}"
231
+ },
232
+ "messages": {
233
+ "deployed": "Portal \"{{portal}}\" deployed.",
234
+ "mode": "Mode: {{mode}}",
235
+ "app": "App: {{app}}",
236
+ "base": "Base: {{base}}",
237
+ "record": "Record: synced",
238
+ "dist": "Dist: {{dist}}",
239
+ "localDist": "Local dist: {{dist}}",
240
+ "serverDist": "Server dist: {{dist}}"
241
+ }
242
+ },
243
+ "portalList": {
244
+ "errors": {
245
+ "envNotConfigured": "Env \"{{envName}}\" is not configured. Run `nb env add {{envName}} --api-base-url <url>` first.",
246
+ "noEnvConfigured": "No NocoBase env is configured yet. Run `nb init --ui` to create one first.",
247
+ "unsupportedEnvKind": "Cannot list portals for {{kind}} envs in the first version.",
248
+ "listFailed": "Portal list failed with status {{status}}\n{{details}}"
249
+ },
250
+ "messages": {
251
+ "empty": "No portal records found."
252
+ },
253
+ "table": {
254
+ "name": "Name",
255
+ "url": "URL",
256
+ "portalType": "Portal type",
257
+ "path": "Local path",
258
+ "enabled": "Enabled",
259
+ "localSynced": "Local synced"
260
+ }
261
+ },
262
+ "portalInfo": {
263
+ "errors": {
264
+ "envNotConfigured": "Env \"{{envName}}\" is not configured. Run `nb env add {{envName}} --api-base-url <url>` first.",
265
+ "noEnvConfigured": "No NocoBase env is configured yet. Run `nb init --ui` to create one first.",
266
+ "notFound": "Portal \"{{portal}}\" was not found."
267
+ },
268
+ "fields": {
269
+ "name": "Name",
270
+ "url": "URL",
271
+ "portalType": "Portal type",
272
+ "path": "Local path",
273
+ "enabled": "Enabled",
274
+ "localSynced": "Local synced"
275
+ }
276
+ },
277
+ "portalDestroy": {
278
+ "errors": {
279
+ "envNotConfigured": "Env \"{{envName}}\" is not configured. Run `nb env add {{envName}} --api-base-url <url>` first.",
280
+ "noEnvConfigured": "No NocoBase env is configured yet. Run `nb init --ui` to create one first.",
281
+ "confirmationRequired": "Refusing to destroy a portal in non-interactive mode without --yes.",
282
+ "outsideParent": "Refusing to delete a portal outside {{parentDir}}: {{portalDir}}",
283
+ "workspaceMissing": "Portal does not exist: {{portalDir}}\nPass --force to ignore missing local files.",
284
+ "unsupportedEnvKind": "Cannot destroy a portal for {{kind}} envs in the first version.",
285
+ "recordDestroyFailed": "Portal record destroy failed with status {{status}}\n{{details}}"
286
+ },
287
+ "prompts": {
288
+ "confirm": "Destroy portal \"{{portal}}\" and delete its storage directory?"
289
+ },
290
+ "messages": {
291
+ "destroyed": "Portal \"{{portal}}\" destroyed.",
292
+ "mode": "Mode: {{mode}}",
293
+ "app": "App: {{app}}",
294
+ "base": "Base: {{base}}",
295
+ "record": "Record: {{status}}",
296
+ "workspace": "Portal files: {{status}} ({{dir}})"
297
+ }
298
+ },
299
+ "portalDev": {
300
+ "errors": {
301
+ "envNotConfigured": "Env \"{{envName}}\" is not configured. Run `nb env add {{envName}} --api-base-url <url>` first.",
302
+ "noEnvConfigured": "No NocoBase env is configured yet. Run `nb init --ui` to create one first.",
303
+ "workspaceMissing": "Portal does not exist: {{portalDir}}\nRun `nb portal create {{portal}}` first.",
304
+ "packageJsonMissing": "Portal is invalid: package.json is missing in {{portalDir}}.",
305
+ "sshUnsupported": "Cannot start a portal in dev mode for ssh envs in the first version."
306
+ },
307
+ "messages": {
308
+ "starting": "Starting portal \"{{portal}}\"...",
309
+ "mode": "Mode: {{mode}}",
310
+ "app": "App: {{app}}",
311
+ "base": "Base: {{base}}",
312
+ "dir": "Dir: {{dir}}"
313
+ }
314
+ },
165
315
  "license": {
166
316
  "activate": {
167
317
  "interactive": {
@@ -173,7 +323,7 @@
173
323
  },
174
324
  "prompts": {
175
325
  "provideMethod": {
176
- "message": "How do you want to provide the license key?",
326
+ "message": "License key input method",
177
327
  "keyOption": "Paste the license key",
178
328
  "fileOption": "Read the key from a file"
179
329
  },
@@ -246,7 +396,7 @@
246
396
  },
247
397
  "prompts": {
248
398
  "source": {
249
- "message": "How would you like to get NocoBase?",
399
+ "message": "NocoBase install source",
250
400
  "dockerLabel": "Docker install (Recommended)",
251
401
  "dockerHint": "Best for no-code and low-maintenance setups. You can upgrade later by pulling a newer image and restarting the app.",
252
402
  "npmLabel": "create-nocobase-app install",
@@ -255,9 +405,9 @@
255
405
  "gitHint": "Best when you want to try the latest unreleased changes, contribute code, or debug and modify NocoBase source directly. This option is more developer-oriented."
256
406
  },
257
407
  "version": {
258
- "message": "Which version would you like to use?",
408
+ "message": "NocoBase version",
259
409
  "latestLabel": "latest",
260
- "latestHint": "Stable release. Best for production use and the most predictable experience. Currently unavailable.",
410
+ "latestHint": "Stable release. Best for production use and the most predictable experience.",
261
411
  "betaLabel": "beta",
262
412
  "betaHint": "Preview release. Good for trying upcoming features before general release.",
263
413
  "alphaLabel": "alpha",
@@ -266,15 +416,15 @@
266
416
  "otherHint": "Enter another package version, Docker tag, or Git ref manually, such as a branch name."
267
417
  },
268
418
  "otherVersion": {
269
- "message": "Enter the version, Docker tag, or Git ref you want to use.",
419
+ "message": "Custom version, Docker tag, or Git ref",
270
420
  "placeholder": "For example: fix/cli-v2"
271
421
  },
272
422
  "dockerRegistry": {
273
- "message": "Which Docker registry would you like to use? The image tag is set separately in Version.",
423
+ "message": "Docker registry (image tag is set in Version)",
274
424
  "placeholder": "nocobase/nocobase"
275
425
  },
276
426
  "dockerPlatform": {
277
- "message": "Which Docker image platform should be used?",
427
+ "message": "Architecture",
278
428
  "autoLabel": "Auto",
279
429
  "autoHint": "Use Docker default for this machine"
280
430
  },
@@ -317,79 +467,94 @@
317
467
  },
318
468
  "prompts": {
319
469
  "env": {
320
- "message": "What would you like to call this app?",
470
+ "message": "App environment identifier",
321
471
  "placeholder": "local"
322
472
  },
323
473
  "lang": {
324
- "message": "Which language would you like to use for the app?"
474
+ "message": "App language"
325
475
  },
326
476
  "appPath": {
327
- "message": "Where should this app be stored? (relative to {{root}})",
477
+ "message": "App directory (relative to {{root}})",
328
478
  "placeholder": "./<env>/"
329
479
  },
330
480
  "appPort": {
331
- "message": "Which port should this app use?",
481
+ "message": "App port",
332
482
  "placeholder": "13000"
333
483
  },
334
484
  "appPublicPath": {
335
- "message": "What is the app subpath? (for example, /nocobase/)",
485
+ "message": "App subpath (for example, /nocobase/)",
336
486
  "placeholder": "/ or /nocobase/"
337
487
  },
488
+ "portalType": {
489
+ "message": "Portal type",
490
+ "noCodeLabel": "No-code portal",
491
+ "noCodeHint": "Create with visual configuration. AI can help adjust the configuration. Path: /v/<name>",
492
+ "aiLabel": "AI portal",
493
+ "aiHint": "Create with AI Agent and code. Users can request changes in natural language. Path: /x/<name>"
494
+ },
495
+ "portalName": {
496
+ "message": "Portal name",
497
+ "placeholder": "admin"
498
+ },
499
+ "portalTemplate": {
500
+ "message": "Starter template (copied to ./storage/portals/)",
501
+ "placeholder": "git@github.com:nocobase/admin-starter.git"
502
+ },
338
503
  "storagePath": {
339
- "message": "Where should uploads and local files be stored?",
504
+ "message": "Uploads and local files directory",
340
505
  "placeholder": "./<env>/storage/"
341
506
  },
342
507
  "dbDialect": {
343
- "message": "Which database would you like to use?"
508
+ "message": "Database type"
344
509
  },
345
510
  "builtinDb": {
346
- "message": "Would you like to use the built-in database?"
511
+ "message": "Use built-in database"
347
512
  },
348
513
  "builtinDbImage": {
349
- "message": "Which Docker image should be used for the built-in database?",
514
+ "message": "Built-in database Docker image",
350
515
  "placeholder": "postgres:16"
351
516
  },
352
517
  "dbHost": {
353
- "message": "What is the database host?",
518
+ "message": "Database host",
354
519
  "placeholder": "127.0.0.1"
355
520
  },
356
521
  "dbPort": {
357
- "message": "What is the database port?",
522
+ "message": "Database port",
358
523
  "placeholder": "5432"
359
524
  },
360
525
  "dbDatabase": {
361
- "message": "What is the database name?"
526
+ "message": "Database name"
362
527
  },
363
528
  "dbUser": {
364
- "message": "What is the database username?"
529
+ "message": "Database username"
365
530
  },
366
531
  "dbPassword": {
367
- "message": "What is the database password?"
532
+ "message": "Database password"
368
533
  },
369
534
  "dbSchema": {
370
- "message": "What is the database schema? (PostgreSQL only, optional)",
535
+ "message": "Database schema (PostgreSQL/KingbaseES only, optional)",
371
536
  "placeholder": "Leave empty to use the default schema"
372
537
  },
373
538
  "dbTablePrefix": {
374
- "message": "What table prefix should be used? (optional)",
539
+ "message": "Database table prefix (optional)",
375
540
  "placeholder": "For example: nb_"
376
541
  },
377
542
  "dbUnderscored": {
378
- "message": "Use underscored names for database tables and columns?"
543
+ "message": "Use underscored names for database tables and columns"
379
544
  },
380
545
  "rootUsername": {
381
- "message": "Choose the initial admin username",
546
+ "message": "Initial admin username",
382
547
  "placeholder": "nocobase"
383
548
  },
384
549
  "rootEmail": {
385
- "message": "What is the initial admin email?",
550
+ "message": "Initial admin email",
386
551
  "placeholder": "admin@nocobase.com"
387
552
  },
388
553
  "rootPassword": {
389
- "message": "Choose the initial admin password"
554
+ "message": "Initial admin password"
390
555
  },
391
556
  "rootNickname": {
392
- "message": "What display name should the initial admin use?",
557
+ "message": "Initial admin display name",
393
558
  "placeholder": "Super Admin"
394
559
  }
395
560
  }
@@ -399,7 +564,7 @@
399
564
  "envExists": "Env \"{{envName}}\" already exists. Choose another env name."
400
565
  },
401
566
  "messages": {
402
- "title": "Set up NocoBase for coding agents",
567
+ "title": "Set up NocoBase",
403
568
  "appNameRequiredWhenSkipped": "Env name is required when prompts are skipped.",
404
569
  "appNameEnvHelp": "Use `nb init --yes --env <envName>` to continue.",
405
570
  "resumeEnvRequired": "Env name is required when resuming setup.",
@@ -413,11 +578,11 @@
413
578
  },
414
579
  "prompts": {
415
580
  "appName": {
416
- "message": "What should this environment use for `--env`?",
581
+ "message": "Unique app environment identifier (used by the CLI to locate and manage this environment)",
417
582
  "placeholder": "local"
418
583
  },
419
584
  "setupMode": {
420
- "message": "How would you like to set up this environment?",
585
+ "message": "App environment setup method",
421
586
  "installNewLabel": "Install a new app",
422
587
  "installNewHint": "Install a brand-new app from scratch. Best for first-time setup, evaluation, or a fresh local environment.",
423
588
  "manageLocalLabel": "Manage an app already on this machine",
@@ -426,7 +591,7 @@
426
591
  "connectRemoteHint": "Save only the remote app connection. Nothing will be installed or taken over on this machine."
427
592
  },
428
593
  "installSkills": {
429
- "message": "Install NocoBase AI coding skills (nocobase/skills)?"
594
+ "message": "Install NocoBase AI coding skills (nocobase/skills)"
430
595
  },
431
596
  "apiBaseUrl": {
432
597
  "message": "API base URL",
@@ -434,12 +599,27 @@
434
599
  },
435
600
  "skipDownload": {
436
601
  "message": "Skip downloading NocoBase and reuse existing local app files or Docker images"
602
+ },
603
+ "portalType": {
604
+ "message": "Portal type",
605
+ "noCodeLabel": "No-code portal",
606
+ "noCodeHint": "Create with visual configuration. AI can help adjust the configuration. Path: /v/<name>",
607
+ "aiLabel": "AI portal",
608
+ "aiHint": "Create with AI Agent and code. Users can request changes in natural language. Path: /x/<name>"
609
+ },
610
+ "portalName": {
611
+ "message": "Portal name",
612
+ "placeholder": "admin"
613
+ },
614
+ "portalTemplate": {
615
+ "message": "Starter template (copied to ./storage/portals/)",
616
+ "placeholder": "git@github.com:nocobase/admin-starter.git"
437
617
  }
438
618
  },
439
619
  "webUi": {
440
- "pageTitle": "Set up NocoBase for coding agents",
441
- "documentHeading": "Set up NocoBase for coding agents",
442
- "documentHint": "Install a new app, manage one that already exists on this machine, or connect a remote app so coding agents can access and work with NocoBase.",
620
+ "pageTitle": "Set up NocoBase",
621
+ "documentHeading": "Set up NocoBase",
622
+ "documentHint": "Install a new app, manage an existing one, or connect a remote app. You can use it directly or let a coding agent access it later.",
443
623
  "gettingStarted": {
444
624
  "title": "Getting started",
445
625
  "description": "Choose whether to install a new app, manage a local app, or connect a remote app."
@@ -456,6 +636,10 @@
456
636
  "title": "App source and version",
457
637
  "description": "Choose how to get the app and which source and version to use."
458
638
  },
639
+ "portalType": {
640
+ "title": "Configure portal",
641
+ "description": "Set the default portal name and type."
642
+ },
459
643
  "configureDatabase": {
460
644
  "title": "Configure the database",
461
645
  "description": "Use built-in or custom."