Skip to content

Releases: datocms/cli

v4.0.5

09 Apr 13:21

Choose a tag to compare

Changes

  • New cma:docs command — Browse the DatoCMS Content Management API reference documentation directly from the terminal. List resources, describe actions, and expand details sections without leaving the CLI.

Examples

# List all available resources
datocms cma:docs

# Describe a specific resource and its actions
datocms cma:docs items

# Describe a specific action with examples
datocms cma:docs items create

# Expand a collapsed details section
datocms cma:docs items create --expand "Example: Basic example"

v4.0.4

09 Apr 08:06

Choose a tag to compare

Changes

  • Revoke OAuth token on logoutdatocms logout now revokes the OAuth token remotely before deleting local credentials
  • Detect revoked tokens — When a stored OAuth token has been revoked (e.g. from account settings), the CLI now shows a clear error message instead of a generic "could not access project" error

v4.0.3

03 Apr 11:29

Choose a tag to compare

Changes

  • Hide inaccessible projects in link command — Projects where the user doesn't have access permissions are no longer shown in the project selection list during datocms link

v4.0.2

03 Apr 11:04

Choose a tag to compare

Changes

  • Allow re-login without requiring logout first — Running datocms login when already authenticated now replaces existing credentials instead of blocking
  • Improve OAuth token resolution — Linked projects (via datocms link) now take priority over the DATOCMS_API_TOKEN environment variable, so OAuth-based authentication is not silently overridden
  • Improve error messages — Better error message when a linked project cannot be accessed, mentioning possible OAuth permission changes

v4.0.0

03 Apr 11:06

Choose a tag to compare

Easier (and safer) project linking with OAuth

OAuth login is now the recommended way to authenticate. The new setup is fully guided: datocms login opens your browser, datocms link lets you search and select a project interactively — no tokens to copy, no environment variables to configure. Every API call is tied to your personal identity, giving teams clear visibility over who made which changes.

New commands

  • datocms login — authenticate your DatoCMS account via OAuth
  • datocms link — connect the current directory to a specific DatoCMS project
  • datocms logout — remove stored credentials
  • datocms whoami — check which account you're logged in as
  • datocms unlink — disconnect a directory from a project

What changed for existing users

Nothing breaks. The old profile:set and profile:remove commands still work — they redirect to link and unlink under the hood. Existing scripts and CI/CD pipelines using DATOCMS_API_TOKEN or the --api-token flag are completely unaffected.

@datocms/cli v3.1.3

26 Sep 07:33

Choose a tag to compare

New Features

  • New schema:generate command - Generate TypeScript schemas from DatoCMS models
  • Enhanced migrations:new command - Added --schema option for schema-specific migrations

Bug Fixes

  • Various fixes and stability improvements