@adinsure-ops/ops-cli

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

Operations CLI for working with AdInsure

原始使用文档
文档目录40 节
  1. Install
  2. CLI development
  3. Upgrade guilde
  4. Upgrade to version 5.1.0
  5. Upgrade to version 5.0.0
  6. Upgrade to version 4.0.0
  7. Commands
  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 dotfile
  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

Operations CLI

Operations CLI for supporting AdInsure development processes.

https://www.npmjs.com/package/@adinsure-ops/ops-cli

Install

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

CLI development

For development you will need Node.js (recommended 20 LTS, minimal 18.0.0) and Yarn installed.

We recommend Visual Studio Code IDE.

To quick start development:

  • Clone this repository (git clone https://git.adacta-fintech.com/ops/ops-cli.git)
  • Open in VS Code
  • Run yarn install
  • For easier debugging, run yarn link

You can run and debug commands directly from terminal by running ops [command] (if you yarn link-ed the package) or execute .\bin\run [command] (if you didn't link, e.g. .\bin\run.cmd sql schema for non-Windows environments and .\bin\dev.cmd sql schema for Windows environments). For debugging, you can follow oclif's documentation on how to turn on debug mode for a single command here.

Upgrade guilde

Upgrade to version 5.1.0

18 or higher is required.

Upgrade to version 5.0.0

Node 16, 18 or 20 is required.

Upgrade to version 4.0.0

We changed the way service principal login works. It is no longer needed to call login command for service principal login (for example in CI). Commands ops login --servicePrincipal -c ${AZURE_CLIENT_ID} -s ${AZURE_CLIENT_SECRET} should be removed, but AZURE_CLIENT_ID and AZURE_CLIENT_SECRET environment variables should exists, because OPS Cli uses it in background.

Commands

ops help [COMMAND]

display help for ops

USAGE
  $ ops help [COMMAND]

ARGUMENTS
  COMMAND  command to show help for

OPTIONS
  --all  see all commands in CLI.

See code: @oclif/plugin-help

ops doctor

check if everyting is installed

USAGE
  $ ops doctor

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

EXAMPLE
  $ ops doctor

ops download:client <flags>

download AdInsure Client zip from Azure storage

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>

download AdInsure Identity Server zip from Azure storage

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>

download AdInsure Platform bundle containing zip of Client, Server IdentityServer and SignalR from azure storage

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>

download AdInsure Scheduler zip from azure storage

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>

download AdInsure Server zip from Azure storage

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>

download AdInsure SignalR zip from Azure storage

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>

download AdInsure Studio vsix from azure storage

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>

Download the Keycloak scim zip for AdInsure server

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>

Download the Jmeter examples zip

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

get pipeline status for tag

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

creates new gitlab tag

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>

get Jira 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]

list or edit labels on Jira issue

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]

creates a new changelog entry

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]

generates final changelog from unreleased notes on the root, final changelog for implementation component is placed under basic/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]

validates formatting of all unreleased changelogs:

  • 2.4.2 - added an exit statement that will force exit on changelog validation errors, preparing it for CI
USAGE
  $ ops log:validate [options]

ALIASES
  $ ops log:validate

EXAMPLE
  $ ops log:validate

ops login

log in to use ops services

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>

Log in to use OPS services with a GitLabRu token.

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

check if npm packages were published

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

publish npm packages

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

update npm dependencies per package filter

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

update nuget dependencies per package filter

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>

creates everything necessary for the new release

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/"
  • prerelease is generated from YearMonth incremental number (example: 201909.1) or RC (example: rc.0). prereleases generated in same month will have only last number incremented and first prerelease generated in next month will bump first number and start with 0 (example: 201910.0)

  • patch increments third number and prerelease number is ommited. (example: 3.4.0-201909.2 -> 3.4.0 and 3.3.11 -> 3.3.12)

  • preminor increments for prerelease in second number (example: 3.2.3 -> 3.3.0-201910.0)

  • minor increments second number (example: 3.4.3 -> 3.5.0)

  • premajor increments to prerelease in first number (example: 3.4.3 -> 4.0.0-201911.0)

  • major increments first number (example: 3.4.5 -> 4.0.0)

  • new-version allows setting own version regardles of VERSION file. Incrementing NPM version separately is not supported in this case. NPM packages are also bumped to specified version.

