---
title: Command reference
description: >-
  Find the main mcms-cli commands for content, media, schemas, types,
  authentication, and documentation, plus common automation options.
sidebar:
  order: 6
noindex: false
---
This page groups the main commands by task. Add `--json` when another program needs to consume the result.

## APIs and content

```bash
microcms api list --json
microcms api info <endpoint> --json
microcms api schema inspect <endpoint> --json

microcms content list <endpoint> --all --json
microcms content get <endpoint> <id> --json
microcms content create <endpoint> --file payload.json --dry-run --json
microcms content update <endpoint> <id> --file payload.json --dry-run --json
microcms content delete <endpoint> <id> --dry-run --json
microcms validate <endpoint> --file payload.json --json
```


### Create an API (v0.8.0+)

`microcms api create` uses the Management API to create a microCMS API from a JSON file. Use `--name`, `--endpoint`, and `--type` to fill in or override the file's basic API settings.

Run a dry-run first to review the API that will be created.

```bash
microcms api create \
  --file articles-api.json \
  --name articles \
  --endpoint articles \
  --type list \
  --dry-run \
  --json
```

The dry-run validates the API schema and custom-field structure. Review the output, exit code, and JSON `.ok` value. Then remove `--dry-run` to create the API.

```bash
microcms api create \
  --file articles-api.json \
  --name articles \
  --endpoint articles \
  --type list \
  --json
```

Add `--allow-additional-charge` only when you intend to allow additional charges.

The [v0.8.0 release notes](/en/changelog/v0-8-0) list the complete changes.


## Export and import

```bash
microcms content export <endpoint> --out backup/contents.json --json
microcms content export --all --out backup/ --json
microcms content import <endpoint> \
  --file backup/contents.json \
  --dry-run \
  --strict-warnings \
  --json
```

## File-based workflows

```bash
microcms content pull <endpoint> \
  --all \
  --out managed-content \
  --format managed-json \
  --json

microcms content verify <endpoint> \
  --dir managed-content \
  --only-changed \
  --json

microcms content push <endpoint> \
  --dir managed-content \
  --json
```

`content push` verifies by default. Writing to the remote service requires `--execute`.

## Media, schemas, and types

```bash
microcms media list --limit 20 --image-only --json
microcms media upload ./image.png --dry-run --json
microcms media delete --url <media-url> --dry-run --json

microcms schema pull --out schema.json --json
microcms schema diff --baseline schema.json --json
microcms types sync --out microcms-types.d.ts --json
```

## Authentication and configuration

```bash
microcms auth status --json
microcms auth profile list --json
microcms config doctor --json
microcms completion install zsh --json
```

Common options include `--profile`, `--service-domain`, `--api-key-stdin`, `--timeout`, `--retry`, `--verbose`, and `--no-color`.

## Related pages

- [Safe content operations](/en/content-operations)
- [Schemas and types](/en/schema-and-types)
- [FAQ and troubleshooting](/en/faq)
