{"id":46097468,"url":"https://github.com/contentstack/contentstack-cli-content-type","last_synced_at":"2026-03-01T19:02:07.881Z","repository":{"id":46075131,"uuid":"319410270","full_name":"contentstack/contentstack-cli-content-type","owner":"contentstack","description":"Retrieve information about Content Types in a Stack","archived":false,"fork":false,"pushed_at":"2026-02-11T07:16:14.000Z","size":1611,"stargazers_count":2,"open_issues_count":6,"forks_count":3,"subscribers_count":8,"default_branch":"main","last_synced_at":"2026-02-11T14:54:28.832Z","etag":null,"topics":["contentstack","contentstack-cli","contentstack-plugin"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/contentstack.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2020-12-07T18:34:58.000Z","updated_at":"2026-01-19T10:42:59.000Z","dependencies_parsed_at":"2023-02-17T19:15:24.961Z","dependency_job_id":"61b048c8-d106-4708-8a79-a4a2e5051dcd","html_url":"https://github.com/contentstack/contentstack-cli-content-type","commit_stats":{"total_commits":46,"total_committers":4,"mean_commits":11.5,"dds":"0.10869565217391308","last_synced_commit":"4a45da88517bd2249cd7e2f5914fe2b1e2e005f5"},"previous_names":["contentstack/contentstack-cli-content-type","contentstack-solutions/contentstack-cli-content-type"],"tags_count":16,"template":false,"template_full_name":null,"purl":"pkg:github/contentstack/contentstack-cli-content-type","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/contentstack%2Fcontentstack-cli-content-type","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/contentstack%2Fcontentstack-cli-content-type/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/contentstack%2Fcontentstack-cli-content-type/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/contentstack%2Fcontentstack-cli-content-type/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/contentstack","download_url":"https://codeload.github.com/contentstack/contentstack-cli-content-type/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/contentstack%2Fcontentstack-cli-content-type/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29980796,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-01T16:35:47.903Z","status":"ssl_error","status_checked_at":"2026-03-01T16:35:44.899Z","response_time":124,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["contentstack","contentstack-cli","contentstack-plugin"],"created_at":"2026-03-01T19:02:06.676Z","updated_at":"2026-03-01T19:02:07.876Z","avatar_url":"https://github.com/contentstack.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"![npm](https://img.shields.io/npm/v/contentstack-cli-content-type)\n\n## Description\nThis is a plugin for [Contentstack's](https://www.contentstack.com/) CLI.\nIt allows you to quickly retrieve information about Content Types in a Stack.\n\n## Why use this plugin\n1. The `csdx content-type:audit` command lists recent changes to a content type and by whom.\nThis is useful when needing to find Content Type versions to compare with `csdx content-type:compare`.\n[Audit logs](https://www.contentstack.com/docs/developers/set-up-stack/monitor-stack-activities-in-audit-log/) are stored for 90 days within Contentstack. \n\n1. The `csdx content-type:compare-remote` command allows you to compare the same Content Type between two Stacks.\nThis is useful when you have cloned or duplicated a Stack, and want to check what has changed in a child Stack.\n\n1. The `csdx content-type:compare` command allows you to compare multiple versions of a Content Type within a single Stack.\nThis is useful when you are working in a development team, and want to compare changes made by colleagues.\n\n1. The `csdx content-type:list` command is useful when you want to see all the Content Types within a Stack.\nThe Content Type's Display Name, UID, Last Modified Date, and Version number is shown. The list can be ordered by `title` or `modified` date. When developing against Contentstack, Content Type UIDs are needed when requesting data.\n\n1. The `csdx content-type:details` command provides useful information, such as:\n    * Field UID and Data Types\n    * Referenced Content Types\n    * Options such as required, multiple, and unique\n    * The full path to a field, useful when using the [include reference endpoint](https://www.contentstack.com/docs/developers/apis/content-delivery-api/#include-reference) or filtering operations, such as the [equality endpoint](https://www.contentstack.com/docs/developers/apis/content-delivery-api/#equals-operator).\n\n1. The `csdx content-type:diagram` command creates a visual representation of a Stack's content model.\n    * The ouput format can be either `svg` or `dot`. \n    * The diagram's orientation can be changed, using the `-d landscape|portrait` flag.\n    * [GraphViz](https://graphviz.org/) is the layout engine. You can export the generated DOT Language source, using the `-t dot` flag.\n    * ![Diagram Output](https://github.com/contentstack/contentstack-cli-content-type/blob/main/screenshots/starter-app.svg)\n\n## How to install this plugin\n\n```shell\n$ csdx plugins:install contentstack-cli-content-type\n```\n\n## How to use this plugin\nThis plugin requires you to be authenticated using [csdx auth:login](https://www.contentstack.com/docs/developers/cli/authenticate-with-the-cli/).\n\nSeveral commands, such as `csdx content-type:compare` support token aliases as input.\nThese token aliases should be created using `csdx auth:tokens:add`.\n\nThe commands only use the **Stack API Key**. The management token is ignored.\nThey are provided as a convenience, so the Stack API Keys do not have to be re-typed. \n\n## Usability\nThe `csdx content-type:details` command requires a wide terminal window. If the `path` column is not needed, you can hide it:\n\n```shell\n$ csdx content-type:details -a \"management token\" -c \"content type\" --no-path\n```\n\u003c!-- usagestop --\u003e\n# Commands\n\u003c!-- commands --\u003e\n* [`csdx content-type:audit`](#csdx-content-typeaudit)\n* [`csdx content-type:compare`](#csdx-content-typecompare)\n* [`csdx content-type:compare-remote`](#csdx-content-typecompare-remote)\n* [`csdx content-type:details`](#csdx-content-typedetails)\n* [`csdx content-type:diagram`](#csdx-content-typediagram)\n* [`csdx content-type:list`](#csdx-content-typelist)\n\n## `csdx content-type:audit`\n\nDisplay recent changes to a Content Type\n\n```\nUSAGE\n  $ csdx content-type:audit -c \u003cvalue\u003e [-s \u003cvalue\u003e | -a \u003cvalue\u003e | -a \u003cvalue\u003e] [-k \u003cvalue\u003e |  | ]\n\nFLAGS\n  -a, --alias=\u003cvalue\u003e          Alias of the management token\n  -a, --token-alias=\u003cvalue\u003e    Management token alias\n  -c, --content-type=\u003cvalue\u003e   (required) Content Type UID\n  -k, --stack-api-key=\u003cvalue\u003e  Stack API Key\n  -s, --stack=\u003cvalue\u003e          Stack UID\n\nDESCRIPTION\n  Display recent changes to a Content Type\n\nEXAMPLES\n  $ csdx content-type:audit --stack-api-key \"xxxxxxxxxxxxxxxxxxx\" --content-type \"home_page\"\n\n  $ csdx content-type:audit --alias \"management token\" --content-type \"home_page\"\n```\n\n_See code: [src/commands/content-type/audit.ts](https://github.com/contentstack/contentstack-cli-content-type/blob/v1.3.0/src/commands/content-type/audit.ts)_\n\n## `csdx content-type:compare`\n\nCompare two Content Type versions\n\n```\nUSAGE\n  $ csdx content-type:compare -c \u003cvalue\u003e [-s \u003cvalue\u003e | -a \u003cvalue\u003e] [-k \u003cvalue\u003e | ] [-a \u003cvalue\u003e] [-l \u003cvalue\u003e -r \u003cvalue\u003e]\n\nFLAGS\n  -a, --alias=\u003cvalue\u003e          Alias of the management token\n  -a, --token-alias=\u003cvalue\u003e    Management token alias\n  -c, --content-type=\u003cvalue\u003e   (required) Content Type UID\n  -k, --stack-api-key=\u003cvalue\u003e  Stack API Key\n  -l, --left=\u003cvalue\u003e           Content Type version, i.e. prev version\n  -r, --right=\u003cvalue\u003e          Content Type version, i.e. later version\n  -s, --stack=\u003cvalue\u003e          Stack UID\n\nDESCRIPTION\n  Compare two Content Type versions\n\nEXAMPLES\n  $ csdx content-type:compare --stack-api-key \"xxxxxxxxxxxxxxxxxxx\" --content-type \"home_page\"\n\n  $ csdx content-type:compare --stack-api-key \"xxxxxxxxxxxxxxxxxxx\" --content-type \"home_page\" --left # --right #\n\n  $ csdx content-type:compare --alias \"management token\" --content-type \"home_page\" --left # --right #\n```\n\n_See code: [src/commands/content-type/compare.ts](https://github.com/contentstack/contentstack-cli-content-type/blob/v1.3.0/src/commands/content-type/compare.ts)_\n\n## `csdx content-type:compare-remote`\n\ncompare two Content Types on different Stacks\n\n```\nUSAGE\n  $ csdx content-type:compare-remote (-o \u003cvalue\u003e -r \u003cvalue\u003e) -c \u003cvalue\u003e\n\nFLAGS\n  -c, --content-type=\u003cvalue\u003e  (required) Content Type UID\n  -o, --origin-stack=\u003cvalue\u003e  (required) Origin Stack API Key\n  -r, --remote-stack=\u003cvalue\u003e  (required) Remote Stack API Key\n\nDESCRIPTION\n  compare two Content Types on different Stacks\n\nEXAMPLES\n  $ csdx content-type:compare-remote --origin-stack \"xxxxxxxxxxxxxxxxxxx\" --remote-stack \"xxxxxxxxxxxxxxxxxxx\" -content-type \"home_page\"\n```\n\n_See code: [src/commands/content-type/compare-remote.ts](https://github.com/contentstack/contentstack-cli-content-type/blob/v1.3.0/src/commands/content-type/compare-remote.ts)_\n\n## `csdx content-type:details`\n\nDisplay Content Type details\n\n```\nUSAGE\n  $ csdx content-type:details -c \u003cvalue\u003e [-s \u003cvalue\u003e | -a \u003cvalue\u003e] [-k \u003cvalue\u003e | ] [-a \u003cvalue\u003e] [-p]\n\nFLAGS\n  -a, --alias=\u003cvalue\u003e          Alias of the management token\n  -a, --token-alias=\u003cvalue\u003e    Management token alias\n  -c, --content-type=\u003cvalue\u003e   (required) Content Type UID\n  -k, --stack-api-key=\u003cvalue\u003e  Stack API Key\n  -p, --[no-]path              show path column\n  -s, --stack=\u003cvalue\u003e          Stack UID\n\nDESCRIPTION\n  Display Content Type details\n\nEXAMPLES\n  $ csdx content-type:details --stack-api-key \"xxxxxxxxxxxxxxxxxxx\" --content-type \"home_page\"\n\n  $ csdx content-type:details --alias \"management token\" --content-type \"home_page\"\n\n  $ csdx content-type:details --alias \"management token\" --content-type \"home_page\" --no-path\n```\n\n_See code: [src/commands/content-type/details.ts](https://github.com/contentstack/contentstack-cli-content-type/blob/v1.3.0/src/commands/content-type/details.ts)_\n\n## `csdx content-type:diagram`\n\nCreate a visual diagram of a Stack's Content Types\n\n```\nUSAGE\n  $ csdx content-type:diagram -o \u003cvalue\u003e -d portrait|landscape -t svg|dot [-s \u003cvalue\u003e | -a \u003cvalue\u003e | -a \u003cvalue\u003e] [-k\n    \u003cvalue\u003e |  | ]\n\nFLAGS\n  -a, --alias=\u003cvalue\u003e          Alias of the management token\n  -a, --token-alias=\u003cvalue\u003e    Management token alias\n  -d, --direction=\u003coption\u003e     (required) [default: portrait] graph orientation\n                               \u003coptions: portrait|landscape\u003e\n  -k, --stack-api-key=\u003cvalue\u003e  Stack API Key\n  -o, --output=\u003cvalue\u003e         (required) full path to output\n  -s, --stack=\u003cvalue\u003e          Stack UID\n  -t, --type=\u003coption\u003e          (required) [default: svg] graph output file type\n                               \u003coptions: svg|dot\u003e\n\nDESCRIPTION\n  Create a visual diagram of a Stack's Content Types\n\nEXAMPLES\n  $ csdx content-type:diagram --stack-api-key \"xxxxxxxxxxxxxxxxxxx\" --output \"content-model.svg\"\n\n  $ csdx content-type:diagram --alias \"management token\" --output \"content-model.svg\"\n\n  $ csdx content-type:diagram --alias \"management token\" --output \"content-model.svg\" --direction \"landscape\"\n\n  $ csdx content-type:diagram --alias \"management token\" --output \"content-model.dot\" --type \"dot\"\n```\n\n_See code: [src/commands/content-type/diagram.ts](https://github.com/contentstack/contentstack-cli-content-type/blob/v1.3.0/src/commands/content-type/diagram.ts)_\n\n## `csdx content-type:list`\n\nList all Content Types in a Stack\n\n```\nUSAGE\n  $ csdx content-type:list [-s \u003cvalue\u003e | -a \u003cvalue\u003e | -a \u003cvalue\u003e] [-k \u003cvalue\u003e |  | ] [-o title|modified]\n\nFLAGS\n  -a, --alias=\u003cvalue\u003e          Alias of the management token\n  -a, --token-alias=\u003cvalue\u003e    Management token alias\n  -k, --stack-api-key=\u003cvalue\u003e  Stack API Key\n  -o, --order=\u003coption\u003e         [default: title] order by column\n                               \u003coptions: title|modified\u003e\n  -s, --stack=\u003cvalue\u003e          Stack UID\n\nDESCRIPTION\n  List all Content Types in a Stack\n\nEXAMPLES\n  $ csdx content-type:list --stack-api-key \"xxxxxxxxxxxxxxxxxxx\"\n\n  $ csdx content-type:list --alias \"management token\"\n\n  $ csdx content-type:list --alias \"management token\" --order modified\n```\n\n_See code: [src/commands/content-type/list.ts](https://github.com/contentstack/contentstack-cli-content-type/blob/v1.3.0/src/commands/content-type/list.ts)_\n\u003c!-- commandsstop --\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcontentstack%2Fcontentstack-cli-content-type","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcontentstack%2Fcontentstack-cli-content-type","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcontentstack%2Fcontentstack-cli-content-type/lists"}