Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

DatoCMS CLI

$ datocms Official Med Risk
DatoCMS · Workspace & SaaS · MIT · macos / linux / windows

DatoCMS CLI (datocms) provides environment branching, schema inspection (schema:inspect), and TypeScript/JS migration runners for DatoCMS projects. Features compact token-efficient output by default plus --json, --environment, and --profile flags tailored for CI and AI agents.

FCRS-1.0 Score
87 /100
Good
Medium Confidence
Zero-Friction Install
npm install -g datocms
CLI vs MCP Decision CLI Preferred vs MCP

datocms pairs token-efficient schema:inspect output with local Git-tracked migration scripts and sandbox environment forks directly in the project repo.

Agent-Readiness Checklist

✓ JSON Output
— Field Filtering
✓ Non-Interactive
— Dry-Run
— Read-Only Mode
— NO_COLOR Clean
✓ Self-Describing
— Official SKILL.md

Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 23 / 25

Explicitly includes agent-friendly schema:inspect (compact default + --json), --environment, --profile, and env var auth.

  • schema:inspect --json with --include-validators and --include-nested-blocks
  • Supports DATOCMS_API_TOKEN and --profile for headless runs
Trust & Safety 21 / 25

Encourages safe environments:fork sandbox branching before running migrations, though environments:destroy and promote require care.

  • Environment fork-and-promote workflow isolates schema mutations
Setup & Portability 13 / 15

Distributed as an npm package (datocms) and runnable via npx datocms on macOS, Linux, and Windows.

  • Works across platforms via npm and npx
Utility & Efficiency 12 / 15

Combines schema inspection, environment lifecycle, and migration execution in one clean CLI.

  • Unifies schema:inspect, environments:*, and migrations:run
Maintenance & Lineage 9 / 10

Official DatoCMS repository (datocms/cli) under MIT license.

  • Maintained directly by DatoCMS
Docs & Verifiability 9 / 10

Extensive oclif command docs and agent-oriented schema:inspect guides on datocms.com/docs.

  • Official DatoCMS CLI & agent command reference

Security, Auth & Guardrails

Auth Modes
Env API Key Config File
Credential Storage

Stores named API token profiles in datocms.config.json (project or user home) via datocms profile:set, or accepts DATOCMS_API_TOKEN environment variable.

Side Effects
Read-Only Local Write Remote Write Destructive
Cost & Quotas

MIT open-source CLI; DatoCMS has a free developer plan and paid production/sandbox tiers.

Copyable Guardrail for CLAUDE.md / AGENTS.md
# DatoCMS CLI (datocms) Agent Rules
- Authenticate with `DATOCMS_API_TOKEN` or `--profile` and target `--environment <sandbox>` before testing migrations.
- Run `datocms schema:inspect --json` to read exact model and field API keys before writing scripts.
- Never run `environments:promote` or `environments:destroy` against `main` without explicit approval.

Agent-Ready Command Recipes

Safe Read-Only Queries

Inspect DatoCMS project schema as JSON
datocms schema:inspect --json --fields-details=complete

Exports models, blocks, field definitions, and validators in structured JSON.

List DatoCMS environments
datocms environments:list

Lists primary and sandbox environments configured for the DatoCMS project.

Controlled Writes & Previews

Fork primary environment into a sandbox
datocms environments:fork main agent-sandbox

Creates an isolated DatoCMS sandbox environment before running schema migrations.

Strengths for Agents

  • + schema:inspect offers both token-saving compact output and full --json detail.
  • + Environment forking (environments:fork) gives agents a safe sandbox for schema changes.

Caveats & Pitfalls

  • ! Some environments:* and migrations:run subcommands do not have universal --json output.
  • ! Full-access CMA tokens can destroy environments or mutate primary content if --environment is mis-targeted.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI