Skip to content

Latest commit

 

History

History
140 lines (96 loc) · 3.21 KB

sites.md

File metadata and controls

140 lines (96 loc) · 3.21 KB
title description
Netlify CLI sites command
Manage Netlify sites via the command line

sites

Handle various site operations The sites command will help you manage all your sites

Usage

netlify sites

Flags

  • filter (string) - For monorepos, specify the name of the application to run the command in
  • debug (boolean) - Print debugging information
Subcommand description
sites:create Create an empty site (advanced)
sites:create-template (Beta) Create a site from a starter template
sites:delete Delete a site
sites:list List all sites you have access to

Examples

netlify sites:create --name my-new-site
netlify sites:list

sites:create

Create an empty site (advanced) Create a blank site that isn't associated with any git remote. Will link the site to the current working directory.

Usage

netlify sites:create

Flags

  • account-slug (string) - account slug to create the site under
  • disable-linking (boolean) - create the site without linking it to current directory
  • filter (string) - For monorepos, specify the name of the application to run the command in
  • manual (boolean) - force manual CI setup. Used --with-ci flag
  • name (string) - name of site
  • with-ci (boolean) - initialize CI hooks during site creation
  • debug (boolean) - Print debugging information

sites:create-template

(Beta) Create a site from a starter template Create a site from a starter template.

Usage

netlify sites:create-template

Arguments

  • repository - repository to use as starter template

Flags

  • account-slug (string) - account slug to create the site under
  • filter (string) - For monorepos, specify the name of the application to run the command in
  • name (string) - name of site
  • url (string) - template url
  • with-ci (boolean) - initialize CI hooks during site creation
  • debug (boolean) - Print debugging information

Examples

netlify sites:create-template
netlify sites:create-template nextjs-blog-theme
netlify sites:create-template my-github-profile/my-template

sites:delete

Delete a site This command will permanently delete the site on Netlify. Use with caution.

Usage

netlify sites:delete

Arguments

  • siteId - Site ID to delete.

Flags

  • filter (string) - For monorepos, specify the name of the application to run the command in
  • force (boolean) - delete without prompting (useful for CI)
  • debug (boolean) - Print debugging information

Examples

netlify sites:delete 1234-3262-1211

sites:list

List all sites you have access to

Usage

netlify sites:list

Flags

  • filter (string) - For monorepos, specify the name of the application to run the command in
  • json (boolean) - Output site data as JSON
  • debug (boolean) - Print debugging information