diff --git a/packages/contentstack/README.md b/packages/contentstack/README.md index 4ad59f77bf..972be03913 100644 --- a/packages/contentstack/README.md +++ b/packages/contentstack/README.md @@ -1,3266 +1,66 @@ # @contentstack/cli -Use Contentstack Command-line Interface to command Contentstack for executing a set of operations from the terminal. To get started with CLI, refer to the [CLI’s documentation](https://www.contentstack.com/docs/developers/cli) +Use Contentstack Command-line Interface (CLI) to interact with Contentstack directly from your terminal. [![License](https://img.shields.io/npm/l/@contentstack/cli)](https://github.com/contentstack/cli/blob/main/LICENSE) +[![npm](https://img.shields.io/npm/v/@contentstack/cli)](https://www.npmjs.com/package/@contentstack/cli) - -* [@contentstack/cli](#contentstackcli) -* [Requirements](#requirements) -* [Usage](#usage) -* [Commands](#commands) - +## Requirements -# Requirements +Node.js v22 or higher — download from [nodejs.org](https://nodejs.org/). -- **Node.js v22 or higher** is required. Download it from [nodejs.org](https://nodejs.org/). +## Installation -> **Note:** Starting from this version, Contentstack CLI requires Node.js 22+. Node.js 22 is the current LTS release and includes important compatibility improvements for modern JavaScript modules. - -# Usage - - -```sh-session -$ npm install -g @contentstack/cli -$ csdx COMMAND -running command... -$ csdx (--version|-v) -@contentstack/cli/1.66.1 darwin-arm64 node-v24.18.0 -$ csdx --help [COMMAND] -USAGE - $ csdx COMMAND -... -``` - - -# Commands - - -* [`csdx auth:login`](#csdx-authlogin) -* [`csdx auth:logout`](#csdx-authlogout) -* [`csdx auth:tokens`](#csdx-authtokens) -* [`csdx auth:tokens:add [-a ] [--delivery] [--management] [-e ] [-k ] [-y] [--token ]`](#csdx-authtokensadd--a-value---delivery---management--e-value--k-value--y---token-value) -* [`csdx auth:tokens:remove`](#csdx-authtokensremove) -* [`csdx auth:whoami`](#csdx-authwhoami) -* [`csdx cm:assets:publish [-a ] [--retry-failed ] [-e ] [--folder-uid ] [--backup-dir ] [--bulk-publish ] [-c ] [-y] [--locales ] [--branch ] [--delivery-token ] [--source-env ]`](#csdx-cmassetspublish--a-value---retry-failed-value--e-value---folder-uid-value---backup-dir-value---bulk-publish-value--c-value--y---locales-value---branch-value---delivery-token-value---source-env-value) -* [`csdx cm:assets:unpublish`](#csdx-cmassetsunpublish) -* [`csdx cm:bulk-publish`](#csdx-cmbulk-publish) -* [`csdx cm:entries:update-and-publish [-a ] [--retry-failed ] [--bulk-publish ] [--content-types ] [-t ] [-e ] [-c ] [-y] [--locales ] [--branch ]`](#csdx-cmentriesupdate-and-publish--a-value---retry-failed-value---bulk-publish-value---content-types-value--t-value--e-value--c-value--y---locales-value---branch-value) -* [`csdx cm:assets:publish [-a ] [--retry-failed ] [-e ] [--folder-uid ] [--backup-dir ] [--bulk-publish ] [-c ] [-y] [--locales ] [--branch ] [--delivery-token ] [--source-env ]`](#csdx-cmassetspublish--a-value---retry-failed-value--e-value---folder-uid-value---backup-dir-value---bulk-publish-value--c-value--y---locales-value---branch-value---delivery-token-value---source-env-value) -* [`csdx cm:bulk-publish:clear`](#csdx-cmbulk-publishclear) -* [`csdx cm:bulk-publish:configure`](#csdx-cmbulk-publishconfigure) -* [`csdx cm:bulk-publish:cross-publish [-a ] [--retry-failed ] [--bulk-publish ] [--content-type ] [--locales ] [--source-env ] [--environments ] [--delivery-token ] [-c ] [-y] [--branch ] [--onlyAssets] [--onlyEntries] [--include-variants]`](#csdx-cmbulk-publishcross-publish--a-value---retry-failed-value---bulk-publish-value---content-type-value---locales-value---source-env-value---environments-value---delivery-token-value--c-value--y---branch-value---onlyassets---onlyentries---include-variants) -* [`csdx cm:entries:publish [-a ] [--retry-failed ] [--bulk-publish ] [--publish-all-content-types] [--content-types ] [--locales ] [-e ] [-c ] [-y] [--branch ] [--delivery-token ] [--source-env ] [--entry-uid ] [--include-variants]`](#csdx-cmentriespublish--a-value---retry-failed-value---bulk-publish-value---publish-all-content-types---content-types-value---locales-value--e-value--c-value--y---branch-value---delivery-token-value---source-env-value---entry-uid-value---include-variants) -* [`csdx cm:entries:publish-modified [-a ] [--retry-failed ] [--bulk-publish ] [--source-env ] [--content-types ] [--locales ] [-e ] [-c ] [-y] [--branch ]`](#csdx-cmentriespublish-modified--a-value---retry-failed-value---bulk-publish-value---source-env-value---content-types-value---locales-value--e-value--c-value--y---branch-value) -* [`csdx cm:entries:publish-non-localized-fields [-a ] [--retry-failed ] [--bulk-publish ] [--source-env ] [--content-types ] [-e ] [-c ] [-y] [--branch ]`](#csdx-cmentriespublish-non-localized-fields--a-value---retry-failed-value---bulk-publish-value---source-env-value---content-types-value--e-value--c-value--y---branch-value) -* [`csdx cm:bulk-publish:revert`](#csdx-cmbulk-publishrevert) -* [`csdx csdx cm:stacks:unpublish [-a ] [-e ] [-c ] [-y] [--locale ] [--branch ] [--retry-failed ] [--bulk-unpublish ] [--content-type ] [--delivery-token ] [--only-assets] [--only-entries]`](#csdx-csdx-cmstacksunpublish--a-value--e-value--c-value--y---locale-value---branch-value---retry-failed-value---bulk-unpublish-value---content-type-value---delivery-token-value---only-assets---only-entries) -* [`csdx cm:entries:publish-only-unpublished [-a ] [--retry-failed ] [--bulk-publish ] [--source-env ] [--content-types ] [--locales ] [-e ] [-c ] [-y] [--branch ]`](#csdx-cmentriespublish-only-unpublished--a-value---retry-failed-value---bulk-publish-value---source-env-value---content-types-value---locales-value--e-value--c-value--y---branch-value) -* [`csdx cm:entries:migrate-html-rte`](#csdx-cmentriesmigrate-html-rte) -* [`csdx cm:entries:publish [-a ] [--retry-failed ] [--bulk-publish ] [--publish-all-content-types] [--content-types ] [--locales ] [-e ] [-c ] [-y] [--branch ] [--delivery-token ] [--source-env ] [--entry-uid ] [--include-variants]`](#csdx-cmentriespublish--a-value---retry-failed-value---bulk-publish-value---publish-all-content-types---content-types-value---locales-value--e-value--c-value--y---branch-value---delivery-token-value---source-env-value---entry-uid-value---include-variants) -* [`csdx cm:entries:publish-modified [-a ] [--retry-failed ] [--bulk-publish ] [--source-env ] [--content-types ] [--locales ] [-e ] [-c ] [-y] [--branch ]`](#csdx-cmentriespublish-modified--a-value---retry-failed-value---bulk-publish-value---source-env-value---content-types-value---locales-value--e-value--c-value--y---branch-value) -* [`csdx cm:entries:publish-non-localized-fields [-a ] [--retry-failed ] [--bulk-publish ] [--source-env ] [--content-types ] [-e ] [-c ] [-y] [--branch ]`](#csdx-cmentriespublish-non-localized-fields--a-value---retry-failed-value---bulk-publish-value---source-env-value---content-types-value--e-value--c-value--y---branch-value) -* [`csdx cm:entries:publish-only-unpublished [-a ] [--retry-failed ] [--bulk-publish ] [--source-env ] [--content-types ] [--locales ] [-e ] [-c ] [-y] [--branch ]`](#csdx-cmentriespublish-only-unpublished--a-value---retry-failed-value---bulk-publish-value---source-env-value---content-types-value---locales-value--e-value--c-value--y---branch-value) -* [`csdx cm:entries:unpublish`](#csdx-cmentriesunpublish) -* [`csdx cm:entries:update-and-publish [-a ] [--retry-failed ] [--bulk-publish ] [--content-types ] [-t ] [-e ] [-c ] [-y] [--locales ] [--branch ]`](#csdx-cmentriesupdate-and-publish--a-value---retry-failed-value---bulk-publish-value---content-types-value--t-value--e-value--c-value--y---locales-value---branch-value) -* [`csdx cm:stacks:publish`](#csdx-cmstackspublish) -* [`csdx cm:stacks:publish-clear-logs`](#csdx-cmstackspublish-clear-logs) -* [`csdx cm:stacks:publish-configure`](#csdx-cmstackspublish-configure) -* [`csdx cm:stacks:publish-revert`](#csdx-cmstackspublish-revert) -* [`csdx csdx cm:stacks:unpublish [-a ] [-e ] [-c ] [-y] [--locale ] [--branch ] [--retry-failed ] [--bulk-unpublish ] [--content-type ] [--delivery-token ] [--only-assets] [--only-entries]`](#csdx-csdx-cmstacksunpublish--a-value--e-value--c-value--y---locale-value---branch-value---retry-failed-value---bulk-unpublish-value---content-type-value---delivery-token-value---only-assets---only-entries) -* [`csdx config:get:base-branch`](#csdx-configgetbase-branch) -* [`csdx config:get:ea-header`](#csdx-configgetea-header) -* [`csdx config:get:early-access-header`](#csdx-configgetearly-access-header) -* [`csdx config:get:log`](#csdx-configgetlog) -* [`csdx config:get:proxy`](#csdx-configgetproxy) -* [`csdx config:get:rate-limit`](#csdx-configgetrate-limit) -* [`csdx config:get:region`](#csdx-configgetregion) -* [`csdx config:remove:base-branch`](#csdx-configremovebase-branch) -* [`csdx config:remove:ea-header`](#csdx-configremoveea-header) -* [`csdx config:remove:early-access-header`](#csdx-configremoveearly-access-header) -* [`csdx config:remove:proxy`](#csdx-configremoveproxy) -* [`csdx config:remove:rate-limit`](#csdx-configremoverate-limit) -* [`csdx config:set:base-branch`](#csdx-configsetbase-branch) -* [`csdx config:set:ea-header`](#csdx-configsetea-header) -* [`csdx config:set:early-access-header`](#csdx-configsetearly-access-header) -* [`csdx config:set:log`](#csdx-configsetlog) -* [`csdx config:set:proxy`](#csdx-configsetproxy) -* [`csdx config:set:rate-limit`](#csdx-configsetrate-limit) -* [`csdx config:set:region [REGION]`](#csdx-configsetregion-region) -* [`csdx help [COMMAND]`](#csdx-help-command) -* [`csdx launch`](#csdx-launch) -* [`csdx launch:deployments`](#csdx-launchdeployments) -* [`csdx launch:environments`](#csdx-launchenvironments) -* [`csdx launch:functions`](#csdx-launchfunctions) -* [`csdx launch:logs`](#csdx-launchlogs) -* [`csdx launch:open`](#csdx-launchopen) -* [`csdx launch:rollback`](#csdx-launchrollback) -* [`csdx login`](#csdx-login) -* [`csdx logout`](#csdx-logout) -* [`csdx plugins`](#csdx-plugins) -* [`csdx plugins:add PLUGIN`](#csdx-pluginsadd-plugin) -* [`csdx plugins:inspect PLUGIN...`](#csdx-pluginsinspect-plugin) -* [`csdx plugins:install PLUGIN`](#csdx-pluginsinstall-plugin) -* [`csdx plugins:link PATH`](#csdx-pluginslink-path) -* [`csdx plugins:remove [PLUGIN]`](#csdx-pluginsremove-plugin) -* [`csdx plugins:reset`](#csdx-pluginsreset) -* [`csdx plugins:uninstall [PLUGIN]`](#csdx-pluginsuninstall-plugin) -* [`csdx plugins:unlink [PLUGIN]`](#csdx-pluginsunlink-plugin) -* [`csdx plugins:update`](#csdx-pluginsupdate) -* [`csdx tokens`](#csdx-tokens) -* [`csdx whoami`](#csdx-whoami) - -## `csdx auth:login` - -User sessions login - -``` -USAGE - $ csdx auth:login [-u | --oauth] [-p | ] - -FLAGS - -p, --password= Password of your Contentstack app. - -u, --username= 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 - - $ csdx auth:login -u -p - - $ csdx auth:login --username - - $ csdx auth:login --username --password -``` - -_See code: [@contentstack/cli-auth](https://github.com/contentstack/cli/blob/main/packages/contentstack-auth/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: [@contentstack/cli-auth](https://github.com/contentstack/cli/blob/main/packages/contentstack-auth/src/commands/auth/logout.ts)_ - -## `csdx auth:tokens` - -Lists all existing tokens added to the session - -``` -USAGE - $ csdx auth:tokens [--columns ] [--sort ] [--filter ] [--csv] [--no-truncate] - [--no-header] [--output csv|json|yaml] - -TABLE FLAGS - --columns= Specify columns to display, comma-separated. - --csv Output results in CSV format. - --filter= 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=