@adinsure-ops/ops-cli

中文文档
5.4.2发布于 2026/10/19SEE LICENSE IN LICENSETypeScriptES Module近 30 天下载 1.5万

与 AdInsure 合作的 CLI 操作

中文使用文档
文档目录40 节
  1. 安装
  2. CLI 发展
  3. 升级 guilde
  4. 升级到5.1.0版本
  5. 升级到5.0.0版本
  6. 升级到4.0.0版本
  7. 图标
  8. ops help [COMMAND]
  9. ops doctor
  10. ops download:client <flags>
  11. ops download:identity-server <flags>
  12. ops download:platform <flags>
  13. ops download:scheduler <flags>
  14. ops download:server <flags>
  15. ops download:signalr <flags>
  16. ops download:studio <flags>
  17. ops download:keycloak-scim <flags>
  18. ops download:jmeter <flags>
  19. ops gitlab:get-tag-pipeline
  20. ops gitlab:next-nightly-tag
  21. ops jira:issue <issue>
  22. ops jira:issue <issue> -a [label] -r [label]
  23. ops log <issue> -t <type> -c [component]
  24. ops log:gen [options]
  25. ops log:validate [options]
  26. ops login
  27. ops login:ru --token <token>
  28. ops npm:check-publish
  29. ops npm:publish
  30. ops npm:dependency-update
  31. ops nuget:dependency-update
  32. ops version <type>
  33. ops prepare-content -d <destination> -s [source]
  34. .opsprepare 点文件
  35. ops sql <type> <module> [flags]
  36. ops translate
  37. ops config:set <type> <value>
  38. ops config:unset <type>
  39. ops config:get <type>
  40. ops config:list

业务CLI

支持AdInsure发展进程的业务CLI.

https://www.npmjs.com/package/@adinsure-ops/ops-cli 页面存档备份,存于互联网档案馆

安装

npm install -g @adinsure-ops/ops-cli

CLI 发展

为了发展,你需要 节点.js (建议20 LTS,最低18.0.0)和 雅伦 已安装.

我们建议 视觉工作室代码 IDE (英语).

为快速启动开发:

  • 克隆此仓库( C)git clone https://git.adacta-fintech.com/ops/ops-cli.git(中文(简体) )
  • 在 VS 代码中打开
  • 运行 yarn install
  • 为方便调试, 请运行 yarn link

您可以通过运行从终端直接运行和调试命令 ops [command] (如果你说) yarn link- 编辑软件包)或执行 .\bin\run [command] (如果你没有链接,例如. .\bin\run.cmd sql schema 非窗口环境和 .\bin\dev.cmd sql schema 用于 Windows 环境). 对于调试, 您可以跟踪 oclif 的文档, 以打开单个命令的调试模式 这里。 。 。 .

升级 guilde

升级到5.1.0版本

需要18个以上.

升级到5.0.0版本

需要节点16,18或20.

升级到4.0.0版本

我们改变了服务主登录方式 服务主登录不再需要调用登录命令(例如CI). 图标 ops login --servicePrincipal -c ${AZURE_CLIENT_ID} -s ${AZURE_CLIENT_SECRET} 应该删除,但 AZURE_CLIENT_ID 财务报告和审定财务报表 AZURE_CLIENT_SECRET 环境变量应该存在,因为OPS Cli在背景中使用.

图标

ops help [COMMAND]

显示操作的帮助

USAGE
  $ ops help [COMMAND]

ARGUMENTS
  COMMAND  command to show help for

OPTIONS
  --all  see all commands in CLI.

参见代码 : @oclif/plugin-帮助

ops doctor

检查是否安装了每端

USAGE
  $ ops doctor

OPTIONS
  -p, --fix  try to install missing packages.

EXAMPLE
  $ ops doctor

ops download:client <flags>

从 Azure 存储器下载 AdInsure 客户端zip

USAGE
  $ ops download:client <flags>

OPTIONS
  -o, --output=output    [default: ./] output directory. (can be configured via 'config:set download_folder')
  -v, --version=version  (required) version we want to download.
  -s, --source=source    [default: azure] artifact source. (can be configured via 'config:set endpoint')

EXAMPLE
  $ ops download:client -v 3.2.0 -o ~/Downloads
  $ ops download:client -v 3.2.0 -s gitlabru

ops download:identity-server <flags>

