@nocobase/plugin-ai 2.1.0-beta.44 → 2.1.0-beta.45

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 (104) hide show
  1. package/dist/ai/docs/nocobase/ai/install-upgrade-migration.mdx +127 -132
  2. package/dist/ai/docs/nocobase/ai-dev/capabilities.md +1 -1
  3. package/dist/ai/docs/nocobase/ai-dev/index.md +1 -1
  4. package/dist/ai/docs/nocobase/ai-dev/watermark-plugin.md +1 -1
  5. package/dist/ai/docs/nocobase/api/cli/app/autostart/disable.md +44 -0
  6. package/dist/ai/docs/nocobase/api/cli/app/autostart/enable.md +44 -0
  7. package/dist/ai/docs/nocobase/api/cli/app/autostart/index.md +63 -0
  8. package/dist/ai/docs/nocobase/api/cli/app/autostart/list.md +41 -0
  9. package/dist/ai/docs/nocobase/api/cli/app/autostart/run.md +50 -0
  10. package/dist/ai/docs/nocobase/api/cli/app/index.md +18 -15
  11. package/dist/ai/docs/nocobase/api/cli/app/restart.md +3 -11
  12. package/dist/ai/docs/nocobase/api/cli/app/start.md +3 -11
  13. package/dist/ai/docs/nocobase/api/cli/app/stop.md +22 -12
  14. package/dist/ai/docs/nocobase/api/cli/app/upgrade.md +6 -6
  15. package/dist/ai/docs/nocobase/api/cli/backup/create.md +49 -0
  16. package/dist/ai/docs/nocobase/api/cli/backup/index.md +46 -0
  17. package/dist/ai/docs/nocobase/api/cli/backup/restore.md +46 -0
  18. package/dist/ai/docs/nocobase/api/cli/config/delete.md +11 -9
  19. package/dist/ai/docs/nocobase/api/cli/config/get.md +11 -8
  20. package/dist/ai/docs/nocobase/api/cli/config/index.md +28 -24
  21. package/dist/ai/docs/nocobase/api/cli/config/set.md +14 -12
  22. package/dist/ai/docs/nocobase/api/cli/db/stop.md +10 -11
  23. package/dist/ai/docs/nocobase/api/cli/env/index.md +25 -23
  24. package/dist/ai/docs/nocobase/api/cli/env/info.md +12 -10
  25. package/dist/ai/docs/nocobase/api/cli/env/proxy/caddy.md +108 -0
  26. package/dist/ai/docs/nocobase/api/cli/env/proxy/index.md +54 -0
  27. package/dist/ai/docs/nocobase/api/cli/env/proxy/nginx.md +104 -0
  28. package/dist/ai/docs/nocobase/api/cli/env/remove.md +18 -14
  29. package/dist/ai/docs/nocobase/api/cli/env/update.md +115 -14
  30. package/dist/ai/docs/nocobase/api/cli/index.md +66 -52
  31. package/dist/ai/docs/nocobase/api/cli/init.md +244 -62
  32. package/dist/ai/docs/nocobase/api/cli/license/activate.md +13 -12
  33. package/dist/ai/docs/nocobase/api/cli/license/index.md +2 -2
  34. package/dist/ai/docs/nocobase/api/cli/plugin/import.md +74 -0
  35. package/dist/ai/docs/nocobase/api/cli/plugin/index.md +4 -2
  36. package/dist/ai/docs/nocobase/get-started/deployment/how-to-deploy-nocobase-faster.mdx +384 -0
  37. package/dist/ai/docs/nocobase/get-started/install-upgrade-plugins.mdx +16 -10
  38. package/dist/ai/docs/nocobase/get-started/upgrading/docker.md +1 -1
  39. package/dist/ai/docs/nocobase/index.md +3 -3
  40. package/dist/ai/docs/nocobase/multi-app/multi-app/app-block-and-switcher.md +68 -0
  41. package/dist/ai/docs/nocobase/multi-app/multi-app/app-sso.md +71 -0
  42. package/dist/ai/docs/nocobase/multi-app/multi-app/index.md +9 -1
  43. package/dist/ai/docs/nocobase/multi-app/multi-app/sub-app-api.md +112 -0
  44. package/dist/ai/docs/nocobase/plugin-development/client/appendix/faq.md +3 -3
  45. package/dist/ai/docs/nocobase/plugin-development/client/component/index.md +1 -1
  46. package/dist/ai/docs/nocobase/plugin-development/client/ctx/common-capabilities.md +2 -2
  47. package/dist/ai/docs/nocobase/plugin-development/client/ctx/index.md +1 -1
  48. package/dist/ai/docs/nocobase/plugin-development/client/router.md +11 -11
  49. package/dist/ai/docs/nocobase/quickstart/index.md +27 -0
  50. package/dist/ai/docs/nocobase/quickstart/installation/airgap.md +67 -0
  51. package/dist/ai/docs/nocobase/quickstart/installation/cli.md +205 -0
  52. package/dist/ai/docs/nocobase/quickstart/installation/docker-compose.md +123 -0
  53. package/dist/ai/docs/nocobase/quickstart/installation/env.md +101 -0
  54. package/dist/ai/docs/nocobase/quickstart/installation/migration.md +50 -0
  55. package/dist/ai/docs/nocobase/quickstart/operations/backup-restore.md +94 -0
  56. package/dist/ai/docs/nocobase/quickstart/operations/manage-app.md +166 -0
  57. package/dist/ai/docs/nocobase/quickstart/operations/multi-environment.md +171 -0
  58. package/dist/ai/docs/nocobase/quickstart/plugins/third-party.md +86 -0
  59. package/dist/ai/docs/nocobase/quickstart/production/index.md +163 -0
  60. package/dist/ai/docs/nocobase/quickstart/production/reverse-proxy/caddy.md +158 -0
  61. package/dist/ai/docs/nocobase/quickstart/production/reverse-proxy/index.md +100 -0
  62. package/dist/ai/docs/nocobase/quickstart/production/reverse-proxy/nginx.md +166 -0
  63. package/dist/ai/docs/nocobase/quickstart/release-management.md +1 -0
  64. package/dist/ai/docs/nocobase/solution/all-in-one/installation.md +181 -0
  65. package/dist/ai/docs/nocobase/solution/crm/changelog.md +0 -3
  66. package/dist/ai/docs/nocobase/solution/crm/installation.md +6 -76
  67. package/dist/ai/docs/nocobase/solution/crm/v1.md +6 -35
  68. package/dist/ai/docs/nocobase/solution/ticket-system/changelog.md +0 -2
  69. package/dist/ai/docs/nocobase/solution/ticket-system/installation.md +6 -69
  70. package/dist/ai/docs/nocobase/workflow/advanced/options.md +45 -1
  71. package/dist/client/{406.15c09d98faa2ccf1.js → 406.9a530334eae8cede.js} +1 -1
  72. package/dist/client/{428.e9f38da3b0d8b498.js → 428.431a00d29107058e.js} +1 -1
  73. package/dist/client/index.js +2 -2
  74. package/dist/client-v2/index.js +1 -1
  75. package/dist/externalVersion.js +16 -16
  76. package/dist/locale/de-DE.json +1 -0
  77. package/dist/locale/en-US.json +2 -1
  78. package/dist/locale/es-ES.json +1 -0
  79. package/dist/locale/fr-FR.json +1 -0
  80. package/dist/locale/hu-HU.json +1 -0
  81. package/dist/locale/id-ID.json +1 -0
  82. package/dist/locale/it-IT.json +1 -0
  83. package/dist/locale/ja-JP.json +1 -0
  84. package/dist/locale/ko-KR.json +1 -0
  85. package/dist/locale/nl-NL.json +1 -0
  86. package/dist/locale/pt-BR.json +1 -0
  87. package/dist/locale/ru-RU.json +1 -0
  88. package/dist/locale/tr-TR.json +1 -0
  89. package/dist/locale/uk-UA.json +1 -0
  90. package/dist/locale/vi-VN.json +1 -0
  91. package/dist/locale/zh-CN.json +2 -1
  92. package/dist/locale/zh-TW.json +1 -0
  93. package/dist/node_modules/@langchain/xai/package.json +1 -1
  94. package/dist/node_modules/fs-extra/package.json +1 -1
  95. package/dist/node_modules/jsonrepair/package.json +1 -1
  96. package/dist/node_modules/just-bash/package.json +1 -1
  97. package/dist/node_modules/nodejs-snowflake/package.json +1 -1
  98. package/dist/node_modules/openai/package.json +1 -1
  99. package/dist/node_modules/zod/package.json +1 -1
  100. package/dist/server/resource/ai.js +11 -9
  101. package/dist/server/workflow/nodes/employee/index.js +2 -4
  102. package/dist/server/workflow/nodes/employee/types.d.ts +2 -2
  103. package/package.json +2 -2
  104. package/dist/ai/docs/nocobase/api/cli/app/down.md +0 -41
