> For AI agents: the complete Sanity documentation index is available at [https://www.sanity.io/docs/llms.txt](https://www.sanity.io/docs/llms.txt).

# New CLI command reference

Reference documentation for the Sanity CLI new command.

**CLI output**

```sh
USAGE
  $ sanity new [PROJECTNAME] [--yes] [--json] [--scaffold]

ARGUMENTS
  [PROJECTNAME]  Display name for the new project

FLAGS
  -y, --yes       Skip prompts and use defaults (project: "My Sanity project")
      --scaffold  Set up a Studio in ./sanity and a Next.js website in ./web (on by default)

GLOBAL FLAGS
      --json  Format output as json.

DESCRIPTION
  Sets up two folders here: ./sanity, a Studio where you write and edit your
  content, and ./web, a Next.js website that reads it. Both are already
  connected to your new project, so you can start them straight away. Use
  --no-scaffold if you just want the project and nothing else.
  
  The project is real and works immediately, but it is only yours for 72 hours.
  Claim it with a Sanity account before the deadline and everything you have
  built stays exactly as it is. Claiming is free and takes about a minute. Miss
  the deadline and the project and its content are deleted.
  
  Two things to keep private: the claim link, because anyone who opens it
  becomes the owner, and the access token saved in ./sanity/.env.local and
  ./web/.env.local, because it can read and change everything in the project.
  Keep both env files out of git, and never put the token in code that runs in
  the browser.
  
  Fetch https://sanity.new for full instructions, or point your AI agent at it.

EXAMPLES
  Create a project with a Studio and a website

    $ sanity new

  Create a project called "My New Project"

    $ sanity new "My New Project"

  Create a project without being asked anything

    $ sanity new --yes

  Create the project only, with no Studio or website

    $ sanity new --no-scaffold

  Create a project and print its details as JSON

    $ sanity new --json
```