从 Azure 存储器下载 AdInsure 身份服务器zip

USAGE
  $ ops download:identity-server <flags>

OPTIONS
  -o, --output=output    [default: ./] output directory. (can be configured via 'config:set download_folder')
  -v, --version=version  (required) version we want to download.
  -s, --source=source    [default: azure] artifact source. (can be configured via 'config:set endpoint')


EXAMPLE
  $ ops download:identity-server -v 3.0.3 -o ~/Downloads
  $ ops download:identity-server -v 3.0.3 -s gitlabru

ops download:platform <flags>

下载 AdInsure 平台捆绑, 包含客户端、 服务器身份服务器和信号R 从 azure 存储中

USAGE
  $ ops download <flags>

OPTIONS
  -o, --output=output    [default: ./] output directory. (can be configured via 'config:set download_folder')
  -v, --version=version  (required) version we want to download.
  -s, --source=source    [default: azure] artifact source. (can be configured via 'config:set endpoint')


ALIASES
  $ ops download

EXAMPLE
  $ ops download -v 6.0.0 -o ~/Downloads
  $ ops download -v 6.0.0 -s gitlabru

ops download:scheduler <flags>

从 Azure 存储器下载 AdInsure 调度拉链

USAGE
  $ ops download:scheduler <flags>

OPTIONS
  -o, --output=output    [default: ./] output directory. (can be configured via 'config:set download_folder')
  -v, --version=version  (required) version we want to download.
  -s, --source=source    [default: azure] artifact source. (can be configured via 'config:set endpoint')


EXAMPLE
  $ ops download:scheduler -v 3.2.0 -o ~/Downloads
  $ ops download:scheduler -v 3.2.0 -s gitlabru

ops download:server <flags>

从 Azure 存储器下载 AdInsure 服务器zip

USAGE
  $ ops download:server <flags>

OPTIONS
  -o, --output=output    [default: ./] output directory. (can be configured via 'config:set download_folder')
  -v, --version=version  (required) version we want to download.
  -s, --source=source    [default: azure] artifact source. (can be configured via 'config:set endpoint')


EXAMPLE
  $ ops download:server -v 3.2.0 -o ~/Downloads
  $ ops download:server -v 3.2.0 -s gitlabru

ops download:signalr <flags>

从 Azure 存储器下载 AdInsure SignalR zip

USAGE
  $ ops download:signalr <flags>

OPTIONS
  -o, --output=output    [default: ./] output directory. (can be configured via 'config:set download_folder')
  -v, --version=version  (required) version we want to download.
  -s, --source=source    [default: azure] artifact source. (can be configured via 'config:set endpoint')


EXAMPLE
  $ ops download:signalr -v 18.0.0 -o ~/Downloads
  $ ops download:signalr -v 18.0.0 -s gitlabru

ops download:studio <flags>

从 Azure 存储器下载 AdInsure Studio vsix

USAGE
  $ ops download:studio <flags>

OPTIONS
  -k, --keep             only with install. If passed, it will not remove the vsix file.
  -i, --install          install plugin to vscode. save to temp folder and remove vsix after.
  -o, --output=output    [default: ./] output directory. (can be configured via 'config:set download_folder')
  -s, --skip             only with install. If passed, and desired version is installed it will skip it.
  -v, --version=version  (required) version we want to download.
  -f, --force            Create output directory if it does not exist. By default this is false and it depends on the output switch.
  --source=source    [default: azure] artifact source. (can be configured via 'config:set endpoint')


EXAMPLES
  $ ops download:studio -v 15.0.0 -o ~/Downloads
  $ ops download:studio -v 15.0.0 -i
  $ ops download:studio -v 15.0.0 -i -s
  $ ops download:studio -v 15.0.0 --source=gitlabru

ops download:keycloak-scim <flags>

为 AdInsure 服务器下载 Keycloak scim zip

USAGE
  $ ops download:keycloak-scim <flags>

OPTIONS
  -o, --output=output    [default: ./] output directory. (can be configured via 'config:set download_folder')
  -v, --version=version  (required) version we want to download.

EXAMPLES
  $ ops download:keycloak-scim -v 3.2.0 -o ~/Downloads
  $ ops download:keycloak-scim -v 3.0.0 

ops download:jmeter <flags>

下载 Jmeter 示例

USAGE
  $ ops download:jmeter <flags>