@@ -0,0 +1,63 @@
1
+ ---
2
+ title: "nb app autostart"
3
+ description: "nb app autostart command group reference: enable or disable autostart for local or Docker envs, and start all enabled envs in one run."
4
+ keywords: "nb app autostart,NocoBase CLI,autostart,local,docker"
5
+ ---
6
+
7
+ # nb app autostart
8
+
9
+ Manage application autostart settings.
10
+
11
+ This command group covers two kinds of work:
12
+
13
+ - enable or disable the autostart flag for one env
14
+ - start every env that already has autostart enabled
15
+
16
+ `nb app autostart` only applies to envs with a CLI-managed runtime on the current machine, namely `local` and `docker`. If an env is only a remote API connection, or is not a CLI-managed app runtime that can be started on this machine, it cannot be part of this autostart flow.
17
+
18
+ ## Usage
19
+
20
+ ```bash
21
+ nb app autostart <command>
22
+ ```
23
+
24
+ ## Subcommands
25
+
26
+ | Command | Description |
27
+ | --- | --- |
28
+ | [`nb app autostart enable`](./enable.md) | Enable the autostart flag for one env |
29
+ | [`nb app autostart disable`](./disable.md) | Disable the autostart flag for one env |
30
+ | [`nb app autostart list`](./list.md) | Show autostart status for all envs |
31
+ | [`nb app autostart run`](./run.md) | Start every env that has autostart enabled |
32
+
33
+ ## Notes
34
+
35
+ `nb app autostart enable` only marks an env as allowed to start automatically. It does not wire the env into your operating system startup flow by itself. In a real production setup, you usually still need to call `nb app autostart run` from your own host startup mechanism, such as `systemd`, a container platform startup script, or another boot process you already use.
36
+
37
+ Also, `nb app autostart run` checks each enabled env one by one. Startable envs continue through `nb app start --env <name> --yes`. Envs that should not be started automatically on the current machine show up as `skipped` or `failed` in the result table.
38
+
39
+ ## Examples
40
+
41
+ ```bash
42
+ # Enable autostart for the current env
43
+ nb app autostart enable
44
+
45
+ # Enable autostart for a specific env
46
+ nb app autostart enable --env app1 --yes
47
+
48
+ # Show autostart status
49
+ nb app autostart list
50
+
51
+ # Start every enabled env
52
+ nb app autostart run
53
+
54
+ # Show underlying startup output
55
+ nb app autostart run --verbose
56
+ ```
57
+
58
+ ## Related commands
59
+
60
+ - [`nb app start`](../start.md)
61
+ - [`nb app stop`](../stop.md)
62
+ - [`nb env list`](../../env/list.md)
63
+ - [`nb env use`](../../env/use.md)
@@ -0,0 +1,41 @@
1
+ ---
2
+ title: "nb app autostart list"
3
+ description: "nb app autostart list command reference: list autostart status for every configured env."
4
+ keywords: "nb app autostart list,NocoBase CLI,autostart,env list"
5
+ ---
6
+
7
+ # nb app autostart list
8
+
9
+ List autostart status for every configured env.
10
+
11
+ The output table includes:
12
+
13
+ - `Current`: marks the current env with `*`
14
+ - `Env`: env name
15
+ - `Kind`: env kind
16
+ - `Source`: install or source type
17
+ - `Autostart`: whether autostart is enabled
18
+
19
+ ## Usage
20
+
21
+ ```bash
22
+ nb app autostart list
23
+ ```
24
+
25
+ ## Example
26
+
27
+ ```bash
28
+ nb app autostart list
29
+ ```
30
+
31
+ ## Notes
32
+
33
+ If there are no saved envs yet, the command prints `No environments are configured.`.
34
+
35
+ This command only shows the saved CLI state. It does not check whether an app is already running, and it does not check whether your operating system startup flow already calls `nb app autostart run`. Its main purpose is to show which envs are marked for autostart in the CLI config.
36
+
37
+ ## Related commands
38
+
39
+ - [`nb app autostart enable`](./enable.md)
40
+ - [`nb app autostart disable`](./disable.md)
41
+ - [`nb env list`](../../env/list.md)
@@ -0,0 +1,50 @@
1
+ ---
2
+ title: "nb app autostart run"
3
+ description: "nb app autostart run command reference: start every env that has application autostart enabled."
4
+ keywords: "nb app autostart run,NocoBase CLI,autostart,batch start"
5
+ ---
6
+
7
+ # nb app autostart run
8
+
9
+ Start every env that has application autostart enabled.
10
+
11
+ This command is typically called after the host system boots, through your own startup mechanism. The CLI reads all saved envs, filters the ones that have autostart enabled, and then tries to start them one by one.
12
+
13
+ ## Usage
14
+
15
+ ```bash
16
+ nb app autostart run [flags]
17
+ ```
18
+
19
+ ## Flags
20
+
21
+ | Flag | Type | Description |
22
+ | --- | --- | --- |
23
+ | `--verbose` | boolean | Show raw startup output from the underlying local or Docker command |
24
+
25
+ ## Examples
26
+
27
+ ```bash
28
+ nb app autostart run
29
+ nb app autostart run --verbose
30
+ ```
31
+
32
+ ## Notes
33
+
34
+ If no env has autostart enabled, the command prints `No environments have app autostart enabled.`.
35
+
36
+ During execution, the CLI processes each enabled env one by one:
37
+
38
+ - startable envs show up as `started`
39
+ - envs that should not be started automatically on the current machine show up as `skipped`
40
+ - envs that fail during startup show up as `failed`
41
+
42
+ Internally, this command calls `nb app start --env <name> --yes`. If you pass `--verbose`, that flag is forwarded to the underlying startup flow as well.
43
+
44
+ If any result is `failed`, the command exits with an error and prints `Some app autostart envs failed to start.`. This makes failures visible in `systemd`, CI, or other host startup mechanisms.
45
+
46
+ ## Related commands
47
+
48
+ - [`nb app autostart enable`](./enable.md)
49
+ - [`nb app start`](../start.md)
50
+ - [`nb app logs`](../logs.md)
@@ -1,12 +1,12 @@
1
1
  ---
