CLI reference
Docs CLI command reference
Browse, read, and search the Sanity documentation from the CLI.
npx sanity docs --help
pnpm dlx sanity docs --help
yarn dlx sanity docs --help
bunx sanity docs --help
Commands
browse
USAGE $ sanity docs browse DESCRIPTION Open Sanity docs in a web browser
read
USAGE
$ sanity docs read PATH [--web]
ARGUMENTS
PATH Path or URL to article, found in search results and docs content as links
FLAGS
--web Open in a web browser
DESCRIPTION
Read an article in terminal
EXAMPLES
Read as markdown in terminal
$ sanity docs read /docs/studio/installation
Read using full URL
$ sanity docs read https://www.sanity.io/docs/studio/installation
Open in web browser
$ sanity docs read /docs/studio/installation --web
Open using full URL in web browser
$ sanity docs read https://www.sanity.io/docs/studio/installation -wsearch
USAGE
$ sanity docs search QUERY [--limit <value>]
ARGUMENTS
QUERY Search query for documentation
FLAGS
--limit=<value> Maximum number of results to return
DESCRIPTION
Search Sanity docs
EXAMPLES
Search for documentation about schemas
$ sanity docs search schema
Search with phrase
$ sanity docs search "groq functions"
Limit search results
$ sanity docs search "deployment" --limit=5