@nocobase/plugin-ai 2.1.0-beta.43 → 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.
- package/dist/ai/docs/nocobase/ai/install-upgrade-migration.mdx +127 -132
- package/dist/ai/docs/nocobase/ai-dev/capabilities.md +1 -1
- package/dist/ai/docs/nocobase/ai-dev/index.md +1 -1
- package/dist/ai/docs/nocobase/ai-dev/watermark-plugin.md +1 -1
- package/dist/ai/docs/nocobase/api/cli/app/autostart/disable.md +44 -0
- package/dist/ai/docs/nocobase/api/cli/app/autostart/enable.md +44 -0
- package/dist/ai/docs/nocobase/api/cli/app/autostart/index.md +63 -0
- package/dist/ai/docs/nocobase/api/cli/app/autostart/list.md +41 -0
- package/dist/ai/docs/nocobase/api/cli/app/autostart/run.md +50 -0
- package/dist/ai/docs/nocobase/api/cli/app/index.md +18 -15
- package/dist/ai/docs/nocobase/api/cli/app/restart.md +3 -11
- package/dist/ai/docs/nocobase/api/cli/app/start.md +3 -11
- package/dist/ai/docs/nocobase/api/cli/app/stop.md +22 -12
- package/dist/ai/docs/nocobase/api/cli/app/upgrade.md +6 -6
- package/dist/ai/docs/nocobase/api/cli/backup/create.md +49 -0
- package/dist/ai/docs/nocobase/api/cli/backup/index.md +46 -0
- package/dist/ai/docs/nocobase/api/cli/backup/restore.md +46 -0
- package/dist/ai/docs/nocobase/api/cli/config/delete.md +11 -9
- package/dist/ai/docs/nocobase/api/cli/config/get.md +11 -8
- package/dist/ai/docs/nocobase/api/cli/config/index.md +28 -24
- package/dist/ai/docs/nocobase/api/cli/config/set.md +14 -12
- package/dist/ai/docs/nocobase/api/cli/db/stop.md +10 -11
- package/dist/ai/docs/nocobase/api/cli/env/index.md +25 -23
- package/dist/ai/docs/nocobase/api/cli/env/info.md +12 -10
- package/dist/ai/docs/nocobase/api/cli/env/proxy/caddy.md +108 -0
- package/dist/ai/docs/nocobase/api/cli/env/proxy/index.md +54 -0
- package/dist/ai/docs/nocobase/api/cli/env/proxy/nginx.md +104 -0
- package/dist/ai/docs/nocobase/api/cli/env/remove.md +18 -14
- package/dist/ai/docs/nocobase/api/cli/env/update.md +115 -14
- package/dist/ai/docs/nocobase/api/cli/index.md +66 -52
- package/dist/ai/docs/nocobase/api/cli/init.md +244 -62
- package/dist/ai/docs/nocobase/api/cli/license/activate.md +13 -12
- package/dist/ai/docs/nocobase/api/cli/license/index.md +2 -2
- package/dist/ai/docs/nocobase/api/cli/plugin/import.md +74 -0
- package/dist/ai/docs/nocobase/api/cli/plugin/index.md +4 -2
- package/dist/ai/docs/nocobase/get-started/deployment/how-to-deploy-nocobase-faster.mdx +384 -0
- package/dist/ai/docs/nocobase/get-started/install-upgrade-plugins.mdx +16 -10
- package/dist/ai/docs/nocobase/get-started/upgrading/docker.md +1 -1
- package/dist/ai/docs/nocobase/index.md +3 -3
- package/dist/ai/docs/nocobase/multi-app/multi-app/app-block-and-switcher.md +68 -0
- package/dist/ai/docs/nocobase/multi-app/multi-app/app-sso.md +71 -0
- package/dist/ai/docs/nocobase/multi-app/multi-app/index.md +9 -1
- package/dist/ai/docs/nocobase/multi-app/multi-app/sub-app-api.md +112 -0
- package/dist/ai/docs/nocobase/plugin-development/client/appendix/faq.md +3 -3
- package/dist/ai/docs/nocobase/plugin-development/client/component/index.md +1 -1
- package/dist/ai/docs/nocobase/plugin-development/client/ctx/common-capabilities.md +2 -2
- package/dist/ai/docs/nocobase/plugin-development/client/ctx/index.md +1 -1
- package/dist/ai/docs/nocobase/plugin-development/client/router.md +11 -11
- package/dist/ai/docs/nocobase/quickstart/index.md +27 -0
- package/dist/ai/docs/nocobase/quickstart/installation/airgap.md +67 -0
- package/dist/ai/docs/nocobase/quickstart/installation/cli.md +205 -0
- package/dist/ai/docs/nocobase/quickstart/installation/docker-compose.md +123 -0
- package/dist/ai/docs/nocobase/quickstart/installation/env.md +101 -0
- package/dist/ai/docs/nocobase/quickstart/installation/migration.md +50 -0
- package/dist/ai/docs/nocobase/quickstart/operations/backup-restore.md +94 -0
- package/dist/ai/docs/nocobase/quickstart/operations/manage-app.md +166 -0
- package/dist/ai/docs/nocobase/quickstart/operations/multi-environment.md +171 -0
- package/dist/ai/docs/nocobase/quickstart/plugins/third-party.md +86 -0
- package/dist/ai/docs/nocobase/quickstart/production/index.md +163 -0
- package/dist/ai/docs/nocobase/quickstart/production/reverse-proxy/caddy.md +158 -0
- package/dist/ai/docs/nocobase/quickstart/production/reverse-proxy/index.md +100 -0
- package/dist/ai/docs/nocobase/quickstart/production/reverse-proxy/nginx.md +166 -0
- package/dist/ai/docs/nocobase/quickstart/release-management.md +1 -0
- package/dist/ai/docs/nocobase/solution/all-in-one/installation.md +181 -0
- package/dist/ai/docs/nocobase/solution/crm/changelog.md +0 -3
- package/dist/ai/docs/nocobase/solution/crm/installation.md +6 -76
- package/dist/ai/docs/nocobase/solution/crm/v1.md +6 -35
- package/dist/ai/docs/nocobase/solution/ticket-system/changelog.md +0 -2
- package/dist/ai/docs/nocobase/solution/ticket-system/installation.md +6 -69
- package/dist/ai/docs/nocobase/workflow/advanced/options.md +45 -1
- package/dist/client/{406.15c09d98faa2ccf1.js → 406.9a530334eae8cede.js} +1 -1
- package/dist/client/{428.e9f38da3b0d8b498.js → 428.431a00d29107058e.js} +1 -1
- package/dist/client/index.js +2 -2
- package/dist/client-v2/index.js +1 -1
- package/dist/externalVersion.js +18 -18
- package/dist/locale/de-DE.json +1 -0
- package/dist/locale/en-US.json +2 -1
- package/dist/locale/es-ES.json +1 -0
- package/dist/locale/fr-FR.json +1 -0
- package/dist/locale/hu-HU.json +1 -0
- package/dist/locale/id-ID.json +1 -0
- package/dist/locale/it-IT.json +1 -0
- package/dist/locale/ja-JP.json +1 -0
- package/dist/locale/ko-KR.json +1 -0
- package/dist/locale/nl-NL.json +1 -0
- package/dist/locale/pt-BR.json +1 -0
- package/dist/locale/ru-RU.json +1 -0
- package/dist/locale/tr-TR.json +1 -0
- package/dist/locale/uk-UA.json +1 -0
- package/dist/locale/vi-VN.json +1 -0
- package/dist/locale/zh-CN.json +2 -1
- package/dist/locale/zh-TW.json +1 -0
- package/dist/node_modules/@langchain/xai/package.json +1 -1
- package/dist/node_modules/fs-extra/package.json +1 -1
- package/dist/node_modules/jsonrepair/package.json +1 -1
- package/dist/node_modules/just-bash/package.json +1 -1
- package/dist/node_modules/nodejs-snowflake/package.json +1 -1
- package/dist/node_modules/openai/package.json +1 -1
- package/dist/node_modules/zod/package.json +1 -1
- package/dist/server/llm-providers/anthropic.js +17 -23
- package/dist/server/llm-providers/dashscope.js +3 -3
- package/dist/server/llm-providers/deepseek.js +2 -2
- package/dist/server/llm-providers/google-genai.js +17 -22
- package/dist/server/llm-providers/kimi/provider.js +4 -4
- package/dist/server/llm-providers/mimo.js +2 -2
- package/dist/server/llm-providers/ollama.js +14 -21
- package/dist/server/llm-providers/openai/completions.js +2 -2
- package/dist/server/llm-providers/openai/embedding.js +1 -1
- package/dist/server/llm-providers/openai/responses.js +2 -2
- package/dist/server/llm-providers/provider.d.ts +3 -1
- package/dist/server/llm-providers/provider.js +55 -22
- package/dist/server/llm-providers/xai.js +2 -2
- package/dist/server/resource/ai.js +11 -9
- package/dist/server/workflow/nodes/employee/index.js +2 -4
- package/dist/server/workflow/nodes/employee/types.d.ts +2 -2
- package/package.json +2 -2
- package/dist/ai/docs/nocobase/api/cli/app/down.md +0 -41
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
---
|
|
2
|
-
title:
|
|
3
|
-
description:
|
|
4
|
-
keywords:
|
|
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
|
-
|
|
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
|
|
20
|
-
|
|
|
21
|
-
| `<key>` | string | Configuration
|
|
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
|
|
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:
|
|
3
|
-
description:
|
|
4
|
-
keywords:
|
|
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
|
|
9
|
+
Manage the default CLI configuration. The current configuration items mainly fall into these groups:
|
|
10
10
|
|
|
11
|
-
- `locale`
|
|
12
|
-
- `
|
|
13
|
-
- `
|
|
14
|
-
- `
|
|
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
|
|
16
|
+
## Common configuration items
|
|
21
17
|
|
|
22
|
-
|
|
|
18
|
+
| Configuration item | Default value | Description |
|
|
23
19
|
| --- | --- | --- |
|
|
24
|
-
| `locale` |
|
|
25
|
-
| `update.policy` | `prompt` |
|
|
26
|
-
| `license.pkg-url` | `https://pkg.nocobase.com/` |
|
|
27
|
-
| `docker.network` | `nocobase` | Default Docker
|
|
28
|
-
| `docker.container-prefix` | `nb` | Default
|
|
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)
|
|
44
|
-
| [`nb config set`](./set.md)
|
|
45
|
-
| [`nb config delete`](./delete.md) | Delete an explicitly configured
|
|
46
|
-
| [`nb config list`](./list.md)
|
|
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
|
|
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:
|
|
3
|
-
description:
|
|
4
|
-
keywords:
|
|
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
|
|
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
|
|
20
|
-
|
|
|
21
|
-
| `<key>` | string | Configuration
|
|
22
|
-
| `<value>` | string | Configuration value
|
|
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
|
-
|
|
43
|
+
`update.policy` supports `prompt`, `auto`, and `off`, and the default value is `prompt`.
|
|
40
44
|
|
|
41
|
-
|
|
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:
|
|
3
|
-
description:
|
|
4
|
-
keywords:
|
|
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
|
|
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
|
-
##
|
|
17
|
+
## Options
|
|
18
18
|
|
|
19
|
-
|
|
|
20
|
-
|
|
|
21
|
-
| `--env`, `-e` | string
|
|
22
|
-
| `--verbose`
|
|
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
|
|
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:
|
|
3
|
-
description:
|
|
4
|
-
keywords:
|
|
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
|
|
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
|
-
|
|
11
|
+
Starting from this version, the CLI separates two concepts:
|
|
12
12
|
|
|
13
|
-
- `current env`: the env currently used by the
|
|
14
|
-
- `last env`: the
|
|
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
|
|
25
|
-
|
|
|
26
|
-
| [`nb env add`](./add.md)
|
|
27
|
-
| [`nb env current`](./current.md) |
|
|
28
|
-
| [`nb env update`](./update.md)
|
|
29
|
-
| [`nb env list`](./list.md)
|
|
30
|
-
| [`nb env status`](./status.md)
|
|
31
|
-
| [`nb env info`](./info.md)
|
|
32
|
-
| [`nb env
|
|
33
|
-
| [`nb env
|
|
34
|
-
| [`nb 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
|
-
##
|
|
51
|
+
## session mode
|
|
50
52
|
|
|
51
|
-
Session mode is
|
|
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
|
-
|
|
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
|
|
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:
|
|
3
|
-
description:
|
|
4
|
-
keywords:
|
|
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
|
-
|
|
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
|
|
20
|
-
|
|
|
21
|
-
| `[name]`
|
|
22
|
-
| `--json`
|
|
23
|
-
| `--
|
|
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
|
|
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)
|