OPTIONS
  -o, --output=output    [default: ./] output directory. (can be configured via 'config:set download_folder')

EXAMPLES
  $ ops download:jmeter -o ~/Downloads

ops gitlab:get-tag-pipeline

获得标记的管道状态

USAGE
  $ ops gitlab:get-tag-pipeline <tag>

ARGUMENTS
  TAG  Tag

OPTIONS
  --delay=delay      [default: 5] Delay of check in seconds (defaults to 5 seconds).
  --host=host        (required) [default: https://git.adacta-fintech.com] Server hostname.
  --pat=pat          (required) Token from user that has permissions to list and create tags.
  --project=project  (required) [default: 413] Project ID.
  --timeout=timeout  [default: 120] Timeout for wait command in seconds (defaults to 120 seconds).
  --wait             Wait for pipeline to finish.

ops gitlab:next-nightly-tag

创建新的 gitlab 标签

USAGE
  $ ops gitlab:next-nightly-tag <version>

ARGUMENTS
  VERSION  Tag version

OPTIONS
  --dryRun               Only printout version and don't create it.
  --host=host            (required) [default: https://git.adacta-fintech.com] Server hostname.
  --pat=pat              (required) Token from user that has permissions to list and create tags.
  --project=project      (required) [default: 413] Project ID.
  --reference=reference  (required) Reference to create tag on (branch, commit, tag).

ops jira:issue <issue>

给吉拉发行

USAGE
  $ ops jira:issue <issue>

ARGUMENTS
  ISSUE  Jira issue number

OPTIONS
  --hostname=hostname  [default: https://jira.adacta-fintech.com] jira hostname.
  --password=password  (required) jira password.
  --username=username  (required) jira username.

EXAMPLE
  $ ops jira:issue LJADIRD-1337

ops jira:issue <issue> -a [label] -r [label]

列表或编辑 Jira 议题上的标签

USAGE
  $ ops jira:labels <issue> -a [label] -r [label]

ARGUMENTS
  ISSUE  Jira issue number

OPTIONS
  -a, --add=add        add label.
  -r, --remove=remove  remove label.
  --hostname=hostname  [default: https://jira.adacta-fintech.com] jira hostname.
  --password=password  (required) jira password.
  --username=username  (required) jira username.

EXAMPLE
  $ ops jira:labels LJADIRD-1337

ops log <issue> -t <type> -c [component]

创建新的更改日志条目

USAGE
  $ ops log <issue> -t <type> -c [component]

ARGUMENTS
  ISSUE      Jira issue number.
  TYPE       (feature|fixed|improve|breaking) Change type.
  COMPONENT  (Configuration|DevOps|Implementation|Platform) Component for which new changelog should be generated.


OPTIONS
  -c, --component=component                  Component for which new changelog should be generated.
  -t, --type=feature|fixed|improve|breaking  (required) type of changelog.
  -d, --description=description              Description of a changelog.
  -f, --force                                Create logs directory if it does not exist.

ALIASES
  $ ops log
  $ ops log:add

EXAMPLES
  $ ops log LJADIRD-1234 -t feature
  $ ops log LJADIRD-5678 -t fixed
  $ ops log LJADIRD-8765 -t breaking -c Platform
  $ ops log LJADIRD-5678 -t fixed -d "Fixed my bug"
  $ ops log LJADIRD-4321 -t improve -c Configuration

ops log:gen [options]

从根上未释放的音符生成最终更改日志, 执行部分的最后变更日志列在基本/Changelog.md下

USAGE
  $ ops log:gen [options]

OPTIONS
  -c, --components=components  components separated by comma (,) to process for final changelog.
  -f, --file=file        [default: CHANGELOG.md] file to update with new changelogs.
  -p, --preview          generates a preview markdown of current unreleased changelogs.
  -v, --version=version  version for which you're generating changelogs.
  --force                update target file without prompting for confirmation.
  --ignore-no-changelogs generate final changelog even if no unreleased changelogs exist.

ALIASES
  $ ops log:gen

EXAMPLE
  $ ops log:gen
  $ ops log:gen -p
  $ ops log:gen -c Platform
  $ ops log:gen -c Platform,Configuration
  $ ops log:gen -c Implementation -f CHANGELOG.Implementation.md

ops log:validate [options]

验证所有未释放的更改日志的格式:

  • 2.4.2 - 添加一个退出声明,以便在更改日志验证错误时强制退出,并为CI做好准备
USAGE
  $ ops log:validate [options]

ALIASES
  $ ops log:validate

EXAMPLE
  $ ops log:validate

ops login

登录以使用操作服务

USAGE
  $ ops login

OPTIONS
  --deviceFlow            authenticate using device flow
  --force                 Force a change of login token
  --npm                   register also for npm
  --skipCI=<value>        Skip login if environment variables is set

EXAMPLES
  $ ops login
  $ ops login --npm
  $ ops login --skipCi CI
  $ ops login --deviceFlow

ops login:ru --token <token>

登录使用 GitLabRu 符号的 OPS 服务 .

USAGE
  $ ops login:ru --token <token> [--force]

OPTIONS
  --token=token  (required) The GitLabRu token to store.
  --force        Force update of the stored token.

ALIASES
  $ ops login:ru

EXAMPLES
  $ ops login:ru --token abc123
  $ ops login:ru --token xyz789 --force

ops npm:check-publish

检查 npm 软件包是否发布

USAGE
  $ ops npm:check-publish [options]

OPTIONS
  -p, --package=package  package name filter you want to check.
  -v, --version=version  (required) version we want to check if published.
  -x, --exclude=exclude  exclude packages from filter.
  --pat=pat              PAT token or AZURE_DEVOPS_EXT_PAT environment variable.

EXAMPLES
  $ ops npm:check-publish -v 6.0.1
  $ ops npm:check-publish -p @adinsure/* -v 6.0.0
  $ ops npm:check-publish -p @adinsure/* -x @adisure/demo -v 6.0.0

ops npm:publish

发布 npm 软件包

USAGE
  $ ops npm:publish [options]

OPTIONS
  -p, --package=package  package name filter you want to check.
  -v, --version=version  (required) version we want to check if published.
  -x, --exclude=exclude  exclude packages from filter.
  --pat=pat              PAT token or AZURE_DEVOPS_EXT_PAT environment variable.

EXAMPLES
  $ ops npm:publish -v 15.0.0
  $ ops npm:publish -v 15.0.0
  $ ops npm:publish -p @adinsure-tooling/* -v 15.0.0
  $ ops npm:publish -p @adinsure-tooling/* -x @adisure-tooling/studio-services -v 6.0.0

ops npm:dependency-update

每个软件包过滤器更新 npm 依赖性

USAGE
  $ ops npm:dependency-update <type> [flags]

ARGUMENTS
  VERSION  Type of release

OPTIONS
  --exclude=exclude  exclude directories where to search for package.json.
  --filter=filter    (required) regular expression for which NPM packages to update.

EXAMPLE
  $ ops npm:dependency-update 3.4.3 --filter @adinsure/*

ops nuget:dependency-update

更新每个包过滤器的核素依赖性

USAGE
  $ ops nuget:dependency-update <type> [flags]

ARGUMENTS
  VERSION  Type of release

OPTIONS
  --exclude=exclude  exclude directories where to search for csproj files.
  --filter=filter    (required) regular expression for which NuGet packages to update.

EXAMPLE
  $ ops nuget:dependency-update 3.4.3 --filter Adacta.AdInsure --exclude Scheduler

ops version <type>

创造新发行所需的一切

USAGE
  $ ops version <type> [flags]

ARGUMENTS
  TYPE  (patch|minor|major|prerelease|preminor|premajor|new) Type of release

OPTIONS
  -i, --independent                      increment npm packages independent of VERSION file.
  -v, --version=version                  force version.
  --no-deps                              skip dependency update.
  --no-script                            skip creation of script.
  --only-npm-packages=only-npm-packages  [default: .*] regular expression for which NPM packages to include.
  --script-prefix=script-prefix          [default: 7.10] prefix for db script version creation.
  --exclude-dir                          exclude directories where to search for package.json.

EXAMPLES
  $ ops version minor
  $ ops version new-version -v 3.4.0
  $ ops version new-version -v 3.2.1 --script-prefix 7.10
  $ ops version patch --no-deps
  $ ops version patch --no-script
  $ ops version new -v 3.2.1 --only-npm-packages "@adinsure/"
  • 预释 由YearMonth增量数(例:201909.1)或RC(例:rc.0)生成. 同一个月生成的预放出将只有上个数字递增,下个月生成的首个预放出将撞出第一个数字并从0开始(例如:20191.0)

  • 补丁 第3个数字和释放前数字不计。 (例:3.4.0-201909.2 - > 3.4.0和3.3.11 - > 3.3.12)

  • 初级 第二位释放前的增量(例:3.2.3 - > 3.3.0-201910.0)

  • 小声 递增第二个数字(例如:3.4.3 - > 3.5.0)

  • 预主 第1个数的预放量递增(例:3.4.3 - > 4.0.0-201911.0)

  • 主要 增加数第一(例如:3.4.5- > 4.0.0)

  • 新版本 允许设置 VERSION 文件的自带版本. 在这种情况下,不支持单独增加国家预防机制版本。 国家防范机制的软件包也被压缩到指定的版本.

注: 预放只应是用户 师傅 树枝. \ 补丁 注意: 补丁是在 发布/x.x 创建补丁释放的分支 创建新时 发布/x.x 需要第2分节的步骤:

  • 创建 补丁 打开版本 发布/x.x 分支
  • 创建 初级 或者说 预主 打开版本 师傅 分支 \ 软件包的依赖性在所有软件包.json文件中更新. 如果在指定的完整版本中指定了预释版本(例:4.0.0-201911.0),或者非预释版本以x结尾(例:3.5.x) \ NPM软件包节点:Npm软件包需要适当更新 wsrun - 转换 预设需要输入 脚本 部分 软件包.json.(实例: "wsrun-version": "yarn wsrun -p @adinsure-tools/* -p @adinsure/* -c"(中文(简体) )

ops prepare-content -d <destination> -s [source]

创建目录/文件结构 /source 改为 /destination</source> 定义 .opsprepare 文档。 实际 每个文件的目的地路径将被指定为目的路径,并带有从工作目录中附加的相对路径,在那里命令执行到指定的源目录或当前目录(如果未指定源). 当心使用 .. 在目标和源路径上加注,因为相对路径解决可能导致不可预测的结果.

3.1.0版本介绍.

USAGE
  $ ops prepare-content -d <destination> -s [source]


OPTIONS
  -d, --destination=destination       path to target directory.
  -s, --source=source                 optional path to source directory containing .opsprepare file, (default: current directory).

EXAMPLES
$ ops prepare-content -d ./target_directory/
  copies everything defined in .opsprepare
  from current directory 
  to ./target_directory

$ ops prepare-content -d ./target_directory/ -s ./source_directory
  copies everything defined in ./source_directory/.opsprepare 
  from ./source_directory/
  to ./target_directory/source_directory

$ ops prepare-content -d C:\git\target_directory
  copies everything defined in .opsprepare 
  from current directory 
  to C:\git\target_directory

$ ops prepare-content -d C:\git\target_directory -s C:\git\subfolder\subfolder
  when executed in c:\git it copies everything defined in C:\git\subfolder\subfolder\.opsprepare 
  from C:\git\subfolder\subfolder
  to C:\git\target_directory\subfolder\subfolder

.opsprepare 点文件

准备内容命令的使用 .opsprepare dotfile作为内容编写指令集. 语法类似于 .gitignore 但它的功能不同,不支持高级 模式匹配.

目前支持以下操作/转换:

  • 复制:将文件/目录从源路径复制到同名目的路径
  • 变形: 将源文件转换为同名目的文件
  • 删除: 从目的路径去除文件/目录( 基于源路径)

在跳入实际语法和辅助符号之前,让我们看看一个例子 如何使用 ops prepare-content 创建带有文件的目标目录结构 根据指定的 .opsprepare 保存在源目录中的文件.

这是示例源目录结构 :

src_data
├── .opsprepare
├── README.tpl
├── bin
│   ├── ops.sh
│   └── run
│       └── ops
├── dist
│   └── server
│       └── main.cs
├── src
│   ├── commands
│   │   ├── prepare.ts
│   │   └── version.ts
│   ├── config.ts
│   └── main.ts
└── transform
    └── render-tpl.js

目录 .opsprepare 文档中 src_data 目录 :

# Comment
src
dist/server
!src/commands
!src/config.ts
src/config.ts {cp:/src/configuration.ts}
# Another comment
!bin/run
README.md {js:/transform/render-tpl.js}
README.tpl {cp:/README.tpl.src}

运行 ops -s src_data -d dst_data 与 src_data/.opsprepare 包含以上内容 结果是:

dst_data
└── src_data
    ├── README.md
    ├── README.tpl.src
    ├── dist
    │   └── server
    │       └── main.cs
    └── src
        ├── main.ts
        └── src
            └── configuration.ts

到底发生了什么:

  1. 首先说明所有数据都被复制到 dst_data/src_data 因为 .opsprepare 文件相对 地点到 ops 执行指令是 src_data。 。 。 .
  2. src 目录被递归复制到目的地
  3. dist/server 目录被递归复制, 包括相对于 src_data
  4. src/config.ts 文件被转换( 复制) 为 src/configuration.ts 目标
  5. README.md 文件是因基于 JavaScript 的转换而在目的地创建的
  6. README.tpl 文件被转换( 复制) 为 README.tpl.src 目标
  7. src/commands 目录从目的地删除
  8. src/config.ts 文件从目的地删除
  9. bin/run 目录从目的地删除

请注意,复制和明确转换是在任何清除行动之前进行的.

评论

任意行前缀 # 被视为评论,不会导致任何文件/目录操作.

复制操作

任何没有前缀的文件/目录 ! 或者说 # 明确转换的定义 {...} 之后 其名称将会被复制到目的地, 其路径相对于 ops 执行目录 转到目标目录.

转型业务

变形操作总是在源文件名后使用卷曲括号来指定. 基础 语法是这样的:

{<transformation type>:<transformation parameters>}

支持两种类型的转换操作:

  • cp: 支持在目的地重命名源文件的复制转换
  • js: Javas 以 Sript 为主的转换, 其结果是包含字符串的文件由 : 转换模块中包含的转换函数.

cp - 复制转换语法

{cp:<destination path>}

Examples:
{cp:/dst/newfilename}
{cp:dst/newfilenames}

文件和目录都支持复制转换。 源文件或目录将会是 复制到带有新名称的目的地路径。 目的地永远是相对 整个目的路径 prepare-content 因此,转换块中的操作路径 可以开始于或没有 / 字符,但使用能使语法更可读取.

js - JavaScript 变换语法

{js:<transformation_module_path>}

Example:
{js:/transformations/templateRenderer.js}

JavaScript 转换只支持文件,而不是目录.

转换模块路径应当相对 .opsprepare 文件,但可以从 / 字符 为了更好的可读性。 它可以导出多种功能, 尽管只有一个功能可以单独使用 变换规格.

转换模块中定义的转换函数将使用单个调用 参数 - 源文件的绝对路径.

变形函数 MUSST 返回字符串 。 此字符串将成为文件的内容 目标.

目标文件将与源文件和内容的同名创建 转换函数。 实际源文件的存在不会被 prepare-content 操作(如果不存在警告,则显示警告),这种验证是责任 如果需要,则由转换函数构成.

示例转换模块 transform.js 具有导出函数,称为渲染:

export default function render(path) {
    /*
    Some transformation happens in here and it's result which is
    a string is assigned to result variable which is returned.
    */
  return result;
}

需要注意的一点是,在一个模块中您只能导出一个默认函数,所以在一个互相调用的文件中定义多个函数是可能的, 然而,定义多重违约出口并不是,因此 只有一个功能可以叫做 在模块文件中.

搬运作业

文件/目录前缀 ! 将会根据目的地的完整路径被移除 相对 ops 执行目录到源文件/目录路径.

ops sql <type> <module> [flags]

创建新的数据库脚本

USAGE
  $ ops sql <type> <module> [flags]

ARGUMENTS
  TYPE    (Schema|Data|Migration|Extend) Type of database scripts
  MODULE  (acc|claims|core|pas|reins|shared) Module of data database scripts

OPTIONS
  -d, --description=description  description of script to be used in filename for offline.
  -l, --layer=layer              name of the configuration layer for which you are generating database script.
  -m, --major                    generate script for major version.
  -o, --offline                  generate database script with timestamp.
  -v, --version=version          version for which you're generating database script.

Extend type options for extending DBs:
  --table-schema                 table schema name
  --table-name                   table name
  --column-name                  new column's name 
  --column-type                  new column's type 

EXAMPLES
  $ ops sql schema 
  $ ops sql data shared --layer basic
  $ ops sql data shared --major
  $ ops sql data shared --offline --description "this is script description"
  $ ops sql Extend -v 22.0.0 -l basic --table-schema "Table_Shema" --table-name "Table_Name" --column-name "New_Column_Name" --column-type "NEWTYPE"

注:如果不提供,则取自文件 SQL_SCRIPTS_VERSION, (中文(简体) ), PLATFORM_VERSION 或者说 VERSION 以顺序.

ops translate

从AdDictionary服务翻译的下载

USAGE
  $ ops translate <language> [flags]

ARGUMENTS
  LANGUAGE  language id you want to download. Values must be semi-colon (;) separated.

OPTIONS
  -f, --format=json|xml    (required) translations format [xml - server translations, json - client translations].
  -m, --module=module      module name you want to download. Values must be semi-colon (;) separated.
  -o, --output=output      [default: .] absolute or relative destination path to a folder where translations are extracted.
  --filename=filename      specify filename of output (XML only).
  --respectServerFilename  respect filename that is returned from AdDictionary server (XML only).

EXAMPLES
  $ ops translate "en-US=en-US;ru-Ru=ru-RU" -f json -m "Client business accounting;Client business base;"
  $ ops translate "en-US=en-US;ru-Ru=ru-RU" -f xml -o translationDestination

ops config:set <type> <value>

为OPS设定配置值.

USAGE
  $ ops config:set <type> <value>

OPTIONS
  type   (required) Type of OPS configuration. Available options: [endpoint, download_folder].
  value  (required) Possible configuration values. Available options for endpoint: [azure, gitlabru]. Expects a valid path for download_folder.

ALIASES
  $ ops config:set

EXAMPLES
  $ ops config:set endpoint gitlabru
  $ ops config:set endpoint azure
  $ ops config:set download_folder ./Downloads

ops config:unset <type>

删除配置值以便使用系统默认值.

USAGE
  $ ops config:unset <type>

OPTIONS
  type   (required) Type of OPS configuration. Available options: [endpoint, download_folder].

ALIASES
  $ ops config:unset

EXAMPLES
  $ ops config:unset endpoint 
  $ ops config:unset download_folder

ops config:get <type>

为OPS获取配置值.

USAGE
  $ ops config:get <type>

OPTIONS
  type   (required) Type of OPS configuration to retrieve. Available options: [endpoint, download_folder].

ALIASES
  $ ops config:get

EXAMPLES
  $ ops config:get endpoint
  $ ops config:get download_folder

ops config:list

列出存储在配置文件中的所有 OPS 配置值 .

USAGE
  $ ops config:list

版本与发布记录

@adinsure-ops/ops-cli 共发布 61 个版本,首次发布于 2022/05/31;过去 12 个月发布了 15 个版本。

版本发布日期距今
5.4.2latest2026/10/1919 天前
5.4.2-rc1rc2026/10/1919 天前
5.4.1-rc52026/10/0929 天前
5.4.1-rc42026/10/0830 天前
5.4.1-rc32026/10/071 个月前
5.4.12026/10/011 个月前

其他发布通道:test → 5.2.1,rc → 5.4.2-rc1。

关于 @adinsure-ops/ops-cli 的常见问题

@adinsure-ops/ops-cli 是什么?

与 AdInsure 合作的 CLI 操作

如何安装 @adinsure-ops/ops-cli?

在项目目录运行 npm install @adinsure-ops/ops-cli,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:@types/node(^24.0.0)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。它还提供命令行工具 ops,可以用 npx ops 直接运行。

@adinsure-ops/ops-cli 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@adinsure-ops/ops-cli 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@adinsure-ops/ops-cli 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=20。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@adinsure-ops/ops-cli 可以商用吗?

@adinsure-ops/ops-cli 使用 SEE LICENSE IN LICENSE 许可。许可条款写在包内的独立文件中,请阅读该文件确认可否商用。以上为概括,不构成法律意见,请以许可原文为准。

@adinsure-ops/ops-cli 的下载量有多少?

根据 npm 官方下载统计,@adinsure-ops/ops-cli 在 2026/10/05 – 2026/11/03 这 30 天内被下载 15,400 次,日均约 513 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@adinsure-ops/ops-cli 还在维护吗?

最新版本 5.4.2 发布于 2026/10/19(19 天前);至今共发布 61 个版本,其中过去 12 个月发布了 15 个;首次发布于 2022/05/31。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。