2
- title: "nb app"
3
- description: "nb app command reference: manage NocoBase app runtime, including start, stop, restart, logs, cleanup, and upgrades."
4
- keywords: "nb app,NocoBase CLI,app runtime,start,stop,logs,upgrade"
2
+ title: 'nb app'
3
+ description: 'nb app command reference: manage the NocoBase application runtime, including start, stop, restart, logs, and upgrade.'
4
+ keywords: 'nb app,NocoBase CLI,start,stop,restart,logs,upgrade'
5
5
  ---
6
6
 
7
7
  # nb app
8
8
 
9
- Manage the runtime of a selected NocoBase env. npm/Git envs run local app commands; Docker envs manage app containers from the saved env config.
9
+ Manage the NocoBase application runtime. In npm/Git env, application commands run in the local source directory; in Docker env, application containers are managed based on the saved configuration.
10
10
 
11
11
  ## Usage
12
12
 
@@ -16,27 +16,30 @@ nb app <command>
16
16
 
17
17
  ## Subcommands
18
18
 
19
- | Command | Description |
20
- | --- | --- |
21
- | [`nb app start`](./start.md) | Start the app or recreate the Docker container |
22
- | [`nb app stop`](./stop.md) | Stop the app or remove the Docker container |
23
- | [`nb app restart`](./restart.md) | Stop and then start the app |
24
- | [`nb app logs`](./logs.md) | View app logs |
25
- | [`nb app down`](./down.md) | Stop and clean up local runtime resources |
26
- | [`nb app upgrade`](./upgrade.md) | Stop the app, replace the source or image, then start it again |
19
+ | Command | Description |
20
+ | -------------------------------- | --------------------------------------------------------------------------- |
21
+ | [`nb app start`](./start.md) | Start the application or recreate the Docker container |
22
+ | [`nb app stop`](./stop.md) | Stop the application or clean up the Docker container |
23
+ | [`nb app restart`](./restart.md) | Stop the application first, then start it |
24
+ | [`nb app autostart`](./autostart/index.md) | Manage app autostart flags and start all enabled envs |
25
+ | [`nb app logs`](./logs.md) | View application logs |
26
+ | [`nb app upgrade`](./upgrade.md) | Stop the application, replace the source code or image, then start it again |
27
27
 
