CLI reference

Media CLI command reference

CLI reference documentation for the media command.

Interact with Media Library with the npx sanity media command.

Run create-aspect and deploy-aspect from a directory whose sanity.cli.ts sets mediaLibrary.aspectsPath. The other commands also work outside a project when you pass --project-id. Learn more about configuring Media Library.

Commands

create-aspect

delete-aspect

deploy-aspect

export

import

Was this page helpful?