GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — cli/packages/contentstack-auth at main · contentstack/cli

Expand file tree

/

contentstack-auth

/
Copy path

Directory actions

More options

More options

Directory actions

More options

More options

Latest commit

 

History

History
History
/

contentstack-auth

/
Copy path

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
bin
bin
 
 
messages
messages
 
 
src
src
 
 
test
test
 
 
.gitignore
.gitignore
 
 
.mocharc.json
.mocharc.json
 
 
.nycrc.json
.nycrc.json
 
 
.prettierrc
.prettierrc
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
env.example
env.example
 
 
eslint.config.js
eslint.config.js
 
 
package.json
package.json
 
 
tsconfig.json
tsconfig.json
 
 

README.md

Outline

@contentstack/cli-auth

It is Contentstack’s CLI plugin to perform authentication-related activities. To get started with authentication, refer to the CLI’s Authentication documentation

License

  • @contentstack/cli-auth
  • Usage
  • Commands

Usage

$ npm install -g @contentstack/cli-auth
$ csdx COMMAND
running command...
$ csdx (--version)
@contentstack/cli-auth/2.0.2 darwin-arm64 node-v22.21.1
$ csdx --help [COMMAND]
USAGE
  $ csdx COMMAND
...

Commands

  • csdx auth:login
  • csdx auth:logout
  • csdx auth:tokens
  • csdx auth:tokens:add [-a <value>] [--delivery] [--management] [-e <value>] [-k <value>] [-y] [--token <value>]
  • csdx auth:tokens:list
  • csdx auth:tokens:remove
  • csdx auth:whoami
  • csdx login
  • csdx logout
  • csdx whoami

csdx auth:login

User sessions 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>

See code: src/commands/auth/login.ts

csdx auth:logout

User session 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

See code: src/commands/auth/logout.ts

csdx auth:tokens

Manage authentication tokens for API access

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

See code: src/commands/auth/tokens/index.ts

csdx auth:tokens:add [-a <value>] [--delivery] [--management] [-e <value>] [-k <value>] [-y] [--token <value>]

Adds management/delivery tokens to your session to use it with other CLI commands

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>

See code: src/commands/auth/tokens/add.ts

csdx auth:tokens:list

Lists all existing tokens added to the session

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

See code: src/commands/auth/tokens/list.ts

csdx auth:tokens:remove

Removes selected tokens

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>

See code: src/commands/auth/tokens/remove.ts

csdx auth:whoami

Display current user's email address

USAGE
  $ csdx auth:whoami

DESCRIPTION
  Display current user's email address

ALIASES
  $ csdx whoami

EXAMPLES
  $ csdx auth:whoami

See code: src/commands/auth/whoami.ts

csdx login

User sessions 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

User session 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

Display current user's email address

USAGE
  $ csdx whoami

DESCRIPTION
  Display current user's email address

ALIASES
  $ csdx whoami

EXAMPLES
  $ csdx auth:whoami
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.