CLI reference
Projects CLI command reference
Get information about projects for your logged in user
npx sanity projects --help
pnpm dlx sanity projects --help
yarn dlx sanity projects --help
bunx sanity projects --help
Commands
create
USAGE
$ sanity projects create [PROJECTNAME] [--yes] [--dataset <value>] [--dataset-visibility <value>] [--json] [--organization <slug|id>]
ARGUMENTS
[PROJECTNAME] Name of the project to create
FLAGS
-y, --yes Skip prompts and use defaults (project: "My Sanity Project", dataset: production, visibility: public)
--dataset=<value> Create a dataset. Prompts for visibility unless specified or --yes used
--dataset-visibility=<value> Dataset visibility: public or private
--json Output in JSON format
--organization=<slug|id> Organization to create the project in
DESCRIPTION
Create a new Sanity project
EXAMPLES
Interactively create a project
$ sanity projects create
Create a project named "My New Project"
$ sanity projects create "My New Project"
Create a project in a specific organization
$ sanity projects create "My Project" --organization=my-org
Create a project with a private dataset named "staging"
$ sanity projects create "My Project" --dataset=staging --dataset-visibility=private
Create a project non-interactively with JSON output
$ sanity projects create "CI Project" --yes --jsonlist
USAGE
$ sanity projects list [--order <value>] [--sort <value>]
FLAGS
--order=<value>
--sort=<value>
DESCRIPTION
Lists projects connected to your user
EXAMPLES
List projects
$ sanity projects list
List all users of the project, but exclude pending invitations and robots
$ sanity projects list --sort=members --order=asc