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

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
@@ -1,12 +1,12 @@
1
1
  ---
2
- title: "nb config get"
3
- description: "nb config get command reference: get the effective value for a CLI configuration key."
4
- keywords: "nb config get,NocoBase CLI,configuration"
2
+ title: 'nb config get'
3
+ description: 'nb config get command reference: read the effective value of a CLI configuration item.'
4
+ keywords: 'nb config get,NocoBase CLI,read configuration'
5
5
  ---
6
6
 
7
7
  # nb config get
8
8
 
9
- Get the effective value for a CLI configuration key. If no explicit value is set, the default value is returned.
9
+ Read the effective value of the specified CLI configuration item. If it has not been explicitly set, the default value is returned.
10
10
 
11
11
  ## Usage
12
12
 
@@ -16,9 +16,9 @@ nb config get <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
 
@@ -28,10 +28,13 @@ nb config get update.policy
28
28
  nb config get license.pkg-url
29
29
  nb config get docker.network
30
30
  nb config get docker.container-prefix
31
+ nb config get proxy.nb-cli-root
32
+ nb config get proxy.upstream-host
33
+ nb config get bin.nginx
31
34
  nb config get bin.git
32
35
  ```
33
36
 
34
- ## Related Commands
37
+ ## Related commands
35
38
 
36
39
  - [`nb config set`](./set.md)
37
40
  - [`nb config list`](./list.md)
@@ -1,34 +1,34 @@
1
1
  ---
2
- title: "nb config"
3
- description: "nb config command reference: manage NocoBase CLI default configuration."
4
- keywords: "nb config,NocoBase CLI,configuration,defaults"
2
+ title: 'nb config'
3
+ description: 'nb config command reference: manage the default configuration items of the NocoBase CLI.'
4
+ keywords: 'nb config,NocoBase CLI,configuration,default configuration'
5
5
  ---
6
6
 
7
7
  # nb config
8
8
 
9
- Manage CLI configuration defaults. Supported keys:
9
+ Manage the default CLI configuration. The current configuration items mainly fall into these groups:
10
10
 
11
- - `locale`
12
- - `update.policy`
13
- - `license.pkg-url`
14
- - `docker.network`
15
- - `docker.container-prefix`
16
- - `bin.docker`
17
- - `bin.git`
18
- - `bin.yarn`
11
+ - CLI itself: `locale`, `update.policy`, `license.pkg-url`
12
+ - Docker runtime: `docker.network`, `docker.container-prefix`
13
+ - External executables: `bin.docker`, `bin.caddy`, `bin.git`, `bin.nginx`, `bin.yarn`
14
+ - Proxy generation: `proxy.nb-cli-root`, `proxy.upstream-host`
19
15
 
20
- ## Common Keys
16
+ ## Common configuration items
21
17
 
22
- | Key | Default | Description |
18
+ | Configuration item | Default value | Description |
23
19
  | --- | --- | --- |
24
- | `locale` | current CLI locale resolution | Override the CLI locale |
25
- | `update.policy` | `prompt` | Startup update behavior: `prompt`, `auto`, or `off` |
26
- | `license.pkg-url` | `https://pkg.nocobase.com/` | Package registry for commercial packages |
27
- | `docker.network` | `nocobase` | Default Docker network used by CLI-managed Docker apps |
28
- | `docker.container-prefix` | `nb` | Default container prefix used by CLI-managed Docker apps |
20
+ | `locale` | Resolved according to the CLI's current rules | Override the language used by the CLI |
21
+ | `update.policy` | `prompt` | Update policy at startup: `prompt`, `auto`, or `off` |
22
+ | `license.pkg-url` | `https://pkg.nocobase.com/` | Override the commercial extension package download URL |
23
+ | `docker.network` | `nocobase` | Default network for Docker applications managed by the CLI |
24
+ | `docker.container-prefix` | `nb` | Default prefix for Docker containers managed by the CLI |
29
25
  | `bin.docker` | `docker` | Override the Docker executable path |