Prerelease Note: Prerelease should only be user in master branch. \ Patch Note: Patch is used on release/x.x branches for creating patch releases When creating new release/x.x branch 2 steps are needed:

  • creating patch version on release/x.x branch
  • creating preminor or premajor version on master branch \ Dependencies for packages are updated on all package.json files. If prerelease version in specified full version is specified (example: 4.0.0-201911.0), or if non prerelease version ends with x (example: 3.5.x) \ NPM packages node: For npm package to update properly wsrun-version preset needs to be in scripts portion of package.json. (example: "wsrun-version": "yarn wsrun -p @adinsure-tools/* -p @adinsure/* -c")

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

creates a directory/file structure from /source to /destination</source> as defined in the .opsprepare file. Actual destination path for each file will be specified destination path with appended relative path from working directory where command is executed to specified source directory or current directory (if source is not specified). Be careful about using .. notation in target and source paths as it may lead to unpredictable results due to relative path resolving.

Introduced in version 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 dotfile

The prepare-content command uses .opsprepare dotfile as instruction set for content preparation. The syntax resembles that of .gitignore but differs in how it functions and doesn't support advanced pattern matching.

Following operations/transformations are currently supported:

  • Copy: copies the file/directory from source path to destination path with same name
  • Transform: transform source file to destination file with same name
  • Removal: remove file/directory (based on source path) from destination path

Before diving into the actual syntax and supported tokens let's look at an example of how using ops prepare-content creates a target directory structure with files based on the specified .opsprepare file residing in source directory.

This is the example source directory structure:

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

Contents of .opsprepare file in the src_data directory:

# 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}

Running ops -s src_data -d dst_data with src_data/.opsprepare containing above content results in:

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

What actually happened:

  1. First note that all data was copied into dst_data/src_data because .opsprepare files relative location to ops execution directiory is src_data.
  2. src directory was copied recursively to destination
  3. dist/server directory was copied recursively including its full path path relative to src_data
  4. src/config.ts file was transformed (copied) to src/configuration.ts in the destination
  5. README.md file was created at the destination as a result of JavaScript based transformation
  6. README.tpl file was transformed (copied) to README.tpl.src in the destination
  7. src/commands directory was removed from destination
  8. src/config.ts file was removed from destination
  9. bin/run directory was removed from destination

Note that copying and explicit transformations are performed before any removal operations.

Comments

Any line prefixed by # is considered a comment and will not result in any file/directory operation.

Copy operations

Any file/directory not prefixed by ! or # having explicit transformation defined in {...} after its name will be copied to the destination with it's full path relative to ops execution directory to the target directory.

Transformation operations

Transformation operations are always specified using curly braces following the source file name. Base syntax looks like this:

{<transformation type>:<transformation parameters>}

Two types of transformation operations are supported:

  • cp: copy transformation which supports renaming of the source file at the destination
  • js: JavasSript based transformation which results in the file containing string returned by the transformation function contained in transformation module.

cp - copy transformation syntax

{cp:<destination path>}

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

Copy transformation is supported for both files and directories. Source file or directory will be copied to the destination path with its new name. The destination will always be relative to the destination path of entire prepare-content operation therefore paths in the transformation block can start with or without the / character but using makes the syntax more readable.

js - JavaScript transformation syntax

{js:<transformation_module_path>}

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

JavaScript transformation is supported only for files, not directories.

Transformation module path should be relative to .opsprepare file but can start with / character for better readability. It can export multiple functions though only one can be used in single transformation specification.

Transformation function that is defined in the transformation module will be called with a single parameter - absolute path of the source file.

Transformation function MUST return a string. This string will become the content of the file on destination.

Destination file will be created with the same name as source file and content returned by the transformation function. The existence of actual source file will not be validated by the prepare-content operation (warning is shown if it doesn't exist), such validation is responsibility of the transformation function if required.

Example transformation module transform.js with exported function called render:

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;
}

An important thing to note is that you can only export one default function in a module, so defining multiple functions in one file that call each other is possible, however defining multiple default exports is not and therefore there can only be one function that will be called in a module file.

Removal operations

Any file/directory prefixed by ! will be removed from the destination based on it's full path relative from ops execution directory to source file/directory path.

ops sql <type> <module> [flags]

creates a new database script

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"

Note: version if not provided is taken from file SQL_SCRIPTS_VERSION, PLATFORM_VERSION or VERSION in order.

ops translate

downloads translate from AdDictionary service

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>

Set a configuration value for 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>

Remove a configuration value so that the system default is used.

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>

Retrieve a configuration value for 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

List all OPS configuration values stored in the config file.

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 是什么?

Operations CLI for working with AdInsure

如何安装 @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 和提交记录判断。