28
28
  ## Examples
29
29
 
30
30
  ```bash
31
31
  nb app start --env app1
32
32
  nb app restart --env app1
33
+ nb app autostart enable --env app1 --yes
34
+ nb app autostart run
33
35
  nb app logs --env app1
34
- nb app stop --env app1
35
- nb app down --env app1 --all --force
36
+ nb app upgrade --env app1 --skip-download
37
+ nb app stop --env app1 --with-db
36
38
  ```
37
39
 
38
- ## Related Commands
40
+ ## Related commands
39
41
 
40
42
  - [`nb env info`](../env/info.md)
43
+ - [`nb env remove`](../env/remove.md)
41
44
  - [`nb db ps`](../db/ps.md)
42
45
  - [`nb source download`](../source/download.md)
@@ -1,12 +1,12 @@
1
1
  ---
2
2
  title: "nb app restart"
3
- description: "nb app restart command reference: restart the NocoBase app for a selected env and recreate the Docker app container from saved env config when needed."
3
+ description: "nb app restart command reference: restart the NocoBase app for a selected env; when applicable, the CLI first synchronizes the commercial plugins allowed by the current license, then local envs automatically complete install or upgrade preparation during restart, and Docker envs recreate the app container from saved env config when needed."
4
4
  keywords: "nb app restart,NocoBase CLI,restart app,Docker"
5
5
  ---
6
6
 
7
7
  # nb app restart
8
8
 
9
- Stop and then start the NocoBase app for a selected env. Local envs reuse the `nb app stop` and `nb app start` flow; Docker envs remove the current container first, then recreate the app container from saved env config.
9
+ Stop and then start the NocoBase app for a selected env. When applicable, the CLI first synchronizes the commercial plugins allowed by the current license. Then local envs reuse the `nb app stop` and `nb app start` flow and, by default, automatically complete install or upgrade preparation before starting again; Docker envs remove the current container first, then recreate the app container from saved env config.
10
10
 
11
11
  ## Usage
12
12
 
@@ -20,11 +20,7 @@ nb app restart [flags]
20
20
  | --- | --- | --- |
21
21
  | `--env`, `-e` | string | CLI env name to restart; uses the current env if omitted |
22
22
  | `--yes`, `-y` | boolean | When an explicitly passed `--env` targets a different env than the current env, skip the interactive confirmation prompt |
23
- | `--quickstart` | boolean | Start the app in quickstart mode after stopping |
24
- | `--port`, `-p` | string | Override the `appPort` saved in env config |
25
23
  | `--daemon`, `-d` / `--no-daemon` | boolean | Whether to run in daemon mode after stopping; enabled by default |
26
- | `--instances`, `-i` | integer | Number of instances to run after stopping |
27
- | `--launch-mode` | string | Launch mode: `pm2` or `node` |
28
24
  | `--verbose` | boolean | Show underlying stop and start command output |
29
25
 
30
26
  ## Examples
@@ -32,18 +28,14 @@ nb app restart [flags]
32
28
  ```bash
33
29
  nb app restart
34
30
  nb app restart --env local
35
- nb app restart --env local --quickstart
36
- nb app restart --env local --port 12000
37
31
  nb app restart --env local --no-daemon
38
- nb app restart --env local --instances 2
39
- nb app restart --env local --launch-mode pm2
40
32
  nb app restart --env local --verbose
41
33
  nb app restart --env local-docker
42
34
  ```
43
35
 
44
36
  If you explicitly pass `--env` and it differs from the current env, the CLI asks for confirmation first. In non-interactive terminals or AI agent sessions, add `--yes` yourself or run `nb env use <name>` first and try again.
45
37
 