26
+ | `bin.caddy` | `caddy` | Override the Caddy executable path |
30
27
  | `bin.git` | `git` | Override the Git executable path |
28
+ | `bin.nginx` | `nginx` | Override the Nginx executable path |
31
29
  | `bin.yarn` | `yarn` | Override the Yarn executable path |
30
+ | `proxy.nb-cli-root` | CLI root, usually the current user's home directory | Map the `.nocobase` path to the root path visible to the proxy process |
31
+ | `proxy.upstream-host` | `127.0.0.1` | Host used when the proxy forwards traffic back to the NocoBase app |
32
32
 
33
33
  ## Usage
34
34
 
@@ -40,10 +40,10 @@ nb config <command>
40
40
 
41
41
  | Command | Description |
42
42
  | --- | --- |
43
- | [`nb config get`](./get.md) | Get the effective value for a configuration key |
44
- | [`nb config set`](./set.md) | Set a configuration value |
45
- | [`nb config delete`](./delete.md) | Delete an explicitly configured value |
46
- | [`nb config list`](./list.md) | List explicitly configured values |
43
+ | [`nb config get`](./get.md) | Read the effective value of a configuration item |
44
+ | [`nb config set`](./set.md) | Set a configuration item |
45
+ | [`nb config delete`](./delete.md) | Delete an explicitly configured item |
46
+ | [`nb config list`](./list.md) | List the configuration items that are currently explicitly set |
47
47
 
48
48
  ## Examples
49
49
 
@@ -51,13 +51,17 @@ nb config <command>
51
51
  nb config list
52
52
  nb config get update.policy
53
53
  nb config set update.policy auto
54
+ nb config get proxy.nb-cli-root
55
+ nb config set proxy.nb-cli-root /workspace
56
+ nb config set proxy.upstream-host host.docker.internal
54
57
  nb config get docker.network
55
58
  nb config set docker.network nocobase
59
+ nb config set bin.nginx /usr/sbin/nginx
56
60
  nb config set bin.git /usr/bin/git
57
61
  nb config delete docker.container-prefix
58
62
  ```
59
63
 
60
- ## Related Commands
64
+ ## Related commands
61
65
 
62
66
  - [`nb init`](../init.md)
63
67
  - [`nb license`](../license/index.md)
@@ -1,12 +1,12 @@
1
1
  ---
2
- title: "nb config set"
3
- description: "nb config set command reference: set a CLI configuration value."
4
- keywords: "nb config set,NocoBase CLI,configuration"
2
+ title: 'nb config set'
3
+ description: 'nb config set command reference: set a CLI configuration item.'
4
+ keywords: 'nb config set,NocoBase CLI,set configuration'
5
5
  ---
6
6
 
7
7
  # nb config set
8
8
 
9
- Set a CLI configuration value. Supported keys are `locale`, `update.policy`, `license.pkg-url`, `docker.network`, `docker.container-prefix`, `bin.docker`, `bin.git`, and `bin.yarn`.
9
+ Set a CLI configuration item. See [`nb config`](./index.md) for the supported configuration keys.
10
10
 
11
11
  ## Usage
12
12
 
@@ -16,10 +16,10 @@ nb config set <key> <value>
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` |
22
- | `<value>` | string | Configuration value; must not be empty |
19
+ | Parameter | Type | Description |
20
+ | --------- | ------ | --------------------------------------------------------------------------------------------------------------------------------------- |
21
+ | `<key>` | string | Configuration item name. See [`nb config`](./index.md) for supported values |
22
+ | `<value>` | string | Configuration value, cannot be empty |
23
23
 
24
24
  ## Examples
25
25
 
@@ -30,17 +30,19 @@ nb config set license.pkg-url https://pkg.nocobase.com/
30
30
  nb config set docker.network nocobase
31
31
  nb config set docker.container-prefix nb
32
32
  nb config set bin.docker /usr/local/bin/docker
33
+ nb config set bin.caddy /opt/homebrew/bin/caddy
33
34
  nb config set bin.git /usr/bin/git
