@contentstack/cli-auth (英语)
Contack 的 CLI 插件来进行认证相关活动 。 要从认证开始,请参考 CLI 认证文件
使用量
$ npm install -g @contentstack/cli-auth
$ csdx COMMAND
running command...
$ csdx (--version)
@contentstack/cli-auth/2.0.2 linux-x64 node-v22.23.3
$ csdx --help [COMMAND]
USAGE
$ csdx COMMAND
...
图标
csdx auth:logincsdx auth:logoutcsdx auth:tokenscsdx auth:tokens:add [-a <value>] [--delivery] [--management] [-e <value>] [-k <value>] [-y] [--token <value>]csdx auth:tokens:listcsdx auth:tokens:removecsdx auth:whoamicsdx logincsdx logoutcsdx whoami
csdx auth:login
用户会话登录
USAGE
$ csdx auth:login [-u <value> | --oauth] [-p <value> | ]
FLAGS
-p, --password=<value> Password of your Contentstack app.
-u, --username=<value> Email address of your Contentstack account.
--oauth Enables single sign-on (SSO) in Contentstack CLI.
DESCRIPTION
User sessions login
ALIASES
$ csdx login
EXAMPLES
$ csdx auth:login
$ csdx auth:login -u <username>
$ csdx auth:login -u <username> -p <password>
$ csdx auth:login --username <username>
$ csdx auth:login --username <username> --password <password>
参见代码 : src/commands/auth/login.ts (中文(简体) )
csdx auth:logout
用户会话登录
USAGE
$ csdx auth:logout [-y]
FLAGS
-y, --yes Force log out by skipping the confirmation.
DESCRIPTION
User session logout
ALIASES
$ csdx logout
EXAMPLES
$ csdx auth:logout
$ csdx auth:logout -y
$ csdx auth:logout --yes
参见代码 : src/commands/auth/logout.ts (中文(简体) )
csdx auth:tokens
管理 API 访问的认证符
USAGE
$ csdx auth:tokens [--columns <value>] [--sort <value>] [--filter <value>] [--csv] [--no-truncate]
[--no-header] [--output csv|json|yaml]
TABLE FLAGS
--columns=<value> Specify columns to display, comma-separated.
--csv Output results in CSV format.
--filter=<value> Filter rows by a column value (e.g., name=foo).
--no-header Hide table headers in output.
--no-truncate Prevent truncation of long text in columns.
--output=<option> Specify output format: csv, json, or yaml.
<options: csv|json|yaml>
--sort=<value> Sort the table by a column. Use "-" for descending.
DESCRIPTION
Manage authentication tokens for API access
EXAMPLES
$ csdx auth:tokens:list
$ csdx auth:tokens:add --alias mytoken
$ csdx auth:tokens:remove --alias mytoken
参见代码 : src/commands/auth/tokens/index.ts 互联网档案馆的存檔,存档日期2013-12-02
csdx auth:tokens:add [-a <value>] [--delivery] [--management] [-e <value>] [-k <value>] [-y] [--token <value>]
添加管理/ 交付令牌到您的会话中, 以便与其他 CLI 命令使用
USAGE
$ csdx auth:tokens:add [-a <value>] [--delivery] [--management] [-e <value>] [-k <value>] [-y] [--token <value>]
FLAGS
-a, --alias=<value> Alias (name) you want to assign to the token
-e, --environment=<value> Environment name for delivery token
-k, --stack-api-key=<value> Stack API Key
-y, --yes Use this flag to skip confirmation
--delivery Set this flag to save delivery token
--management Set this flag to save management token
--token=<value> [env: TOKEN] Add the token name
DESCRIPTION
Adds management/delivery tokens to your session to use it with other CLI commands
EXAMPLES
$ csdx auth:tokens:add
$ csdx auth:tokens:add -a <alias>
$ csdx auth:tokens:add -k <stack api key>
$ csdx auth:tokens:add --delivery
$ csdx auth:tokens:add --management
$ csdx auth:tokens:add -e <environment>
$ csdx auth:tokens:add --token <token>
$ csdx auth:tokens:add -a <alias> -k <stack api key> --management --token <management token>
$ csdx auth:tokens:add -a <alias> -k <stack api key> --delivery -e <environment> --token <delivery token>
$ csdx auth:tokens:add --alias <alias> --stack-api-key <stack api key> --management --token <management token>
$ csdx auth:tokens:add --alias <alias> --stack-api-key <stack api key> --delivery -e <environment> --token <delivery token>
参见代码 : src/commands/auth/tokens/add.ts 互联网档案馆的存檔,存档日期2013-12-21
csdx auth:tokens:list
列出添加到会话中的所有现有符号
USAGE
$ csdx auth:tokens:list [--columns <value>] [--sort <value>] [--filter <value>] [--csv] [--no-truncate]
[--no-header] [--output csv|json|yaml]
TABLE FLAGS
--columns=<value> Specify columns to display, comma-separated.
--csv Output results in CSV format.
--filter=<value> Filter rows by a column value (e.g., name=foo).
--no-header Hide table headers in output.
--no-truncate Prevent truncation of long text in columns.
--output=<option> Specify output format: csv, json, or yaml.
<options: csv|json|yaml>
--sort=<value> Sort the table by a column. Use "-" for descending.
DESCRIPTION
Lists all existing tokens added to the session
EXAMPLES
$ csdx auth:tokens:list
参见代码 : src/commands/auth/tokens/list.ts (简体中文)
csdx auth:tokens:remove
删除选中的令牌
USAGE
$ csdx auth:tokens:remove [-a <value>]
FLAGS
-a, --alias=<value> Alias (name) of the token to delete.
DESCRIPTION
Removes selected tokens
EXAMPLES
$ csdx auth:tokens:remove
$ csdx auth:tokens:remove -a <alias>
参见代码 : src/commands/auth/tokens/remove.ts 互联网档案馆的存檔,存档日期2013-12-02
csdx auth:whoami
显示当前用户的电子邮件地址
USAGE
$ csdx auth:whoami
DESCRIPTION
Display current user's email address
ALIASES
$ csdx whoami
EXAMPLES
$ csdx auth:whoami
参见代码 : src/命令/自动/whoami.ts
csdx login
用户会话登录
USAGE
$ csdx login [-u <value> | --oauth] [-p <value> | ]
FLAGS
-p, --password=<value> Password of your Contentstack app.
-u, --username=<value> Email address of your Contentstack account.
--oauth Enables single sign-on (SSO) in Contentstack CLI.
DESCRIPTION
User sessions login
ALIASES
$ csdx login
EXAMPLES
$ csdx auth:login
$ csdx auth:login -u <username>
$ csdx auth:login -u <username> -p <password>
$ csdx auth:login --username <username>
$ csdx auth:login --username <username> --password <password>
csdx logout
用户会话登录
USAGE
$ csdx logout [-y]
FLAGS
-y, --yes Force log out by skipping the confirmation.
DESCRIPTION
User session logout
ALIASES
$ csdx logout
EXAMPLES
$ csdx auth:logout
$ csdx auth:logout -y
$ csdx auth:logout --yes
csdx whoami
显示当前用户的电子邮件地址
USAGE
$ csdx whoami
DESCRIPTION
Display current user's email address
ALIASES
$ csdx whoami
EXAMPLES
$ csdx auth:whoami