46
- Whenever the CLI needs to wait for readiness, it checks `__health_check`: it prints one waiting line first, then one progress line every 10 seconds until the app becomes available or times out. If you pass `--no-daemon` for a local env, the app runs in the foreground, so the CLI does not keep waiting for the readiness check after startup.
38
+ By default, when applicable, the CLI first runs `nb license plugins sync --skip-if-no-license` to synchronize the commercial plugins allowed by the current license. Then local envs automatically complete any required install or upgrade preparation before starting again, and Docker envs complete that step before recreating the container. Whenever the CLI needs to wait for readiness, it checks `__health_check`: it prints one waiting line first, then one progress line every 10 seconds until the app becomes available or times out. If you pass `--no-daemon` for a local env, the app runs in the foreground, so the CLI does not keep waiting for the readiness check after startup.
47
39
 
48
40
  ## Related Commands
49
41
 
@@ -1,12 +1,12 @@
1
1
  ---
2
2
  title: "nb app start"
3
- description: "nb app start command reference: start the NocoBase app for a selected env and recreate the Docker app container from saved env config when needed."
3
+ description: "nb app start command reference: start the NocoBase app for a selected env; when applicable, the CLI first synchronizes the commercial plugins allowed by the current license, then local envs automatically complete install or upgrade preparation before startup, and Docker envs recreate the app container from saved env config."
4
4
  keywords: "nb app start,NocoBase CLI,start app,Docker,pm2"
5
5
  ---
6
6
 
7
7
  # nb app start
8
8
 
9
- Start the NocoBase app for a selected env. npm/Git installations run local app commands; Docker installations recreate the saved app container from the saved env config.
9
+ Start the NocoBase app for a selected env. When applicable, the CLI first synchronizes the commercial plugins allowed by the current license. Then npm/Git installations automatically complete install or upgrade preparation before running local app commands; Docker installations recreate the saved app container from saved env config.
10
10
 
11
11
  ## Usage
12
12
 
@@ -20,11 +20,7 @@ nb app start [flags]
20
20
  | --- | --- | --- |
21
21
  | `--env`, `-e` | string | CLI env name to start; uses the current env if omitted |
22
22
  | `--yes`, `-y` | boolean | When an explicitly passed `--env` targets a different env than the current env, skip the interactive confirmation prompt |
23
- | `--quickstart` | boolean | Start the app in quickstart mode |
24
- | `--port`, `-p` | string | Override the `appPort` saved in env config |
25
23
  | `--daemon`, `-d` / `--no-daemon` | boolean | Whether to run in daemon mode; enabled by default |
26
- | `--instances`, `-i` | integer | Number of instances to run |
27
- | `--launch-mode` | string | Launch mode: `pm2` or `node` |
28
24
  | `--verbose` | boolean | Show underlying local or Docker command output |
29
25
 
30
26
  ## Examples
@@ -32,19 +28,15 @@ nb app start [flags]
32
28
  ```bash
33
29
  nb app start
34
30
  nb app start --env local
35
- nb app start --env local --quickstart
36
- nb app start --env local --port 12000
37
31
  nb app start --env local --daemon
38
32
  nb app start --env local --no-daemon
39
- nb app start --env local --instances 2
40
- nb app start --env local --launch-mode pm2
41
33
  nb app start --env local --verbose
42
34
  nb app start --env local-docker
43
35
  ```
44
36
 
45
37
  If you explicitly pass `--env` and it differs from the current env, the CLI asks for confirmation first. In non-interactive terminals or AI agent sessions, add `--yes` yourself or run `nb env use <name>` first and try again.
46
38
 
47
- By default, local envs start in daemon mode and Docker envs recreate the app container from saved env config. Whenever the CLI needs to wait for readiness, it checks `__health_check`: it prints one waiting line first, then one progress line every 10 seconds until the app becomes available or times out.
39
+ By default, when applicable, the CLI first runs `nb license plugins sync --skip-if-no-license` to synchronize the commercial plugins allowed by the current license. Then local envs automatically complete any required install or upgrade preparation before starting in daemon mode, and Docker envs recreate the app container from saved env config. Whenever the CLI needs to wait for readiness, it checks `__health_check`: it prints one waiting line first, then one progress line every 10 seconds until the app becomes available or times out.
48
40
 
49
41
  If you pass `--no-daemon` for a local env, the app runs in the foreground. In that case, the CLI does not keep waiting for the readiness check after startup.
50
42
 
@@ -1,12 +1,14 @@
1
1
  ---
2
- title: "nb app stop"
3
- description: "nb app stop command reference: stop the NocoBase app and remove the Docker app container for a selected env."
4
- keywords: "nb app stop,NocoBase CLI,stop app,Docker"
2
+ title: 'nb app stop'
3
+ description: 'nb app stop command reference: stop the NocoBase application for the specified env, and optionally clean up the CLI-managed built-in database container as well.'
4
+ keywords: 'nb app stop,NocoBase CLI,stop application,Docker,with-db,built-in database'
5
5
  ---
6
6
 
7
7
  # nb app stop
8
8
 
9
- Stop the NocoBase app for a selected env. npm/Git installations stop local app processes; Docker installations remove the saved app container.
9
+ Stop the NocoBase application for the specified env. For npm/Git installations, this stops the local application process. For Docker installations, it removes the saved application container.
10
+
11
+ If you pass `--with-db` and this env uses a CLI-managed built-in database, the command will also clean up the database container. If this env uses an external database, the database resources will not be touched.
10
12
 