35
+ nb config set bin.nginx /usr/sbin/nginx
36
+ nb config set proxy.nb-cli-root /workspace
37
+ nb config set proxy.upstream-host host.docker.internal
34
38
  nb config set bin.yarn yarn
35
39
  ```
36
40
 
37
41
  ## Notes
38
42
 
39
- When setting `license.pkg-url`, the CLI normalizes the URL so it ends with `/`.
43
+ `update.policy` supports `prompt`, `auto`, and `off`, and the default value is `prompt`.
40
44
 
41
- `update.policy` supports `prompt`, `auto`, and `off`. The default is `prompt`.
42
-
43
- ## Related Commands
45
+ ## Related commands
44
46
 
45
47
  - [`nb config get`](./get.md)
46
48
  - [`nb config delete`](./delete.md)
@@ -1,12 +1,12 @@
1
1
  ---
2
- title: "nb db stop"
3
- description: "nb db stop command reference: stop the built-in database container for a selected env."
4
- keywords: "nb db stop,NocoBase CLI,stop database,Docker"
2
+ title: 'nb db stop'
3
+ description: 'nb db stop command reference: Stop the built-in database container for the specified env.'
4
+ keywords: 'nb db stop,NocoBase CLI,stop database,Docker'
5
5
  ---
6
6
 
7
7
  # nb db stop
8
8
 
9
- Stop the built-in database container for a selected env. This command only applies to envs created with a CLI-managed built-in database.
9
+ Stop the built-in database container for the specified env. This command only applies to envs with CLI-managed built-in databases enabled.
10
10
 
11
11
  ## Usage
12
12
 
@@ -14,12 +14,12 @@ Stop the built-in database container for a selected env. This command only appli
14
14
  nb db stop [flags]
15
15
  ```
16
16
 
17
- ## Parameters
17
+ ## Options
18
18
 
19
- | Parameter | Type | Description |
20
- | --- | --- | --- |
21
- | `--env`, `-e` | string | CLI env name whose built-in database should stop; uses the current env if omitted |
22
- | `--verbose` | boolean | Show underlying Docker command output |
19
+ | Option | Type | Description |
20
+ | ------------- | ------- | ---------------------------------------------------------------------------------------------- |
21
+ | `--env`, `-e` | string | Name of the CLI env whose built-in database should be stopped; uses the current env if omitted |
22
+ | `--verbose` | boolean | Show the underlying Docker command output |
23
23
 
24
24
  ## Examples
25
25
 
@@ -29,8 +29,7 @@ nb db stop --env app1
29
29
  nb db stop --env app1 --verbose
