# Install the Sanity command line interface
~/
> npm i -g @sanity/cli
# Install Sanity in a separate folder
~/blog-backend
> sanity init
# Insert the projectId and dataset name from Sanity in client.js
~/sanity-blog-tutorial
> nano client.js
# Install frontend dependencies
~/sanity-blog-tutorial
> npm install
# Run Next.js in development mode
~/sanity-blog-tutorial
> npm run dev
~/sanity-blog-tutorial
npm run export
# exports your site as static files in /out