11
13
  ## Usage
12
14
 
@@ -16,25 +18,33 @@ nb app stop [flags]
16
18
 
17
19
  ## Parameters
18
20
 
19
- | Parameter | Type | Description |
20
- | --- | --- | --- |
21
- | `--env`, `-e` | string | CLI env name to stop; uses the current env if omitted |
22
- | `--yes`, `-y` | boolean | When an explicitly passed `--env` targets a different env than the current env, skip the interactive confirmation prompt |
23
- | `--verbose` | boolean | Show underlying local or Docker command output |
21
+ | Parameter | Type | Description |
22
+ | ------------- | ------- | ------------------------------------------------------------------------------------------------------------ |
23
+ | `--env`, `-e` | string | Name of the CLI env to stop; uses the current env if omitted |
24
+ | `--yes`, `-y` | boolean | Skip the interactive confirmation when the env explicitly pointed to by `--env` differs from the current env |
25
+ | `--with-db` | boolean | Also clean up the database container when a CLI-managed built-in database exists |
26
+ | `--verbose` | boolean | Show underlying local or Docker command output |
24
27
 
25
28
  ## Examples
26
29
 
27
30
  ```bash
28
31
  nb app stop
29
32
  nb app stop --env local
33
+ nb app stop --env local --with-db
30
34
  nb app stop --env local --verbose
31
35
  nb app stop --env local-docker
32
36
  ```
33
37
 
34
- If you explicitly pass `--env` and it differs from the current env, the CLI asks for confirmation first. In non-interactive terminals or AI agent sessions, add `--yes` yourself or run `nb env use <name>` first and try again.
38
+ ## Notes
39
+
40
+ The CLI checks whether the specified env matches the current env only when you explicitly pass `--env`. If you explicitly specify a different env, an interactive terminal will ask for confirmation first; in a non-interactive terminal or AI agent scenario, you need to explicitly add `--yes` yourself, or run `nb env use <name>` first and then try again.
41
+
42
+ `--with-db` affects only CLI-managed built-in database containers. In general, if you only want to stop the application itself, you do not need this flag; add it only when you also want to stop the built-in database runtime on the current machine.
43
+
44
+ This command can operate only on local or Docker runtimes on the current machine. If an env is only an HTTP API connection, or is a reserved SSH env, `nb app stop` cannot stop it remotely for you.
35
45
 
36
- ## Related Commands
46
+ ## Related commands
37
47
 
38
48
  - [`nb app start`](./start.md)
39
49
  - [`nb app restart`](./restart.md)
40
- - [`nb app down`](./down.md)
50
+ - [`nb env remove`](../env/remove.md)
@@ -1,12 +1,12 @@
1
1
  ---
2
2
  title: "nb app upgrade"
3
- description: "nb app upgrade command reference: stop the app, replace the saved source or image, then start the selected NocoBase app again."
3
+ description: "nb app upgrade command reference: stop the app, replace the saved source or image, then upgrade and start the selected NocoBase app."
4
4
  keywords: "nb app upgrade,NocoBase CLI,upgrade,update,Docker image"
5
5
  ---
6
6
 
7
7
  # nb app upgrade
8
8
 
9
- Upgrade a selected NocoBase app. The CLI stops the current app, replaces the saved source or image by default, synchronizes commercial plugins, quickstarts the app again, and refreshes the env runtime at the end. Docker envs recreate the app container from the saved env config during startup.
9
+ Upgrade a selected NocoBase app. The CLI stops the current app, replaces the saved source or image by default, synchronizes commercial plugins, upgrades and starts the app, and refreshes the env runtime at the end. Docker envs recreate the app container from the saved env config during startup.
10
10
 
11
11
  ## Usage
12
12
 
@@ -21,7 +21,7 @@ nb app upgrade [flags]
21
21
  | `--env`, `-e` | string | CLI env name to upgrade; uses the current env if omitted |
22
22
  | `--yes`, `-y` | boolean | When an explicitly passed `--env` targets a different env than the current env, skip the interactive confirmation prompt |
23
23
  | `--force`, `-f` | boolean | Skip the upgrade confirmation prompt. Required in non-interactive terminals and AI agent sessions |
24
- | `--skip-download`, `-s` | boolean | Restart from the currently saved local source or Docker image without downloading updates first; also skips `nb license plugins sync` |
24
+ | `--skip-download`, `-s` | boolean | Skip source or image download and run the upgrade-and-start flow against the currently saved local source or Docker image; also skips `nb license plugins sync` |
25
25
  | `--version` | string | Override the target version for this upgrade; when the upgrade succeeds, the new version is written back to `downloadVersion` in the env config |
26
26
  | `--verbose` | boolean | Show underlying update and restart command output |
27
27
 
@@ -48,13 +48,13 @@ By default, `nb app upgrade` runs these steps:
48
48
  1. `nb app stop`
49
49
  2. `nb source download --replace`
50
50
  3. `nb license plugins sync --skip-if-no-license`
51
- 4. `nb app start --quickstart`
51
+ 4. `nb app start`
52
52
  5. Save the new `downloadVersion` when needed
53
53
  6. `nb env update`
54
54
 