30
30
  ```
31
31
 
32
- ## Related Commands
32
+ ## Related commands
33
33
 
34
34
  - [`nb db start`](./start.md)
35
35
  - [`nb app stop`](../app/stop.md)
36
- - [`nb app down`](../app/down.md)
@@ -1,17 +1,17 @@
1
1
  ---
2
- title: "nb env"
3
- description: "nb env command reference: manage NocoBase CLI envs, including add, inspect current env, check status, switch, authenticate, and remove."
4
- keywords: "nb env,NocoBase CLI,environment management,env,current env,authentication,OpenAPI"
2
+ title: 'nb env'
3
+ description: 'nb env command reference: manage NocoBase CLI envs, including adding, viewing the current env, checking status, switching, updating, generating proxy configs, authenticating, and removing.'
4
+ keywords: 'nb env,NocoBase CLI,environment management,env,current env,proxy,authentication,OpenAPI'
5
5
  ---
6
6
 
7
7
  # nb env
8
8
 
9
- Manage saved NocoBase CLI envs. An env stores API URL, authentication info, local app paths, database config, and runtime command cache.
9
+ Manage saved NocoBase CLI envs. An env stores connection and local runtime information such as the API address, authentication info, local app path, and database configuration.
10
10
 
11
- In the current model, the CLI separates two concepts:
11
+ Starting from this version, the CLI separates two concepts:
12
12
 
13
- - `current env`: the env currently used by the active shell or agent runtime, isolated by `NB_SESSION_ID` when available
14
- - `last env`: the globally last-used env, used as a fallback when session mode is not enabled
13
+ - `current env`: the env currently used by the current shell or agent runtime, isolated by `NB_SESSION_ID` when possible
14
+ - `last env`: the last env used globally, used as a fallback when session mode is not enabled
15
15
 
16
16
  ## Usage
17
17
 
@@ -21,17 +21,18 @@ nb env <command>
21
21
 
22
22
  ## Subcommands
23
23
 
24
- | Command | Description |
25
- | --- | --- |
26
- | [`nb env add`](./add.md) | Save a NocoBase API endpoint and switch to that env |
27
- | [`nb env current`](./current.md) | Show the currently effective env |
28
- | [`nb env update`](./update.md) | Refresh OpenAPI Schema and runtime command cache from the app |
29
- | [`nb env list`](./list.md) | List configured envs |
30
- | [`nb env status`](./status.md) | Show status for the current env, one env, or all envs |
31
- | [`nb env info`](./info.md) | Show details for a single env |
32
- | [`nb env remove`](./remove.md) | Remove env configuration |
33
- | [`nb env auth`](./auth.md) | Run OAuth login for a saved env |
34
- | [`nb env use`](./use.md) | Switch current env |
24
+ | Command | Description |
25
+ | -------------------------------- | ---------------------------------------------------------------------------------- |
26
+ | [`nb env add`](./add.md) | Save a NocoBase API endpoint and switch to this env |
27
+ | [`nb env current`](./current.md) | View the currently effective env |
28
+ | [`nb env update`](./update.md) | Update a saved env configuration and automatically handle follow-up sync as needed |
29
+ | [`nb env list`](./list.md) | List configured envs |
30
+ | [`nb env status`](./status.md) | View the status of the current env, a specified env, or all envs |
31
+ | [`nb env info`](./info.md) | View detailed information for a single env |
32
+ | [`nb env proxy`](./proxy/index.md) | Show proxy provider subcommands and generate Nginx or Caddy configs for one managed env |
33
+ | [`nb env remove`](./remove.md) | Remove the env configuration after stopping the managed runtime |
34
+ | [`nb env auth`](./auth.md) | Perform OAuth login for a saved env |
35
+ | [`nb env use`](./use.md) | Switch the current env |
35
36
 
36
37
  ## Examples
37
38
 
@@ -41,20 +42,21 @@ nb env current
41
42
  nb env list
42
43
  nb env status
43
44
  nb env info app1
45
+ nb env proxy nginx --env app1
44
46
  nb env update app1
45
47
  nb env use app1
46
48
  nb env auth app1
47
49
  ```
48
50
 
49
- ## Session mode
51
+ ## session mode
50
52
 
51
- Session mode is the default recommendation. It keeps `current env` isolated across different terminals, shells, and agent runtimes, so parallel work does not affect each other.
53
+ Session mode is recommended by default. This allows the `current env` in different terminals, different shells, or different agent runtimes to stay isolated from each other without affecting one another in parallel.
52
54
 
53
- When session mode is not enabled, `nb env use` updates the global `last env`, and other sessions without isolation may also be affected.
55
+ If session mode is not enabled, `nb env use` updates the global `last env`, and other sessions without session isolation will also be affected.
54
56
 
55
- See [`nb session setup`](../session/setup.md) to enable it.
57
+ See [`nb session setup`](../session/setup.md) for how to enable it.
56
58
 
57
- ## Related Commands
59
+ ## Related commands
58
60
 
59
61
  - [`nb init`](../init.md)
60
62
  - [`nb api`](../api/index.md)
@@ -1,12 +1,12 @@
1
1
  ---
2
- title: "nb env info"
3
- description: "nb env info command reference: inspect app, database, API, and authentication config for a NocoBase CLI env."
4
- keywords: "nb env info,NocoBase CLI,environment details,configuration"
2
+ title: 'nb env info'
3
+ description: 'nb env info command reference: View the app, database, API, and authentication configuration of the specified NocoBase CLI env.'
4
+ keywords: 'nb env info,NocoBase CLI,environment details,configuration'
5
5
  ---
