查博克语name
部署并管理你的 查博坎语Name 服务从终端.
快开始
# 1. Install
npm install -g @chabokan.net/cli
# 2. Sign in (or use an API token: chabok login -t <token>)
chabok login
# 3. See what you have
chabok service list
# 4. Deploy the project in the current directory
cd my-project
chabok deploy
要反复部署同一项目,而不每次选择服务,请添加一个
chabok.json 转到其根:
{
"service": "my-app"
}
礛 chabok deploy 一个人就够了.
文件不包含在使用 .chabokignore后退为
.dockerignore 接下来 .gitignore运行 CHABOK_DEBUG=true 完全看出来
什么被跳过.
使用量
$ npm install -g @chabokan.net/cli
$ chabok COMMAND
running command...
$ chabok (--version|-v)
@chabokan.net/cli/0.9.1 darwin-arm64 node-v22.23.2
$ chabok --help [COMMAND]
USAGE
$ chabok COMMAND
...
环境变量
| 变量 | 说明 |
|---|---|
CHABOK_DEBUG | 设定为 true 以打印全部错误细节(状态代码、端点、错误代码、响应机构),并在部署时打印被忽略的文件日志. |
CHABOK_API_URL | 覆盖 API 基础 URL 。 默认为 https://apihub.chabokan.net/fa/api/v1/。 。 。 . |
CHABOK_INSECURE_TLS | 设定为 true 以跳过 TLS 证书验证。 仅针对有自签证书的服务器——它会禁用防被截取,因此CLI在活动时都会发出警告. |
CHABOK_NO_UPDATE_CHECK | 设置到任何值以禁用“ 新版本可用” 检查 。 也很荣幸 NO_UPDATE_NOTIFIER,当 CI 已经设定. |
CHABOK_NPM_REGISTRY | npm 用于更新检查的注册 。 默认为 https://registry.npmjs.org。 。 。 . |
http_proxy 编号 : https_proxy | 通过 HTTP 代理请求路由 . |
全权证书存于 ~/.chabok.json 与 0600 权限(只能由您读取).
更新检查旨在避免妨碍您:它与登记册联系 大部分每24小时,1.5秒后放弃, 写下通知 因此它不会污染管道输出, 并保持缄默任何失败。 如果你是的话 离线需要1个1.5分的超时时间 之后的运行完全没有.
图标
chabok account infochabok account listchabok account removechabok account usechabok autocomplete [SHELL]chabok cloudserver createchabok cloudserver deletechabok cloudserver listchabok cloudserver restartchabok cloudserver startchabok cloudserver stopchabok deploychabok help [COMMAND]chabok loginchabok pluginschabok plugins add PLUGINchabok plugins:inspect PLUGIN...chabok plugins install PLUGINchabok plugins link PATHchabok plugins remove [PLUGIN]chabok plugins resetchabok plugins uninstall [PLUGIN]chabok plugins unlink [PLUGIN]chabok plugins updatechabok service domain addchabok service domain removechabok service listchabok service logschabok service resizechabok service restartchabok service startchabok service stopchabok versionchabok wallet list
chabok account info
显示活动账户的信息
USAGE
$ chabok account info [-h]
FLAGS
-h, --help Show CLI help.
DESCRIPTION
show information about the active account
EXAMPLES
Show the active account's details
$ chabok account info
参见代码 : src/命令/账户/信息.ts
chabok account list
列出您登录到的账户
USAGE
$ chabok account list [-h]
FLAGS
-h, --help Show CLI help.
DESCRIPTION
list the accounts you are logged in to
EXAMPLES
Show every logged-in account and which one is active
$ chabok account list
参见代码 : src/命令/账户/列表.ts
chabok account remove
从账户中签出并忘记其存储的代号
USAGE
$ chabok account remove [-h]
FLAGS
-h, --help Show CLI help.
DESCRIPTION
sign out of an account and forget its stored token
EXAMPLES
Pick the account to sign out of
$ chabok account remove
参见代码 : src/commands/ account/ remove.ts (中文(简体) )
chabok account use
切换活动账户
USAGE
$ chabok account use [-h] [-u <value>]
FLAGS
-h, --help Show CLI help.
-u, --user=<value> email of the account to switch to
DESCRIPTION
switch the active account
EXAMPLES
Pick the account to switch to from a list
$ chabok account use
Switch to a specific account without prompting
$ chabok account use --user [email protected]
参见代码 : src/命令/账户/使用.ts
chabok autocomplete [SHELL]
显示自动完成安装指令 .
USAGE
$ chabok autocomplete [SHELL] [-r]
ARGUMENTS
[SHELL] (zsh|bash|powershell) Shell type
FLAGS
-r, --refresh-cache Refresh cache (ignores displaying instructions)
DESCRIPTION
Display autocomplete installation instructions.
EXAMPLES
$ chabok autocomplete
$ chabok autocomplete bash
$ chabok autocomplete zsh
$ chabok autocomplete powershell
$ chabok autocomplete --refresh-cache
参见代码 : @oclif/ plugin- auto 完成
chabok cloudserver create
创建新的云服务器( VPS) —— 走过提供者、 位置、 计划、 OS 和钱包
USAGE
$ chabok cloudserver create [-h] [--hostname <value>] [--wallet <value>]
FLAGS
-h, --help Show CLI help.
--hostname=<value> hostname for the new cloud server
--wallet=<value> name of the wallet to pay from
DESCRIPTION
create a new cloud server (VPS) — walks through provider, location, plan, OS and wallet
EXAMPLES
Create a cloud server, choosing every option interactively
$ chabok cloudserver create
Skip the hostname prompt
$ chabok cloudserver create --hostname my-vps
参见代码 : src/命令/云端服务器/创建.ts
chabok cloudserver delete
永久删除云服务器
USAGE
$ chabok cloudserver delete [-h] [--hostname <value>] [-y]
FLAGS
-h, --help Show CLI help.
-y, --yes skip the confirmation prompt
--hostname=<value> hostname of the cloud server to delete
DESCRIPTION
permanently delete a cloud server
EXAMPLES
Pick a cloud server from an interactive list, then confirm
$ chabok cloudserver delete
Delete a specific cloud server without a confirmation prompt
$ chabok cloudserver delete --hostname my-vps --yes
参见代码 : src/commands/cloudserver/delete.ts (中文(简体) )
chabok cloudserver list
列出您账户上的云服务器( VPS)
USAGE
$ chabok cloudserver list [-h]
FLAGS
-h, --help Show CLI help.
DESCRIPTION
list the cloud servers (VPS) on your account
EXAMPLES
List every cloud server on the active account
$ chabok cloudserver list
参见代码 : src/命令/云端服务器/列表.ts
chabok cloudserver restart
重新启动云服务器
USAGE
$ chabok cloudserver restart [-h] [--hostname <value>]
FLAGS
-h, --help Show CLI help.
--hostname=<value> hostname of the cloud server to restart
DESCRIPTION
restart a cloud server
EXAMPLES
Pick a cloud server from an interactive list
$ chabok cloudserver restart
Restart a specific cloud server by hostname
$ chabok cloudserver restart --hostname my-vps
参见代码 : src/commands/cloudserver/ recret.ts (中文(简体) )
chabok cloudserver start
打开云端服务器
USAGE
$ chabok cloudserver start [-h] [--hostname <value>]
FLAGS
-h, --help Show CLI help.
--hostname=<value> hostname of the cloud server to turn on
DESCRIPTION
turn on a cloud server
EXAMPLES
Pick a cloud server from an interactive list
$ chabok cloudserver start
Turn on a specific cloud server by hostname
$ chabok cloudserver start --hostname my-vps
参见代码 : src/命令/云端服务器/启动.ts
chabok cloudserver stop
关闭云端服务器
USAGE
$ chabok cloudserver stop [-h] [--hostname <value>]
FLAGS
-h, --help Show CLI help.
--hostname=<value> hostname of the cloud server to turn off
DESCRIPTION
turn off a cloud server
EXAMPLES
Pick a cloud server from an interactive list
$ chabok cloudserver stop
Turn off a specific cloud server by hostname
$ chabok cloudserver stop --hostname my-vps
参见代码 : src/命令/云端服务器/站点.ts
chabok deploy
上传当前工程并将其部署到服务中
USAGE
$ chabok deploy [-h] [-p <value>] [-s <value>]
FLAGS
-h, --help Show CLI help.
-p, --path=<value> project directory to upload (defaults to the current directory)
-s, --service=<value> name of the service to deploy to
DESCRIPTION
upload the current project and deploy it to a service
EXAMPLES
Deploy the current directory, picking the service from a list
$ chabok deploy
Deploy the current directory to a named service
$ chabok deploy --service my-app
Deploy a project that lives somewhere else
$ chabok deploy --path ./apps/api --service my-api
Pin the target service in the project, so plain `deploy` always works
echo '{"service": "my-app"}' > chabok.json && chabok deploy
See exactly which files are excluded from the upload
CHABOK_DEBUG=true chabok deploy -s my-app
参见代码 : src/命令/部署
chabok help [COMMAND]
显示 chabok 的帮助 .
USAGE
$ chabok help [COMMAND...] [-n]
ARGUMENTS
[COMMAND...] Command to show help for.
FLAGS
-n, --nested-commands Include all nested commands in the output.
DESCRIPTION
Display help for chabok.
参见代码 : @oclif/plugin-帮助
chabok login
注册到您的中枢. chabokan.net账户
USAGE
$ chabok login [-h] [-u <value>] [-p <value>] [-t <value>]
FLAGS
-h, --help Show CLI help.
-p, --password=<value> your password (prompted for if omitted)
-t, --token=<value> API token, for non-interactive sign-in
-u, --username=<value> your email address
DESCRIPTION
sign in to your hub.chabokan.net account
EXAMPLES
Sign in interactively (prompts for email and password)
$ chabok login
Sign in with an API token — the right choice for CI
$ chabok login --token <your-api-token>
Pass the email up front and be prompted only for the password
$ chabok login --email [email protected]
Add a second account (both stay signed in; switch with `account use`)
$ chabok login --email [email protected]
参见代码 : src/命令/日志.ts
chabok plugins
列出已安装的插件 .
USAGE
$ chabok plugins [--json] [--core]
FLAGS
--core Show core plugins.
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
List installed plugins.
EXAMPLES
$ chabok plugins
参见代码 : @ oclif/ plugin- plugins (英语)
chabok plugins add PLUGIN
在 chabok 中安装插件.
USAGE
$ chabok plugins add PLUGIN... [--json] [-f] [-h] [-s | -v]
ARGUMENTS
PLUGIN... Plugin to install.
FLAGS
-f, --force Force npm to fetch remote resources even if a local copy exists on disk.
-h, --help Show CLI help.
-s, --silent Silences npm output.
-v, --verbose Show verbose npm output.
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
Installs a plugin into chabok.
Uses npm to install plugins.
Installation of a user-installed plugin will override a core plugin.
Use the CHABOK_NPM_LOG_LEVEL environment variable to set the npm loglevel.
Use the CHABOK_NPM_REGISTRY environment variable to set the npm registry.
ALIASES
$ chabok plugins add
EXAMPLES
Install a plugin from npm registry.
$ chabok plugins add myplugin
Install a plugin from a github url.
$ chabok plugins add https://github.com/someuser/someplugin
Install a plugin from a github slug.
$ chabok plugins add someuser/someplugin
chabok plugins:inspect PLUGIN...
显示插件的安装属性.
USAGE
$ chabok plugins inspect PLUGIN...
ARGUMENTS
PLUGIN... [default: .] Plugin to inspect.
FLAGS
-h, --help Show CLI help.
-v, --verbose
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
Displays installation properties of a plugin.
EXAMPLES
$ chabok plugins inspect myplugin
参见代码 : @ oclif/ plugin- plugins (英语)
chabok plugins install PLUGIN
在 chabok 中安装插件.
USAGE
$ chabok plugins install PLUGIN... [--json] [-f] [-h] [-s | -v]
ARGUMENTS
PLUGIN... Plugin to install.
FLAGS
-f, --force Force npm to fetch remote resources even if a local copy exists on disk.
-h, --help Show CLI help.
-s, --silent Silences npm output.
-v, --verbose Show verbose npm output.
GLOBAL FLAGS
--json Format output as json.
DESCRIPTION
Installs a plugin into chabok.
Uses npm to install plugins.
Installation of a user-installed plugin will override a core plugin.
Use the CHABOK_NPM_LOG_LEVEL environment variable to set the npm loglevel.
Use the CHABOK_NPM_REGISTRY environment variable to set the npm registry.
ALIASES
$ chabok plugins add
EXAMPLES
Install a plugin from npm registry.
$ chabok plugins install myplugin
Install a plugin from a github url.
$ chabok plugins install https://github.com/someuser/someplugin
Install a plugin from a github slug.
$ chabok plugins install someuser/someplugin
参见代码 : @ oclif/ plugin- plugins (英语)
chabok plugins link PATH
将一个插件链接到用于发展的 CLI 中.
USAGE
$ chabok plugins link PATH [-h] [--install] [-v]
ARGUMENTS
PATH [default: .] path to plugin
FLAGS
-h, --help Show CLI help.
-v, --verbose
--[no-]install Install dependencies after linking the plugin.
DESCRIPTION
Links a plugin into the CLI for development.
Installation of a linked plugin will override a user-installed or core plugin.
e.g. If you have a user-installed or core plugin that has a 'hello' command, installing a linked plugin with a 'hello'
command will override the user-installed or core plugin implementation. This is useful for development work.
EXAMPLES
$ chabok plugins link myplugin
参见代码 : @ oclif/ plugin- plugins (英语)
chabok plugins remove [PLUGIN]
从 CLI 从插件中删除 .
USAGE
$ chabok plugins remove [PLUGIN...] [-h] [-v]
ARGUMENTS
[PLUGIN...] plugin to uninstall
FLAGS
-h, --help Show CLI help.
-v, --verbose
DESCRIPTION
Removes a plugin from the CLI.
ALIASES
$ chabok plugins unlink
$ chabok plugins remove
EXAMPLES
$ chabok plugins remove myplugin
chabok plugins reset
删除所有用户安装和链接的插件 .
USAGE
$ chabok plugins reset [--hard] [--reinstall]
FLAGS
--hard Delete node_modules and package manager related files in addition to uninstalling plugins.
--reinstall Reinstall all plugins after uninstalling.
参见代码 : @ oclif/ plugin- plugins (英语)
chabok plugins uninstall [PLUGIN]
从 CLI 从插件中删除 .
USAGE
$ chabok plugins uninstall [PLUGIN...] [-h] [-v]
ARGUMENTS
[PLUGIN...] plugin to uninstall
FLAGS
-h, --help Show CLI help.
-v, --verbose
DESCRIPTION
Removes a plugin from the CLI.
ALIASES
$ chabok plugins unlink
$ chabok plugins remove
EXAMPLES
$ chabok plugins uninstall myplugin
参见代码 : @ oclif/ plugin- plugins (英语)
chabok plugins unlink [PLUGIN]
从 CLI 从插件中删除 .
USAGE
$ chabok plugins unlink [PLUGIN...] [-h] [-v]
ARGUMENTS
[PLUGIN...] plugin to uninstall
FLAGS
-h, --help Show CLI help.
-v, --verbose
DESCRIPTION
Removes a plugin from the CLI.
ALIASES
$ chabok plugins unlink
$ chabok plugins remove
EXAMPLES
$ chabok plugins unlink myplugin
chabok plugins update
更新已安装的插件 .
USAGE
$ chabok plugins update [-h] [-v]
FLAGS
-h, --help Show CLI help.
-v, --verbose
DESCRIPTION
Update installed plugins.
参见代码 : @ oclif/ plugin- plugins (英语)
chabok service domain add
将自定义域连接到服务
USAGE
$ chabok service domain add [-h] [-s <value>] [-d <value>]
FLAGS
-d, --domain=<value> domain name to connect, e.g. www.example.com
-h, --help Show CLI help.
-s, --service=<value> name of the service to connect the domain to
DESCRIPTION
connect a custom domain to a service
EXAMPLES
Pick the service and enter the domain interactively
$ chabok service domain add
Connect a domain in one non-interactive command
$ chabok service domain add -s my-app -d www.example.com
参见代码 : src/命令/服务/域/add.ts
chabok service domain remove
从服务中断开自定义域名
USAGE
$ chabok service domain remove [-h] [-s <value>] [-d <value>]
FLAGS
-d, --domain=<value> domain name to disconnect
-h, --help Show CLI help.
-s, --service=<value> name of the service the domain is connected to
DESCRIPTION
disconnect a custom domain from a service
EXAMPLES
Pick the service and enter the domain interactively
$ chabok service domain remove
Disconnect a domain in one non-interactive command
$ chabok service domain remove -s my-app -d www.example.com
参见代码 : src/commands/ service/domain/remove.ts 页面存档备份,存于互联网档案馆
chabok service list
列出您账户上的服务
USAGE
$ chabok service list [-h]
FLAGS
-h, --help Show CLI help.
DESCRIPTION
list the services on your account
EXAMPLES
List every service on the active account
$ chabok service list
Switch account first, then list that account’s services
$ chabok account use -u [email protected] && chabok service list
参见代码 : src/命令/服务/列表.ts
chabok service logs
读取服务中的最新日志
USAGE
$ chabok service logs [-h] [-s <value>]
FLAGS
-h, --help Show CLI help.
-s, --service=<value> name of the service to read logs from
DESCRIPTION
read the latest logs from a service
EXAMPLES
Pick a service from an interactive list
$ chabok service logs
Read logs for a specific service
$ chabok service logs --service my-app
Search the logs for errors
$ chabok service logs -s my-app | grep -i error
Save the logs to a file
$ chabok service logs -s my-app > my-app.log
参见代码 : src/命令/服务/日志.ts
chabok service resize
更改分配给服务的内存、 CPU 和磁盘
USAGE
$ chabok service resize [-h] [-s <value>] [-r <value>] [-c <value>] [-d <value>]
FLAGS
-c, --cpu=<value> CPU cores, in steps of 0.5 (e.g. 0.5, 1, 2)
-d, --disk=<value> disk in GB, in steps of 5 (e.g. 5, 10, 30)
-h, --help Show CLI help.
-r, --ram=<value> RAM in GB, in steps of 0.5 (e.g. 0.5, 1, 2)
-s, --service=<value> name of the service to resize
DESCRIPTION
change the RAM, CPU and disk allocated to a service
EXAMPLES
Choose the service and every resource interactively
$ chabok service resize
Resize a service in one non-interactive command
$ chabok service resize -s my-app --ram 2 --cpu 1 --disk 10
Set only the RAM and pick the rest from the prompts
$ chabok service resize -s my-app --ram 4
参见代码 : src/命令/服务/调整大小.ts
chabok service restart
重新启动服务
USAGE
$ chabok service restart [-h] [-s <value>]
FLAGS
-h, --help Show CLI help.
-s, --service=<value> name of the service to restart
DESCRIPTION
restart a service
EXAMPLES
Pick a service from an interactive list
$ chabok service restart
Restart a specific service by name
$ chabok service restart --service my-app
Restart, then tail the logs to confirm it came back up
$ chabok service restart -s my-app && chabok service logs -s my-app
参见代码 : src/commands/ service/ restart.ts (中文(简体) )
chabok service start
启动停止服务
USAGE
$ chabok service start [-h] [-s <value>]
FLAGS
-h, --help Show CLI help.
-s, --service=<value> name of the service to start
DESCRIPTION
start a stopped service
EXAMPLES
Pick a service from an interactive list
$ chabok service start
Start a specific service by name
$ chabok service start --service my-app
Same, using the short flag
$ chabok service start -s my-app
参见代码 : src/命令/服务/启动.ts
chabok service stop
停止运行服务
USAGE
$ chabok service stop [-h] [-s <value>]
FLAGS
-h, --help Show CLI help.
-s, --service=<value> name of the service to stop
DESCRIPTION
stop a running service
EXAMPLES
Pick a service from an interactive list
$ chabok service stop
Stop a specific service by name
$ chabok service stop --service my-app
Same, using the short flag
$ chabok service stop -s my-app
参见代码 : src/命令/服务/站点.ts
chabok version
USAGE
$ chabok version [--json] [--verbose]
FLAGS
--verbose Show additional information about the CLI.
GLOBAL FLAGS
--json Format output as json.
FLAG DESCRIPTIONS
--verbose Show additional information about the CLI.
Additionally shows the architecture, node version, operating system, and versions of plugins that the CLI is using.
参见代码 : @oclif/ plugin-version 页面存档备份,存于互联网档案馆
chabok wallet list
列出账户上的钱包
USAGE
$ chabok wallet list [-h]
FLAGS
-h, --help Show CLI help.
DESCRIPTION
list the wallets on your account
EXAMPLES
Show every wallet and its balance
$ chabok wallet list