55
- When `--skip-download` is passed, the CLI skips steps 2 and 3 and restarts the currently saved source or image directly. If `--version` is also passed, the CLI does not download that version during this run; instead it only saves it as the new `downloadVersion` after a successful restart so later upgrades can use it.
55
+ When `--skip-download` is passed, the CLI skips steps 2 and 3 and runs the upgrade-and-start flow directly against the currently saved source or image. If `--version` is also passed, the CLI does not download that version during this run; instead it only saves it as the new `downloadVersion` after a successful start so later upgrades can use it.
56
56
 
57
- Step 4 waits for the app to pass `__health_check`. During this wait, the CLI prints one waiting line first, then one progress line every 10 seconds until the app is ready or the health check times out.
57
+ Step 4 automatically completes any required upgrade preparation for the current code state, then waits for the app to pass `__health_check`. During this wait, the CLI prints one waiting line first, then one progress line every 10 seconds until the app is ready or the health check times out.
58
58
 
59
59
  If the final `nb env update` step fails, the upgrade still counts as successful. The CLI prints a warning and tells you to run `nb env update <envName>` manually afterward.
60
60
 
@@ -0,0 +1,49 @@
1
+ ---
2
+ title: 'nb backup create'
3
+ description: 'nb backup create command reference: create a backup through the selected env and download the backup file locally.'
4
+ keywords: 'nb backup create,NocoBase CLI,create backup,download backup,nbdata'
5
+ ---
6
+
7
+ # nb backup create
8
+
9
+ Create a backup through the selected env and download the backup file locally. When `--output` is omitted, the CLI saves the file to the current working directory and reuses the backup filename returned by the remote side—usually `backup_*.nbdata`.
10
+
11
+ ## Usage
12
+
13
+ ```bash
14
+ nb backup create [flags]
15
+ ```
16
+
17
+ ## Parameters
18
+
19
+ | Parameter | Type | Description |
20
+ | --------------------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
21
+ | `--env`, `-e` | string | Name of the CLI env for which to create the backup; uses the current env when omitted |
22
+ | `--yes`, `-y` | boolean | Skip interactive confirmation when the env explicitly pointed to by `--env` differs from the current env |
23
+ | `--output`, `-o` | string | Download target path. Saves to the current directory when omitted; if it points to an existing directory, the remote backup filename is appended automatically |
24
+ | `--json-output`, `-j` | boolean | Output the final result as JSON, including the fields `env`, `name`, and `output` |
25
+
26
+ ## Examples
27
+
28
+ ```bash
29
+ nb backup create
30
+ nb backup create --output ./backups
31
+ nb backup create --output ./backups/base.nbdata
32
+ nb backup create --env e2e --output ./backups --yes
33
+ nb backup create --env e2e --json-output
34
+ ```
35
+
36
+ ## Notes
37
+
38
+ The CLI checks whether `--env` matches the current env only when you explicitly pass `--env`. If a different env is explicitly specified, an interactive terminal asks for confirmation first; in a non-interactive terminal or AI agent scenario, you need to explicitly add `--yes` yourself, or run `nb env use <name>` first and then retry.
39
+
40
+ The creation flow is divided into two steps: first, it calls the backup API of the target env to create a remote backup, then it polls the status every 2 seconds; after the backup is complete, it downloads the file locally. If the remote side still returns `inProgress: true` after 600 seconds, the command exits with a timeout.
41
+
42
+ `--output` can be either a file path or an existing directory path. The CLI recognizes only an existing path as a directory; if the path does not exist, it is treated as a target file path.
43
+
44
+ After passing `--json-output`, the CLI no longer outputs progress text and instead prints the final JSON result directly. This mode is better suited for further consumption by scripts and agent workflows.
45
+
46
+ ## Related commands
47
+
48
+ - [`nb backup restore`](./restore.md)
49
+ - [`nb env update`](../env/update.md)
@@ -0,0 +1,46 @@
1
+ ---
2
+ title: 'nb backup'
3
+ description: 'nb backup command reference: create a NocoBase backup and download it locally, or restore a local backup file to the target env.'
4
+ keywords: 'nb backup,NocoBase CLI,backup,restore,nbdata'
5
+ ---
6
+
7
+ # nb backup
8
+
9
+ Create or restore a NocoBase backup. `nb backup create` creates a remote backup in the target env and then downloads the backup file locally; `nb backup restore` uploads a local backup file to the target env and waits for the application to become ready again.
10
+
11
+ ## Usage
12
+
13
+ ```bash
14
+ nb backup <command>
15
+ ```
16
+
17
+ ## Subcommands
18
+
19
+ | Command | Description |
20
+ | ----------------------------------- | --------------------------------------------- |
21
+ | [`nb backup create`](./create.md) | Create a backup and download it locally |
22
+ | [`nb backup restore`](./restore.md) | Restore a local backup file to the target env |
23
+
24
+ ## Examples
25
+
26
+ ```bash
27
+ nb backup create
28
+ nb backup create --env app1 --output ./backups
29
+ nb backup create --env app1 --output ./backups/result.nbdata
30
+ nb backup restore --env app1 --file ./backups/backup_20260520_190408_8397.nbdata --yes --force
31
+ ```
32
+
33
+ ## Notes
34
+
35
+ Before execution, the CLI first checks whether the target env exposes runtime commands related to backup. If commands are missing, it automatically refreshes the runtime cache once; if the `nb api backup ...` capability is still missing after the refresh, it means the target env has not yet enabled or synchronized backup/restore capabilities, and you need to handle the target application itself first.
36
+
37
+ Specifically:
38
+
39
+ - `nb backup create` depends on `nb api backup create`, `nb api backup status`, and `nb api backup download`
40
+ - `nb backup restore` depends on `nb api backup restore-upload`
41
+
42
+ ## Related commands
43
+
44
+ - [`nb env update`](../env/update.md)
45
+ - [`nb app restart`](../app/restart.md)
46
+ - [`nb api`](../api/index.md)
@@ -0,0 +1,46 @@
1
+ ---
2
+ title: 'nb backup restore'
3
+ description: 'Reference for the nb backup restore command: restore a local backup file to the target env.'
4
+ keywords: 'nb backup restore,NocoBase CLI,restore backup,restore,nbdata'
5
+ ---
6
+
7
+ # nb backup restore
8
+
9
+ Restore a local backup file to the target env. Typically, a `*.nbdata` file is used here. Restoring will overwrite the target application data, so the CLI asks for confirmation by default.
10
+
11
+ ## Usage
12
+
13
+ ```bash
14
+ nb backup restore --file <path> [flags]
15
+ ```
16
+
17
+ ## Options
18
+
19
+ | Option | Type | Description |
20
+ | -------------- | ------- | ------------------------------------------------------------------------------------------------------------------ |
21
+ | `--env`, `-e` | string | Name of the CLI env to restore to; uses the current env if omitted |
22
+ | `--yes`, `-y` | boolean | Skip interactive confirmation when the env explicitly specified by `--env` is different from the current env |
23
+ | `--file`, `-f` | string | Path to the local backup file; required |
24
+ | `--force` | boolean | Confirm overwriting application data; must be passed explicitly in non-interactive terminals and AI agent sessions |
25
+
26
+ ## Examples
27
+
28
+ ```bash
29
+ nb backup restore --file ./backups/base.nbdata --force
30
+ nb backup restore --env e2e --file ./backups/base.nbdata --yes --force
31
+ ```
32
+
33
+ ## Notes
34
+
35
+ The CLI checks whether `--env` matches the current env only when you pass `--env` explicitly. If a different env is explicitly specified, an interactive terminal will ask for confirmation first; in non-interactive terminals or AI agent scenarios, you must explicitly add `--yes` yourself, or run `nb env use <name>` first and then try again.
36
+
37
+ Before execution, the CLI checks whether the path specified by `--file` exists and confirms that it is a regular file. If the path does not exist or points to a directory, the command fails immediately.
38
+
39
+ If `--force` is not provided, an interactive terminal will prompt for confirmation again, clearly indicating that this restore will overwrite application data. In non-interactive terminals and AI agent sessions, if `--force` is missing, the CLI refuses to execute directly and provides a rerun hint that can be copied directly. If it is also a cross-env operation, you usually need to provide both `--yes` and `--force`.
40
+
41
+ After the upload succeeds, the CLI continues waiting for the target application to pass `__health_check` again. In other words, when the command returns successfully, the application has usually been restored to an accessible state.
42
+
43
+ ## Related commands
44
+
45
+ - [`nb backup create`](./create.md)
46
+ - [`nb app restart`](../app/restart.md)
@@ -1,12 +1,12 @@
1
1
  ---