6
6
 
7
7
  # nb env info
8
8
 
9
- Show details for a single env, including app, database, API, and authentication configuration.
9
+ View detailed information for a single env, including app, database, API, and authentication configuration.
10
10
 
11
11
  ## Usage
12
12
 
@@ -16,21 +16,23 @@ nb env info [name] [flags]
16
16
 
17
17
  ## Parameters
18
18
 
19
- | Parameter | Type | Description |
20
- | --- | --- | --- |
21
- | `[name]` | string | Configured environment name to inspect; uses the current env if omitted |
22
- | `--json` | boolean | Output JSON |
23
- | `--show-secrets` | boolean | Show tokens, passwords, and other secrets in plain text |
19
+ | Parameter | Type | Description |
20
+ | ---------------- | ------- | -------------------------------------------------------------------------------------------- |
21
+ | `[name]` | string | Name of the configured environment to view; uses the current env when omitted |
22
+ | `--json` | boolean | Output JSON |
23
+ | `--field` | string | Return only one field using a dot path, such as `app.url`, `app.appPath`, or `api.auth.type` |
24
+ | `--show-secrets` | boolean | Show tokens, passwords, and other secrets in plain text |
24
25
 
25
26
  ## Examples
26
27
 
27
28
  ```bash
28
29
  nb env info app1
29
30
  nb env info app1 --json
31
+ nb env info app1 --field app.appPath
30
32
  nb env info app1 --show-secrets
31
33
  ```
32
34
 
33
- ## Related Commands
35
+ ## Related commands
34
36
 
35
37
  - [`nb env list`](./list.md)
36
38
  - [`nb app start`](../app/start.md)
