Netlify CLI

To get up and running with teh netlify CLI first you need to install it using npm: - Install Netlify CLI

Next you should create a folder or your project. Eitehr simply create an empty folder and: 1. Add a netlify.toml file 1. Create a dist folder 1. Use emmet to add boilerplate html to index.html in the dist folder

Alternatively, you can use another tool - like astro CLI to populate and create the content in your project folder.

# Netlify dev

Here is the basics of using ```netlify dev```. The first thing you want to do is follow the basic tutorial: - Getting Started - netlify.com

YOUTUBE FMhVXOA54x8 Netlify Dev Crash Course (Apr 2019)

# Init For repositories stored on GitHub, you can use Netlify CLI to connect your repository by running the following command from your local repository:

netlify init

This starts a simple step-by-step process that helps you: - Connect your project to a GitHub repository - Set up automatic updates every time you change your code - Create a netlify.toml file for your project settings - Give you a website link to see your project live

Just follow the on-screen instructions to complete each step. For more detail on this step see: - netlify init

# Netlify dev When you run netlify dev, we’ll start a local development server with access to redirects, Forms, Netlify Functions, Netlify Edge Functions, and more. See: - netlify dev

In order to connect your repository for continuous deployment, Netlify CLI will need access to create a deploy key and a webhook on the repository. When you run the command above, you’ll be prompted to log in to your GitHub account, which will create an account-level access token. The access token will be stored in the Netlify CLI config.json. Your login password will never be stored. You can revoke the access token at any time from your GitHub account settings; however, this will disable continuous deployment on all sites that were configured with that access token.

# See also - Emmet