2
- title: "nb config delete"
3
- description: "nb config delete command reference: delete an explicitly configured CLI setting."
4
- keywords: "nb config delete,NocoBase CLI,configuration"
2
+ title: 'nb config delete'
3
+ description: 'nb config delete command reference: delete an explicitly set CLI configuration item.'
4
+ keywords: 'nb config delete,NocoBase CLI,delete configuration'
5
5
  ---
6
6
 
7
7
  # nb config delete
8
8
 
9
- Delete an explicitly configured CLI setting. After deletion, the CLI falls back to the default value for that key.
9
+ Delete an explicitly set CLI configuration item. After deletion, the configuration item falls back to its default value.
10
10
 
11
11
  ## Usage
12
12
 
@@ -16,22 +16,24 @@ nb config delete <key>
16
16
 
17
17
  ## Parameters
18
18
 
19
- | Parameter | Type | Description |
20
- | --- | --- | --- |
21
- | `<key>` | string | Configuration key: `locale`, `update.policy`, `license.pkg-url`, `docker.network`, `docker.container-prefix`, `bin.docker`, `bin.git`, or `bin.yarn` |
19
+ | Parameter | Type | Description |
20
+ | --------- | ------ | --------------------------------------------------------------------------------------------------------------------------------------- |
21
+ | `<key>` | string | Configuration item name. See [`nb config`](./index.md) for supported values |
22
22
 
23
23
  ## Examples
24
24
 
25
25
  ```bash
26
26
  nb config delete locale
27
27
  nb config delete update.policy
28
- nb config delete license.pkg-url
29
28
  nb config delete docker.network
30
29
  nb config delete docker.container-prefix
30
+ nb config delete proxy.nb-cli-root
31
+ nb config delete proxy.upstream-host
32
+ nb config delete bin.nginx
31
33
  nb config delete bin.git
32
34
  ```
33
35
 
34
- ## Related Commands
36
+ ## Related commands
35
37
 
36
38
  - [`nb config set`](./set.md)
37
39
  - [`nb config get`](./get.md)