@@ -0,0 +1,108 @@
1
+ ---
2
+ title: 'nb env proxy caddy'
3
+ description: 'nb env proxy caddy command reference: generate a Caddy proxy config for one CLI-managed env.'
4
+ keywords: 'nb env proxy caddy,NocoBase CLI,caddy,reverse proxy,proxy configuration'
5
+ ---
6
+
7
+ # nb env proxy caddy
8
+
9
+ `nb env proxy caddy` generates a Caddy proxy config for one CLI-managed env. It fits these cases well: you already have a domain, want HTTPS running quickly, and do not want to maintain too many TLS details yourself.
10
+
11
+ This command only works for managed envs whose runtime is reachable from the current machine, which means `local` or `docker`. It does not currently work for envs that only have a remote API connection or for SSH envs.
12
+
13
+ ## Usage
14
+
15
+ ```bash
16
+ nb env proxy caddy [name] [flags]
17
+ ```
18
+
19
+ ## Parameters
20
+
21
+ | Parameter | Type | Description |
22
+ | --- | --- | --- |
23
+ | `[name]` | string | Name of the configured env to generate a proxy config for. Uses the current env when omitted |
24
+ | `--env`, `-e` | string | Explicitly specify the env name. This form is usually recommended |
25
+ | `--output`, `-o` | string | Output file path. Only writes the generated route config and does not additionally create `app.caddy` or the shared main config |
26
+ | `--host` | string | Host written into the entry config, such as `example.com` or `localhost` |
27
+ | `--port` | string | Port written into the entry config. This is the proxy entry port, not the upstream NocoBase app port |
28
+ | `--install` | boolean | Install the shared proxy config into the Caddy main config |
29
+ | `--reload` | boolean | Validate and reload Caddy after writing files |
30
+ | `--print` | boolean | Print the generated route config directly instead of writing files |
31
+
32
+ ## Default output
33
+
34
+ If you do not pass `--output`, the CLI maintains these files under `~/.nocobase/proxy/caddy/`:
35
+
36
+ | File | Purpose |
37
+ | --- | --- |
38
+ | `~/.nocobase/proxy/caddy/<env>/generated.caddy` | Actual reverse-proxy config managed by the CLI and overwritten on every run |
39
+ | `~/.nocobase/proxy/caddy/<env>/app.caddy` | Editable site entry file where you can add site-level config |
40
+ | `~/.nocobase/proxy/caddy/nocobase.caddy` | Shared main config that imports every env `app.caddy` |
41
+
42
+ Where:
43
+
44
+ - `generated.caddy` is only meant to be managed by the CLI and should not be edited manually
45
+ - `app.caddy` is editable, but you should keep the managed import inserted by the CLI
46
+ - `nocobase.caddy` is mainly used by `--install`
47
+
48
+ :::warning Note
49
+
50
+ If you need to add site-level Caddy config, edit `app.caddy`. `generated.caddy` will be overwritten the next time you run `nb env proxy caddy`.
51
+
52
+ :::
53
+
54
+ If you pass `--output`, the CLI only writes the generated config to that file and does not additionally create or update `app.caddy` or the shared main config.
55
+
56
+ ## Related configuration items
57
+
58
+ These CLI configuration items directly affect the generated Caddy output:
59
+
60
+ | Configuration item | Default value | Description |
61
+ | --- | --- | --- |
62
+ | `proxy.nb-cli-root` | CLI root, usually the current user's home directory | Map the `.nocobase` path to the root path that Caddy actually sees |
63
+ | `proxy.upstream-host` | `127.0.0.1` | Host used when the proxy forwards traffic back to the NocoBase app |
64
+ | `bin.caddy` | `caddy` | Path to the Caddy executable used by `--install` or `--reload` |
65
+
66
+ Most setups do not need to change `proxy.nb-cli-root`. You usually need it only when Caddy runs in another container, mount root, or path view.
67
+
68
+ ## Notes
69
+
70
+ - `--host` is important. Caddy decides whether to manage HTTPS based on the site address. In production, try to pass a domain that already resolves to the current server
71
+ - `--port` must be an integer between `1` and `65535`
72
+ - The upstream NocoBase app port comes from the saved env `appPort`, not from `--port`
73
+ - If the command says the env is missing `appPort`, run `nb env update <name>` first, or explicitly save it with `nb env update <name> --app-port <port>`
74
+ - If you change settings such as `app-port` or `app-public-path` with `nb env update`, you will usually need to rerun `nb env proxy caddy` afterward
75
+ - `--print` cannot be combined with `--install` or `--reload`
76
+ - `--output` cannot be combined with `--install` or `--reload`
77
+
78
+ ## Examples
79
+
80
+ ```bash
81
+ # Generate a Caddy config for the current env
82
+ nb env proxy caddy
83
+
84
+ # Generate a config for one env
85
+ nb env proxy caddy --env demo
86
+
87
+ # Write the public host and port into the entry config
88
+ nb env proxy caddy --env demo --host demo.local.nocobase.com --port 8080
89
+
90
+ # Print the generated route config without writing files
91
+ nb env proxy caddy --env demo --print
92
+
93
+ # Write the generated route fragment to a custom file
94
+ nb env proxy caddy --env demo --output ./generated.caddy
95
+
96
+ # Map the .nocobase path when Caddy runs under another mount root
97
+ nb config set proxy.nb-cli-root /workspace
98
+
99
+ # Install the shared config into the Caddy main config and reload immediately
100
+ nb env proxy caddy --env demo --install --reload
101
+ ```
102
+
103
+ ## Related commands
104
+
105
+ - [`nb env proxy`](./index.md)
106
+ - [`nb env proxy nginx`](./nginx.md)
107
+ - [`nb env update`](../update.md)
108
+ - [`nb config`](../../config/index.md)
@@ -0,0 +1,54 @@
1
+ ---
2
+ title: 'nb env proxy'
3
+ description: 'nb env proxy command-group reference: view and choose the Nginx and Caddy proxy subcommands.'
4
+ keywords: 'nb env proxy,NocoBase CLI,nginx,caddy,reverse proxy,proxy configuration'
5
+ ---
6
+
7
+ # nb env proxy
8
+
9
+ In NocoBase CLI, `nb env proxy` is the entry point for reverse-proxy related commands. You mainly use it to discover and choose the Nginx and Caddy provider subcommands.
10
+
11
+ If your app has already been saved as a CLI-managed env, and that env is `local` or `docker`, picking one provider subcommand is usually enough.
12
+
13
+ ## Usage
14
+
15
+ ```bash
16
+ nb env proxy
17
+ ```
18
+
19
+ ## Which subcommand should you open first
20
+
21
+ | I want to... | Go here |
22
+ | --- | --- |
23
+ | Keep using Nginx for sites, certificates, caching, or access control | [`nb env proxy nginx`](./nginx.md) |
24
+ | Get HTTPS running quickly and maintain fewer TLS details | [`nb env proxy caddy`](./caddy.md) |
25
+ | Adjust env settings that may affect proxy output, such as `app-port` or `app-public-path` | [`nb env update`](../update.md) |
26
+
27
+ ## Notes
28
+
29
+ - `nb env proxy` does not have its own flags
30
+ - Use `nb env proxy nginx` or `nb env proxy caddy` when you want to generate configs
31
+ - Both subcommands only work for managed envs whose runtime is reachable from the current machine, which means `local` or `docker`
32
+ - If you change settings such as `app-port` or `app-public-path` with `nb env update`, you will usually need to rerun the matching proxy subcommand afterward
33
+ - This command group does not currently work for envs that only have a remote API connection or for SSH envs
34
+
35
+ ## Examples
36
+
37
+ ```bash
38
+ # Show command-group help
39
+ nb env proxy
40
+
41
+ # Generate an Nginx config for one env
42
+ nb env proxy nginx --env demo --host demo.local.nocobase.com
43
+
44
+ # Generate a Caddy config for one env
45
+ nb env proxy caddy --env demo --host demo.local.nocobase.com
46
+ ```
47
+
48
+ ## Related commands
49
+
50
+ - [`nb env proxy nginx`](./nginx.md)
51
+ - [`nb env proxy caddy`](./caddy.md)
52
+ - [`nb env update`](../update.md)
53
+ - [`nb env info`](../info.md)
54
+ - [`nb config`](../../config/index.md)
@@ -0,0 +1,104 @@
1
+ ---
2
+ title: 'nb env proxy nginx'
3
+ description: 'nb env proxy nginx command reference: generate Nginx proxy config files and helper files for one CLI-managed env.'
4
+ keywords: 'nb env proxy nginx,NocoBase CLI,nginx,reverse proxy,proxy configuration'
5
+ ---
6
+
7
+ # nb env proxy nginx
8
+
9
+ `nb env proxy nginx` generates Nginx proxy config files and helper files for one CLI-managed env. It fits these cases well: you already use Nginx to manage sites, or you still want to manage certificates, caching, or access control yourself.
10
+
11
+ This command only works for managed envs whose runtime is reachable from the current machine, which means `local` or `docker`. It does not currently work for envs that only have a remote API connection or for SSH envs.
12
+
13
+ ## Usage
14
+
15
+ ```bash
16
+ nb env proxy nginx [name] [flags]
17
+ ```
18
+
19
+ ## Parameters
20
+
21
+ | Parameter | Type | Description |
22
+ | --- | --- | --- |
23
+ | `[name]` | string | Name of the configured env to generate a proxy config for. Uses the current env when omitted |
24
+ | `--env`, `-e` | string | Explicitly specify the env name. This form is usually recommended |
25
+ | `--host` | string | Host written into the entry config, such as `example.com` or `localhost` |
26
+ | `--port` | string | Port written into the entry config. This is the proxy entry port, not the upstream NocoBase app port |
27
+ | `--install` | boolean | Install the shared proxy config into the Nginx main config |
28
+ | `--reload` | boolean | Validate and reload Nginx after writing files |
29
+ | `--print` | boolean | Print the rendered `app.conf` directly instead of writing files |
30
+
31
+ ## Default output
32
+
33
+ `nb env proxy nginx` maintains these files under `~/.nocobase/proxy/nginx/`:
34
+
35
+ | File | Purpose |
36
+ | --- | --- |
37
+ | `~/.nocobase/proxy/nginx/<env>/app.conf` | Editable site entry file. The CLI refreshes the managed block inside it, and you can add site-level config around that block |
38
+ | `~/.nocobase/proxy/nginx/<env>/public/index-v1.html` | v1 SPA fallback page generated from the current active client's `index.html` |
39
+ | `~/.nocobase/proxy/nginx/<env>/public/index-v2.html` | v2 SPA fallback page generated from the current active client's `v/index.html` |
40
+ | `~/.nocobase/proxy/nginx/nocobase.conf` | Shared main config that includes every env `app.conf` |
41
+ | `~/.nocobase/proxy/nginx/snippets/` | Shared snippets directory copied from built-in templates |
42
+
43
+ Where:
44
+
45
+ - `app.conf` is editable, but you should keep the managed block between `# BEGIN NocoBase managed config` and `# END NocoBase managed config`
46
+ - `index-v1.html` and `index-v2.html` automatically rewrite asset URLs according to the current env subpath, active client version, and `CDN_BASE_URL`
47
+ - `nocobase.conf` is mainly used by `--install`
48
+ - Files under `public/` and `snippets/` are usually not meant to be edited manually and will be resynced the next time you run the command
49
+
50
+ :::warning Note
51
+
52
+ If you need to add site-level Nginx config, edit `app.conf`. Do not manually edit managed files under `public/` or `snippets/`, because they will be overwritten the next time you run `nb env proxy nginx`.
53
+
54
+ :::
55
+
56
+ ## Related configuration items
57
+
58
+ These CLI configuration items directly affect the generated Nginx output:
59
+
60
+ | Configuration item | Default value | Description |
61
+ | --- | --- | --- |
62
+ | `proxy.nb-cli-root` | CLI root, usually the current user's home directory | Map the `.nocobase` path to the root path that Nginx actually sees |
63
+ | `proxy.upstream-host` | `127.0.0.1` | Host used when the proxy forwards traffic back to the NocoBase app |
64
+ | `bin.nginx` | `nginx` | Path to the Nginx executable used by `--install` or `--reload` |
65
+
66
+ Most setups do not need to change `proxy.nb-cli-root`. You usually need it only when Nginx runs in another container, mount root, or path view.
67
+
68
+ ## Notes
69
+
70
+ - `--port` must be an integer between `1` and `65535`
71
+ - The upstream NocoBase app port comes from the saved env `appPort`, not from `--port`
72
+ - If the command says the env is missing `appPort`, run `nb env update <name>` first, or explicitly save it with `nb env update <name> --app-port <port>`
73
+ - If you change settings such as `app-port` or `app-public-path` with `nb env update`, you will usually need to rerun `nb env proxy nginx` afterward
74
+ - `--print` cannot be combined with `--install` or `--reload`
75
+ - The Nginx provider does not support `--output`
76
+
77
+ ## Examples
78
+
79
+ ```bash
80
+ # Generate an Nginx config for the current env
81
+ nb env proxy nginx
82
+
83
+ # Generate a config for one env
84
+ nb env proxy nginx --env demo
85
+
86
+ # Write the public host and port into the entry config
87
+ nb env proxy nginx --env demo --host demo.local.nocobase.com --port 8080
88
+
89
+ # Print the rendered app.conf without writing files
90
+ nb env proxy nginx --env demo --print
91
+
92
+ # Map the .nocobase path when Nginx runs under another mount root
93
+ nb config set proxy.nb-cli-root /workspace
94
+
95
+ # Install the shared config into the Nginx main config and reload immediately
96
+ nb env proxy nginx --env demo --install --reload
97
+ ```
98
+
99
+ ## Related commands
100
+
101
+ - [`nb env proxy`](./index.md)
102
+ - [`nb env proxy caddy`](./caddy.md)
103
+ - [`nb env update`](../update.md)
104
+ - [`nb config`](../../config/index.md)